Postado Setembro 23, 2016 8 anos Olá, alguem poderia me ajudar nesse script, ele funciona certinho sem erros tals. mais eu queria que quando o monstro morresse.. nascesse o teleporte com a contagem regressiva em cima dele( 30, 29, 28...), ficarei muito grato se alguem me ajudasse. creaturescript.. local tpId = 1387 local tps = { ["Zugurosh"] = {pos = {x=1478, y=879, z=7}, toPos = {x=1491, y=874, z=7}, time = 30}, } function removeTp(tp) local t = getTileItemById(tp.pos, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(tp.pos, CONST_ME_POFF) end end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) doBroadcastMessage("O Zugurosh foi morto. O teleporte irá desaparecer em "..tp.time.." segundos.", 19) addEvent(removeTp, tp.time*1000, tp) end return TRUE end
Postado Setembro 25, 2016 8 anos local tpId = 1387 local tps = { ["Zugurosh"] = {pos = {x=1478, y=879, z=7}, toPos = {x=1491, y=874, z=7}, time = 30}, } function removeTp(tp) local t = getTileItemById(tp.pos, tpId).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(tp.pos, CONST_ME_POFF) end function CountTpTime(pos, delay) doSendAnimatedText(pos, delay, 145) if delay ~= 1 then addEvent(CountTpTime, 1000, pos, delay-1) end end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) CountTpTime(tp.pos, tp.time) doBroadcastMessage("O Zugurosh foi morto. O teleporte irá desaparecer em "..tp.time.." segundos.", 19) addEvent(removeTp, tp.time*1000, tp) end return TRUE end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.