Postado Dezembro 15, 2014 10 anos Autor É porque a tag no XML ta assim: <action itemid="1740;1747-1749" event="script" value="quests.lua"/>
Postado Dezembro 15, 2014 10 anos Tenta lá, o que script que eu coloquei, eu editei o meu ultimo post. @Edit: @Ka zuza, é desnecessário "setar" a storage do player, se o script ñ vai precisar verificar no futuro... setPlayerStorageValue(cid, item.uid, 1) Editado Dezembro 15, 2014 10 anos por danihcv (veja o histórico de edições)
Postado Dezembro 15, 2014 10 anos Autor function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid > 1000 and item.uid < 13000 then local itemWeight = getItemWeightById(item.uid, 1) local playerCap = getPlayerFreeCap(cid) if playerCap >= itemWeight then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.') doPlayerAddItem(cid, item.uid ,1) setPlayerStorageValue(cid, item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.') end else return false end return true end Tá a mesma coisa amigo
Postado Dezembro 15, 2014 10 anos @reglachek, tenta o meu: local qnt = 1 --QUANTIDADE_QUE_VC_QR function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid > 1000 and item.uid < 13000 then local itemWeight = getItemWeightById(item.uid, 1) local playerCap = getPlayerFreeCap(cid) if playerCap >= itemWeight then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.') doPlayerAddItem(cid, item.uid , qnt) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.') end else return false end return true end Editado Dezembro 15, 2014 10 anos por danihcv (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.