Postado Maio 4, 2015 10 anos Boa Tarde, Estou tentando criar um Actions que doma a montaria fora a que já vem no servidor, mais não sei o que tem de errado =( Configurações; Actions.xml <action itemid="13537" script="other/donkey.lua"/> - ID do item que doma = 13537 donkey.lua local monster = "donkey" function onUse(cid, item, frompos, itemEx, topos ) if itemEx.itemid == id then doPlayerAddMount(cid, 13) doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.") doPlayerRemoveItem(cid, 13537, 1) else doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.") end return true end OBS: Não da erro algum na distro, quando eu vou dar use no item e clico no Donkey aparece essa msg e não adiciona o monstro =/ Msg que aparece Sorry, you already have that ride. abs
Postado Maio 4, 2015 10 anos Tenta assim : local id = 13937 function onUse(cid, item, frompos, item2, topos ) if item2.itemid == id then doPlayerAddMount(cid, 13) doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.") doPlayerRemoveItem(cid, item.uid, 1) else return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.") end return true end Editado Maio 4, 2015 10 anos por Stinger (veja o histórico de edições)
Postado Maio 4, 2015 10 anos Autor Tenta assim : local id = 13937 function onUse(cid, item, frompos, item2, topos ) if item2.itemid == id then doPlayerAddMount(cid, 13) doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.") doPlayerRemoveItem(cid, item.uid, 1) else return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.") end return true end assim ele não vai usar no monstro que é o certo =(
Postado Maio 4, 2015 10 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de OTServ Geral" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
Postado Maio 4, 2015 10 anos local monster, storage = "donkey", 5918 function onUse(cid, item, frompos, itemEx, topos) if getPlayerStorageValue(cid, storage) > -1 then return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.") elseif not isMonster(itemEx.uid) then return doPlayerSendCancel(cid, "Use this in a monster.") elseif getCreatureName(itemEx.uid):lower() ~= monster then return doPlayerSendCancel(cid, "Use this in "..monster..".") end doPlayerAddMount(cid, 13) doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.") doRemoveItem(item.uid, 1) setPlayerStorageValue(cid, storage, 1) return true end
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.