Postado Outubro 13, 2014 10 anos Tente esse:transformsword.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local firstid, secondid, str, time = 8931, 8932, 18930, 5 if exhaustion.check(cid, str) then doPlayerSendCancel(cid, "Você só pode transformar sua arma de ".. time .." em ".. time .." segundos.") return 1 end if item.itemid == firstid then exhaustion.set(cid, str, time) doRemoveItem(item.uid, 1) doPlayerAddItem(cid, secondid, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você transformou um(a) ".. getItemName(firstid) .." em um(a) ".. getItemName(secondid) ..".") elseif item.itemid == secondid then exhaustion.set(cid, str, time) doRemoveItem(item.uid, 1) doPlayerAddItem(cid, firstid, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você transformou um(a) ".. getItemName(secondid) .." em um(a) ".. getItemName(firstid) ..".") end return 1 end Tag em actions.xml: <action itemid="8931;8932" event="script" value="transformsword.lua"/> Editado Outubro 13, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
Postado Outubro 13, 2014 10 anos Autor Tá dando erro de duplicated id no Actions :x Nem todo loop infinito é ruim ;P User *eu = new User("otteN"); RepSystem<User> *myRep = new RepSystem<User>("jóinha"); myRep->setAlvo(eu); /* só por ser criado já sou o melhor membro */ while(eu->isMelhorMembro()){ myRep->reputar(); }
Postado Outubro 13, 2014 10 anos Tá dando erro de duplicated id no Actions :x Isso significa que você adicionou mais de uma tag com o mesmo ID. Verifique se não há outra tag utilizando os mesmos IDS das swords em seu actions.xml. The corrupt fear us. The honest support us. The heroic join us.
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.