Postado Janeiro 30, 2018 7 anos Autor @Hokograma na mesma linha do additem ? pode me manda uma linha do additem ai me ensinando como colocar ?
Postado Janeiro 30, 2018 7 anos Solução @Hokograma pra 2 itens: local rewards = {{2463,1}, {2001,1}} function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) < 1 then return doPlayerSendCancel(cid, "You need level 1 or higher to get the reward.") end if getPlayerStorageValue(cid, 24532) == 1 then return doPlayerSendCancel(cid, "You have already done this quest.") end setPlayerStorageValue(cid, 24532, 1) for i, v in pairs(rewards) do if (not isItemStackable(v[1])) then for c=1, v[2] do doPlayerAddItem(cid, v[1], 1) end else doPlayerAddItem(cid, v[1], v[2]) end end doCreatureSay(cid, "Voce fechou a quest", 1) doSendMagicEffect(getPlayerPosition(cid), 1) return true end pra 3 itens: local rewards = {{2463,1}, {2001,1}, {9000,1}} function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) < 1 then return doPlayerSendCancel(cid, "You need level 1 or higher to get the reward.") end if getPlayerStorageValue(cid, 24532) == 1 then return doPlayerSendCancel(cid, "You have already done this quest.") end setPlayerStorageValue(cid, 24532, 1) for i, v in pairs(rewards) do if (not isItemStackable(v[1])) then for c=1, v[2] do doPlayerAddItem(cid, v[1], 1) end else doPlayerAddItem(cid, v[1], v[2]) end end doCreatureSay(cid, "Voce fechou a quest", 1) doSendMagicEffect(getPlayerPosition(cid), 1) return true end Projeto Nto Myth " Eu to disposto a lutar e que se foda todo mundo que duvida que eu vou tocar o terror na porra toda! "
Postado Janeiro 31, 2018 7 anos Autor @Hokograma [30/01/2018 21:28:56] [Error - Action Interface] [30/01/2018 21:28:56] data/actions/scripts/tuts.lua:onUse [30/01/2018 21:28:56] Description: [30/01/2018 21:28:56] (luaDoPlayerAddItem) Item not found da esse erro ai e nao aparece os item na mochila as linha que eu usei. local rewards = {{2463,1}, {2001,1}} function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) < 1 then return doPlayerSendCancel(cid, "You need level 1 or higher to get the reward.") end if getPlayerStorageValue(cid, 24527) == 1 then return doPlayerSendCancel(cid, "You have already done this quest.") end setPlayerStorageValue(cid, 24527, 1) for i, v in pairs(rewards) do if (not isItemStackable(v[1])) then for c=1, v[2] do doPlayerAddItem(cid, v[2159], 1) end else doPlayerAddItem(cid, v[2159], v[2157]) end end doCreatureSay(cid, "Voce fechou a quest", 1) doSendMagicEffect(getPlayerPosition(cid), 1) return true end
Postado Janeiro 31, 2018 7 anos Em 31/01/2018 em 00:31, lassdarck disse: (luaDoPlayerAddItem) Item not found voce nao mudou, os Id's para os itens que tu queria por. muda aqui nessa linha Citar {{2463,1}, {2001,1}, {9000,1}} 2464=item 1 2001=item 2 9000=item 3 Projeto Nto Myth " Eu to disposto a lutar e que se foda todo mundo que duvida que eu vou tocar o terror na porra toda! "
Postado Janeiro 31, 2018 7 anos Autor @Hokograma ta bom obrigado quando voltar para da os rep eu vou ter da ++ pro ajudar
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.