othereality 46 Postado Setembro 22, 2012 Share Postado Setembro 22, 2012 (editado) Galera eu tava querendo fazer o player ganhar +1 em um storage quando equipasse o item x, mas não consegui. Aqui vai o que eu tentei: function onEquip(cid, item, position, fromPosition) local int = getPlayerStorageValue(cid, 23224) setPlayerStorageValue(cid, 23224, int + 1) end E a tag que eu coloquei: <movevent type="Equip" itemid="2517" level="2" slot="shield" event="Equip" script="skills/shield of honour.lua"> <vocation id="0"/> <vocation id="5"/> </movevent> Não apresenta nenhum erro no cmd mas também não adiciona o storage. Editado Setembro 22, 2012 por OtheReality Link para o comentário https://xtibia.com/forum/topic/194720-move-event-ganha-storage-ao-equipar-o-item/ Compartilhar em outros sites More sharing options...
0 Skymagnum 234 Postado Setembro 22, 2012 Share Postado Setembro 22, 2012 function onEquip(cid, item, slot) if getPlayerStorageValue(cid, 23224) < 1 then setPlayerStorageValue(cid, 23224, getPlayerStorageValue(cid, 23224) + 1) end return true end function onDeEquip(cid, item, slot) if getPlayerStorageValue(cid, 23224) > 0 then setPlayerStorageValue(cid, 23224, getPlayerStorageValue(cid, 23224) - 1) end return true end Link para o comentário https://xtibia.com/forum/topic/194720-move-event-ganha-storage-ao-equipar-o-item/#findComment-1345641 Compartilhar em outros sites More sharing options...
0 othereality 46 Postado Setembro 22, 2012 Autor Share Postado Setembro 22, 2012 Não deu, acho que tem algum erro na minha tag '-' Link para o comentário https://xtibia.com/forum/topic/194720-move-event-ganha-storage-ao-equipar-o-item/#findComment-1345692 Compartilhar em outros sites More sharing options...
0 Skymagnum 234 Postado Setembro 22, 2012 Share Postado Setembro 22, 2012 <movevent type="Equip" itemid="2157" slot="shield" event="script" value="nome.lua"> <vocation id="0"/> <vocation id="5" showInDescription="0"/> Link para o comentário https://xtibia.com/forum/topic/194720-move-event-ganha-storage-ao-equipar-o-item/#findComment-1345712 Compartilhar em outros sites More sharing options...
0 othereality 46 Postado Setembro 22, 2012 Autor Share Postado Setembro 22, 2012 (editado) Finalmente!! Funcionou, só que tem que por o DeEquip na tag também se não quando tira não perde o storage. <movevent type="DeEquip" itemid="2517" slot="shield" event="script" value="skills/shield of honour.lua"/> <movevent type="Equip" itemid="2517" slot="shield" event="script" value="skills/shield of honour.lua"> <vocation id="0"/> <vocation id="5"/> </movevent> Obrigado pela ajuda! já dei o rep de hj, mas amanhã é seu. Editado Setembro 22, 2012 por OtheReality Link para o comentário https://xtibia.com/forum/topic/194720-move-event-ganha-storage-ao-equipar-o-item/#findComment-1345735 Compartilhar em outros sites More sharing options...
Pergunta
othereality 46
Galera eu tava querendo fazer o player ganhar +1 em um storage quando equipasse o item x, mas não consegui.
Aqui vai o que eu tentei:
E a tag que eu coloquei:
Não apresenta nenhum erro no cmd mas também não adiciona o storage.
Editado por OtheRealityLink para o comentário
https://xtibia.com/forum/topic/194720-move-event-ganha-storage-ao-equipar-o-item/Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados