Vai em data>actions>script copie um arquivo .lua e renomeie para questvocation e cole isto nele:
local cfg = {
questChestAId = 5500, --
questChestStorage = 45008 --
}
local vocQ = {
[1] = {item = 2421 }, -- o item que você vai da.--
[2] = {item = 2421}, -- as vocations está configuradas até Elite Knight , 1=Sorc,2=druid,3=Paladin,4=Kina e assim em diante
[3] = {item = 2421},
[4] = {item = 2421},
[5] = {item = 2421},
[6] = {item = 2421},
[7] = {item = 2421},
[8] = {item = 2421}
}
function onUse(cid, item, toPosition, itemEx, fromPosition)
for voc, i in pairs(vocQ) do
if item.actionid == cfg.questChestAId then
local opened = getPlayerStorageValue(cid, cfg.questChestStorage)
if opened == -1 then
doPlayerSetStorageValue(cid, cfg.questChestStorage, 1)
if getPlayerVocation(cid) == voc or getPlayerVocation(cid) == voc+4 then
doPlayerAddItem(cid, i.item)
doPlayerSendTextMessage(cid, 25, "You recieved "..getItemNameById(i.item)..".")
end
else
doPlayerSendCancel(cid, "It's empty.")
end
end
end
return true
end
depois vai em actions.xml e adicione esta linha:
<action actionid="5500" event="script" value="questvocation.lua"/>