Postado Maio 12, 2018 7 anos está dando esse erro em umas de minhas spells: Citar o que pode ser esse problema? local toPos = {x = 1517, y = 756, z = 7} --pos para onde o player vai ser teleportado local newPos = {x = 1517, y = 758, z = 7} --pos para inimigo local time = 30 local function teleport(cid, pos) if isCreature(cid) then doTeleportThing(cid, getClosestFreeTile(cid, pos)) doSendMagicEffect(getPlayerPosition(cid), 215) end end function onCastSpell(cid, var) if exhaustion.check(cid, 23083) == false then exhaustion.set(cid, 23083, 120) else doPlayerSendCancel(cid, "A Habilidade esta em tempo de recarga espere " ..exhaustion.get(cid, 23083).." segundos.") return false end local target = getCreatureTarget(cid) if not isCreature(target) then return doPlayerSendTextMessage(cid, 27, "Ataque um jogador para utilizar essa habilidade.") end local posTarget = getPlayerPosition(target) doTeleportThing(cid, toPos, false) teleport(target, newPos) addEvent(teleport, time*1000, cid, posTarget) addEvent(teleport, time*1000, target, posTarget) doSendMagicEffect(pos, 215) return true end
Postado Maio 12, 2018 7 anos local toPos = {x = 1517, y = 756, z = 7} --pos para onde o player vai ser teleportado local newPos = {x = 1517, y = 758, z = 7} --pos para inimigo local time = 30 local function teleport(cid, pos) if isCreature(cid) then doTeleportThing(cid, getClosestFreeTile(cid, pos)) doSendMagicEffect(getPlayerPosition(cid), 215) end end function onCastSpell(cid, var) if exhaustion.check(cid, 23083) == false then exhaustion.set(cid, 23083, 120) else doPlayerSendCancel(cid, "A Habilidade esta em tempo de recarga espere " ..exhaustion.get(cid, 23083).." segundos.") return false end local target = getCreatureTarget(cid) if not isCreature(target) then return doPlayerSendTextMessage(cid, 27, "Ataque um jogador para utilizar essa habilidade.") end local posTarget = getPlayerPosition(target) doTeleportThing(cid, toPos, false) teleport(target, newPos) addEvent(teleport, time*1000, cid, posTarget) addEvent(teleport, time*1000, target, posTarget) doSendMagicEffect(posTarget, 215) return true end
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.