Postado Abril 17, 2018 7 anos Tenho um script que puxa uns bichos quando você usa um item em um certo tile, mas ele puxa muitos e muito rápido, precisava por uma exaustion de 1seg, alguém sabe como? Script: function onUse(cid, item, frompos, item2, topos) if item2.itemid == 2739 then doTransformItem(item2.uid,2737) doDecayItem(item2.uid) doCreateItem(2694,1,topos) elseif item2.itemid == 5471 then doTransformItem(item2.uid,5463) doDecayItem(item2.uid) doCreateItem(5467,1,topos) elseif item2.itemid == 806 then if math.random(1,5) == 1 then doSummonCreature("Rotworm", topos) else doSendMagicEffect(topos, 2) return 1 end else return 0 end return 1 end alguem?
Postado Abril 18, 2018 7 anos Solução function onUse(cid, item, frompos, item2, topos) local store,exausted = 986532,2 if item2.itemid == 2739 then doTransformItem(item2.uid,2737) doDecayItem(item2.uid) doCreateItem(2694,1,topos) elseif item2.itemid == 5471 then doTransformItem(item2.uid,5463) doDecayItem(item2.uid) doCreateItem(5467,1,topos) elseif item2.itemid == 806 then if math.random(1,5) == 1 and getPlayerStorageValue(cid, store) - os.time() <= 0 then doSummonCreature("Rotworm", topos) return setPlayerStorageValue(cid, store, os.time()+exausted) else return doSendMagicEffect(topos, 2) end end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 18, 2018 7 anos Autor 9 minutos atrás, Vodkart disse: function onUse(cid, item, frompos, item2, topos) local store,exausted = 986532,2 if item2.itemid == 2739 then doTransformItem(item2.uid,2737) doDecayItem(item2.uid) doCreateItem(2694,1,topos) elseif item2.itemid == 5471 then doTransformItem(item2.uid,5463) doDecayItem(item2.uid) doCreateItem(5467,1,topos) elseif item2.itemid == 806 then if math.random(1,5) == 1 and getPlayerStorageValue(cid, store) - os.time() <= 0 then doSummonCreature("Rotworm", topos) return setPlayerStorageValue(cid, store, os.time()+exausted) else return doSendMagicEffect(topos, 2) end end return true end @Vodkart como sempre sendo excelente ! Obrigado cara. REP+
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.