Bom os kinights não tão recebendo os itens conforme sua skill, independente que club,axe ou sword for maior, ele está recebendo sempre sowrd alguém me ajuda ??? Obg.
function onUse (cid, item, frompos, item2, topos)
playervoc = getPlayerVocation(cid)
if playervoc == 1 or playervoc == 5 or playervoc == 9 then -- Especifica se o player é sorcerer ou master sorcerer
if item.uid == 3002 then -- Unique ID colocado no mapa
queststatus = getPlayerStorageValue(cid, 3002) -- Storage Value
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid, 22, "Você recebeu seu item.") --Mensagem da Quest
local quest = doPlayerAddItem(cid,7424,1) -- Item ID no caso SpellBook of mind control
doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid, 3002, 1) --Storage Value
else
doPlayerSendTextMessage(cid,22,"Desculpe, você já pegou seu premio.") -- Mensagem Caso Player já tenha feito a Quest
end
else
return 0
end
return 1
end
if playervoc == 2 or playervoc == 6 or playervoc == 10 then -- Especifica se o player é druid ou elder druid
if item.uid == 3002 then -- Unique ID colocado no mapa
queststatus = getPlayerStorageValue(cid, 3002) -- Storage Value
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid, 22, "Você recebeu seu item.") --Mensagem da Quest
local quest = doPlayerAddItem(cid,7424,1) -- Item ID no caso SpellBook of dark mysteries
doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid, 3002, 1) --Storage Value
else
doPlayerSendTextMessage(cid,22,"Desculpe, você já pegou seu premio.") -- Mensagem Caso Player já tenha feito a Quest
end
else
return 0
end
return 1
end
if playervoc == 3 or playervoc == 7 or playervoc == 11 then -- Especifica se o player é pally ou royal pally
if item.uid == 3002 then -- Unique ID colocado no mapa
queststatus = getPlayerStorageValue(cid, 3002) -- Storage Value
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid, 22, "Você recebeu seus items.") --Mensagem da Quest
local quest1 = doPlayerAddItem(cid,7438,1) -- Item ID no caso 100 assassin stars
doItemSetAttribute(quest1,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
local quest2 = doPlayerAddItem(cid,2352,1)
doItemSetAttribute(quest2,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid, 3002, 1) --Storage Value
else
doPlayerSendTextMessage(cid,22,"Desculpe, você já pegou seus premios.") -- Mensagem Caso Player já tenha feito a Quest
end
else
return 0
end
return 1
end
if playervoc == 4 or playervoc == 8 or playervoc == 12 then --Especifica se o player é kina ou elite kina
if item.uid == 3002 then -- Unique ID colocado no mapa
queststatus = getPlayerStorageValue(cid, 3002) -- Storage Value
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid, 22, "Você recebeu seu item.") --Mensagem da Quest
local club, sword, axe = getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3)
if club > sword and club >= axe then
skillid = 10
elseif sword >= axe and sword >= club then
skillid = 15
elseif axe > sword and axe > club then
skillid = 30
return skillid
end
if skillid == 15 then
local quest = doPlayerAddItem(cid,115,1) -- sowrd
elseif skillid == 10 then
local quest = doPlayerAddItem(cid,2421,1) -- axe
elseif skillid == 30 then
local quest = doPlayerAddItem(cid,2431,1) -- club
end
doItemSetAttribute(quest,"description","Refinado(Atk): +26.\nEsse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid, 3002, 1) --Storage Value
else
doPlayerSendTextMessage(cid,22,"Desculpe, você já pegou seu premio.") -- Mensagem Caso Player já tenha feito a Quest
end
else
return 0
end
return 1
end
end