Postado Janeiro 13, 2015 10 anos local config = { item1_id = 1543, item2_id = 1544, item1_pos = {x=761, y=1277, z=3, stackpos=1}, item2_pos = {x=762, y=1277, z=3, stackpos=1}, monster_pos = {x=755, y=1277, z=3}, storage = 64246 } function onUse(cid, item, frompos, item2, topos) local item1_thing = getThingfromPos(config.item1_pos) local item2_thing = getThingfromPos(config.item2_pos) if getPlayerStorageValue(cid, config.storage) >= 1 then if item.itemid == 1945 then if getPlayerStorageValue(cid, config.storage) == 1 then doSummonCreature("Ron the Ripper", config.monster_pos) doPlayerSetStorageValue(cid, config.storage, 2) end doTransformItem(item.uid, 1946) doRemoveItem(item1_thing.uid, 1) doRemoveItem(item2_thing.uid, 1) else doTransformItem(item.uid, 1945) doCreateItem(config.item1_id, 1, config.item1_pos) doCreateItem(config.item2_id, 1, config.item2_pos) end else doPlayerSendTextMessage(cid, 22, "You cannot use this") end return true end testa ai STYLLER OT 2022
Postado Janeiro 13, 2015 10 anos Autor @Suicide exatamente. @luanlucian93 Agora só sumona uma vez está certo. Só falta abrir o cercado quando puxa a alavanca que fecho. -------- Obs: testei com outro char e não funciona a alavanca =/ Editado Janeiro 13, 2015 10 anos por maleskinho (veja o histórico de edições)
Postado Janeiro 13, 2015 10 anos Solução Agora vai ... function onUse(cid, item, frompos, item2, topos) local x = { item1 = {1543, {x=761, y=1277, z=3, stackpos=1}}, item2 = {1544, {x=762, y=1277, z=3, stackpos=1}}, monster_pos = {x=755, y=1277, z=3}, storage = 64246 } if item.itemid == 1945 then if getPlayerStorageValue(cid, x.storage) < 1 then doSummonCreature("Ron the Ripper", x.monster_pos) doPlayerSetStorageValue(cid, x.storage, 1) end doTransformItem(item.uid, 1946) doRemoveItem(getThingfromPos(x.item1[2]).uid, 1) doRemoveItem(getThingfromPos(x.item2[2]).uid, 1) else doTransformItem(item.uid, 1945) doCreateItem(x.item1[1], 1, x.item2[2]) doCreateItem(x.item1[1], 1, x.item2[2]) end return true end STYLLER OT 2022
Postado Janeiro 13, 2015 10 anos Autor @luanluciano93 Funciono perfeito no inicio, mas depois ele buga o cercado e não abre. e aparece esse erro. Ta quase Editado Janeiro 13, 2015 10 anos por maleskinho (veja o histórico de edições)
Postado Janeiro 13, 2015 10 anos @luanluciano93 Funciono perfeito no inicio, mas depois ele buga o cercado e não abre. e aparece esse erro. Ta quase Tenta assim: function onUse(cid, item, frompos, item2, topos) local x = { item1 = {1543, {x=761, y=1277, z=3, stackpos=1}}, item2 = {1544, {x=762, y=1277, z=3, stackpos=1}}, monster_pos = {x=755, y=1277, z=3}, storage = 64246 } if item.itemid == 1945 then if getPlayerStorageValue(cid, x.storage) < 1 then doSummonCreature("Ron the Ripper", x.monster_pos) doPlayerSetStorageValue(cid, x.storage, 1) end doTransformItem(item.uid, 1946) doRemoveItem(getThingFromPos(x.item1[2]).uid, 1) doRemoveItem(getThingFromPos(x.item2[2]).uid, 1) else doTransformItem(item.uid, 1945) doCreateItem(x.item1[1], 1, x.item2[2]) doCreateItem(x.item1[1], 1, x.item2[2]) end return true end _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
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.