Postado Março 10, 2017 8 anos @jNo local s = 19000 function onUse(cid, item, itemEx, toPosition, fromPosition) if getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, s, 1) doPlayerSendTextMessage(cid, 22, "Parabéns! Você ganhou um novo outfit.") doSendMagicEffect(getCreaturePosition(cid), 30) doPlayerRemoveItem(cid, item.uid, 1) if getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 264, 1) else doPlayerAddOutfit(cid, 255, 1) end else doPlayerSendCancel(cid, "Você já tem esse outfit.") end return true end GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Março 11, 2017 8 anos Autor 3 horas atrás, Sekk disse: @jNo local s = 19000 function onUse(cid, item, itemEx, toPosition, fromPosition) if getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, s, 1) doPlayerSendTextMessage(cid, 22, "Parabéns! Você ganhou um novo outfit.") doSendMagicEffect(getCreaturePosition(cid), 30) doPlayerRemoveItem(cid, item.uid, 1) if getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 264, 1) else doPlayerAddOutfit(cid, 255, 1) end else doPlayerSendCancel(cid, "Você já tem esse outfit.") end return true end Broo, não da erro no distro, mas quando usa o item, ele não some, e o addon não adiciona (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 11, 2017 8 anos @jNo Seu action.xml ta como? Tem que estar assim: <action itemid="XXXX" event="script" value="arquivo.lua"/> local s = 19000 local i = -- muda aqui o id do item function onUse(cid, item, itemEx, toPosition, fromPosition) if getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, s, 1) doPlayerSendTextMessage(cid, 22, "Parabéns! Você ganhou um novo outfit.") doSendMagicEffect(getCreaturePosition(cid), 30) doPlayerRemoveItem(cid, i, 1) doPlayerAddOutfit(cid, coloca o id da outfit, n o type aqui, 1) else doPlayerSendCancel(cid, "Você já tem esse outfit.") end return true end Obs.: Tem linhas pra editar no script, edite Obs2.: 'local i' deve ser igual ao 'itemid' do actions.xml GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Março 11, 2017 8 anos Autor Esta igual o que você orientou, ainda sim não funciona (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 11, 2017 8 anos @jNo Me manda o jeito que está seu script, manda seu outfits.xml e a tag q ta no actions.xml GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
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.