O que há de errado com este código?
Simplesmente não consigo pega-lo com nenhum char..
Exceto knight (detalhe que tentei com o char GOD, que é knight, rs)
Anyways, realiza-se a function toda, 'congratulations', a storage pra se o player for pegar de novo dar 'empty'...
Mas não add item algum...
Se alguém puder ajudar agradeço.
---------------
.LUA
local cfg = { kina= {2430}, pala = {2173}, sorc = {2189}, drui = {8857}, }function onUse(cid, item) if getPlayerStorageValue(cid, 38493) ~= 1 then if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then doPlayerAddItem(cid, cfg.kina[1], 1) doPlayerAddItem(cid, cfg.kina[2], 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then doPlayerAddItem(cid, cfg.sorc, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then doPlayerAddItem(cid, cfg.drui, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then doPlayerAddItem(cid, cfg.pala, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) end else doPlayerSendCancel(cid, "It's empty.") end return trueend
.XML
--------
Não me lembro da fonte do code....