Postado Julho 27, 2020 4 anos Preciso de ajuda, esse script ele teletransporta tudo certinho, mas quando a gente vai pra area, fica dando uma mensagem onde não dá pra atacar o player Alguém me ajuda? REP+++ Mostrar conteúdo oculto Script: local t = { time = 15, -- em segundos points = 70, -- aumento do skill storage = 15288, -- só modifique se necessário waittime = 1, -- em segundos tile = { [1] = {x=1509, y=1261, z=7}, -- posição do player [2] = {x=1509, y=1255, z=7} -- posição do alvo }, not_allowed_areas = { -- áreas não permitidas para soltar a magia [1] = {{x=1509, y=1259, z=7},{x=1509, y=1255, z=7}}, -- from, to [2] = {{x=979, y=911, z=7}, {x=994, y=918, z=7}}, [3] = {{x=1514, y=1262, z=7}, {x=1504, y=1253, z=7}}, [4] = {{x=1552, y=1254, z=7}, {x=1561, y=1262, z=7}}, [5] = {{x=979, y=911, z=7}, {x=994, y=918, z=7}}, [6] = {{x=1156, y=1192, z=7}, {x=1172, y=1172, z=7}}, [7] = {{x=664, y=1096, z=7}, {x=685, y=1104, z=7}}, [8] = {{x=1553, y=1254, z=7}, {x=1562, y=1262, z=7}}, [9] = {{x=1133, y=1039, z=12}, {x=972, y=873, z=12}}, [10] = {{x=1133, y=1039, z=11}, {x=972, y=873, z=11}}, [11] = {{x=1133, y=1039, z=10}, {x=972, y=873, z=10}} } } local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, t.time*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, t.points) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, t.points) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, t.points) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, t.points) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, t.points) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, t.points) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, t.points) function onCastSpell(cid, var) if exhaustion.check(cid, t.storage) then doPlayerSendCancel(cid, "Você precisa esperar "..exhaustion.get(cid, t.storage).. " segundos para usar novamente!") return false end local p, check = getCreaturePosition(cid), true for _, area in pairs(t.not_allowed_areas) do if isInRange(p, area[1], area[2]) then check = false break end end if not check then doPlayerSendCancel(cid, "Você nao pode usar o Tsukuyomi World aqui!") return false end local target = getCreatureTarget(cid) if not isPlayer(target) then doPlayerSendCancel(cid, "Você so pode usar essa magia em players!") return false end local targetPos = getCreaturePosition(target) exhaustion.set(cid, t.storage, t.waittime) doAddCondition(cid, condition) doCreatureSetNoMove(target, true) doTeleportThing(cid, t.tile[1]) doTeleportThing(target, t.tile[2]) doSendMagicEffect(targetPos, CONST_ME_POFF) addEvent(function() if isPlayer(cid) then doTeleportThing(cid, p) end if isPlayer(target) then doTeleportThing(target, targetPos) doCreatureSetNoMove(target, false) end end, t.time * 1000) 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.