Postado Fevereiro 19, 2019 7 anos Pessoal adaptei esse Jutsu já existente que funciona assim : um player ao usar, nasce um teleport debaixo dele que leva para tal mundo , depois de alguns segundos o tp some. lá nesse local tem um teleport para sair e voltar para a posiçao onde foi criada a primeira fez o jutsu se chama Kamui no jutsu. Qual problema: alguns players não conseguem voltar a posiçao onde foi criado o tp e ficam preso nesse mundo. Script : local enter = {x = 1249, y = 731, z = 6} local combat = createCombatObject() function removeTeleport(PlayerPos) tp = getTileItemById(PlayerPos, 5023).uid doRemoveItem(tp, 1) doSendMagicEffect(PlayerPos, 2) end function onCastSpell(cid, var) local PlayerPos = getCreaturePosition(cid) local from1,to1 = {x=1222, y=709, z=6},{x=1276, y=744, z=6} local from2,to2 = {x=979, y=911, z=7},{x=994, y=918, z=7} local from3,to3 = {x=1964, y=731, z=7},{x=1976, y=742, z=7} local from4,to4 = {x=1019, y=921, z=5},{x=1033, y=924, z=5} local from5,to5 = {x=663, y=1098, z=7},{x=685, y=1104, z=7} local from6,to6 = {x=965, y=1483, z=7},{x=979, y=1494, z=7} local from7,to7 = {x=1161, y=1177, z=7},{x=1167, y=1188, z=7} local from8,to8 = {x=1223, y=710, z=5},{x=1277, y=745, z=5} local from9,to9 = {x=1224, y=710, z=4},{x=1228, y=715, z=4} local from10,to10 = {x=1224, y=710, z=3},{x=1228, y=712, z=3} local from11,to11 = {x=979, y=911, z=7},{x=994, y=918, z=7} if isInRange(PlayerPos, from1, to1) then doPlayerSendCancel(cid, "Você ja esta dentro do Kamui!") return FALSE end if isInRange(PlayerPos, from2, to2) or isInRange(PlayerPos, from3, to3) or isInRange(PlayerPos, from4, to4) or isInRange(PlayerPos, from5, to5) or isInRange(PlayerPos, from6, to6) or isInRange(PlayerPos, from7, to7) or isInRange(PlayerPos, from8, to8) or isInRange(PlayerPos, from9, to9) or isInRange(PlayerPos, from10, to10, from11, to11) then doPlayerSendCancel(cid, "Você nao pode usar o Kamui no Jutsu aqui!") return FALSE end if getTileInfo(getThingPos(cid)).pvp then doPlayerSendCancel(cid, "Você nao pode usar o Kamui no Jutsu aqui!") return FALSE end if exhaustion.check(cid, 5570) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 5570) .. " segundos para usar novamente.") return FALSE end local pos = getCreaturePosition(cid) exhaustion.set(cid, 5570, 60) doSendMagicEffect(PlayerPos, 196) doCreateTeleport(5023, enter, pos) setPlayerStorageValue(cid, 5020, PlayerPos.x) setPlayerStorageValue(cid, 5021, PlayerPos.y) setPlayerStorageValue(cid, 5022, PlayerPos.z) local tp = getTileItemById(pos, 5023).uid doItemSetAttribute(tp, "aid", 5560) addEvent(removeTeleport, 5000, pos) return doCombat(cid, combat, var) end Movements: Citar function onStepIn(cid, item, position, fromPosition) if exhaustion.check(cid, 5570) == TRUE then doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 5570) .. " segundos para voltar.") return TRUE end local tp = {x=getPlayerStorageValue(cid, 5020), y=getPlayerStorageValue(cid, 5021), z=getPlayerStorageValue(cid, 5022)} doTeleportThing(cid, tp) return TRUE end Editado Fevereiro 19, 2019 7 anos por leozincorsair rz (veja o histórico de edições)
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.