Postado Maio 26, 2018 7 anos Eu to com uma script de uma spells e eu queria que quando o player usasse ela em outro player ele desse uma LookType por x segundos qual variavel eu poderia inserir na minha spells?
Postado Maio 27, 2018 7 anos @Jociel function onCastSpell(cid, var) local target = getCreatureTarget(cid) local outfit = { lookType = 10 } -- ID da looktype local time = 10 -- Segundos que a outfit durará if target then doSetCreatureOutfit(target, outfit, time * 1000) return true end end
Postado Maio 27, 2018 7 anos Autor @Sttorm Eu botei mais a magia nao pegou e nao consta nenhum erro na distro se possivel bota ai pra mim function onCastSpell(cid, var) local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local tsuku ={x = 103, y = 1780, z = 7} local alvo = {x = 103, y = 1777, z = 7} local from1,to1 = {x=97, y=1773, z=7},{x=109, y=1785, z=7} local from2,to2 = {x=979, y=911, z=7},{x=994, y=918, z=7} local from3,to3 = {x=557, y=1029, z=6},{x=573, y=1044, z=6} if isInRange(pos, from1, to1) then doPlayerSendCancel(cid, "Você ja esta !") return FALSE end if isInRange(pos, from2, to2) or isInRange(pos, from3, to3) then doPlayerSendCancel(cid, "Você nao pode usar !") return FALSE end if getTileInfo(getThingPos(cid)).pvp then doPlayerSendCancel(cid, "Você nao pode aqui!") return FALSE end if exhaustion.check(cid, 13132) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 13132) .. " segundos para usar novamente.") return FALSE end local function Teleport_Player(cid) doTeleportThing(cid, pos) end local function Teleport_Target(target) doCreatureSetNoMove(target, 0) doTeleportThing(target, targetpos) end local mob_player = getTopCreature({x=x, y=y, z=from1.z}).uid if mob_player ~= 0 and isPlayer(mob_player) then doTeleportThing(cid, pos) end end end end local function Teleport_Target_Emergency() for x = from1.x, to1.x do for y = from1.y, to1.y do end end if isPlayer(target) then exhaustion.set(cid, 13132, 20) doSendMagicEffect(alvo, 182) doCreatureSay(cid, "...!", TALKTYPE_MONSTER) addEvent(Teleport_Player, 15000, cid) addEvent(Teleport_Target, 15000, target) addEvent(Teleport_Player_Emergency, 20000) addEvent(Teleport_Target_Emergency, 20000) end Editado Maio 27, 2018 7 anos por Jociel (veja o histórico de edições)
Postado Maio 27, 2018 7 anos Solução @Jociel local tempo = 60 local outfit = {lookType = 320, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} function onCastSpell(cid, var) local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local tsuku ={x = 103, y = 1780, z = 7} local alvo = {x = 103, y = 1777, z = 7} local from1,to1 = {x=97, y=1773, z=7},{x=109, y=1785, z=7} local from2,to2 = {x=979, y=911, z=7},{x=994, y=918, z=7} local from3,to3 = {x=557, y=1029, z=6},{x=573, y=1044, z=6} if isInRange(pos, from1, to1) then doPlayerSendCancel(cid, "Você ja esta !") return FALSE end if isInRange(pos, from2, to2) or isInRange(pos, from3, to3) then doPlayerSendCancel(cid, "Você nao pode usar !") return FALSE end if getTileInfo(getThingPos(cid)).pvp then doPlayerSendCancel(cid, "Você nao pode aqui!") return FALSE end if exhaustion.check(cid, 13132) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 13132) .. " segundos para usar novamente.") return FALSE end local function Teleport_Player(cid) doTeleportThing(cid, pos) end local function Teleport_Target(target) doCreatureSetNoMove(target, 0) doTeleportThing(target, targetpos) end local function Teleport_Player_Emergency() for x = from1.x, to1.x do for y = from1.y, to1.y do local mob_player = getTopCreature({x=x, y=y, z=from1.z}).uid if mob_player ~= 0 and isPlayer(mob_player) then doTeleportThing(cid, pos) end end end end local function Teleport_Target_Emergency() for x = from1.x, to1.x do for y = from1.y, to1.y do local mob_target = getTopCreature({x=x, y=y, z=from1.z}).uid if mob_target ~= 0 and isPlayer(mob_target) then doCreatureSetNoMove(target, 0) doTeleportThing(target, targetpos) end end end end if isPlayer(target) then exhaustion.set(cid, 13132, 20) doSetCreatureOutfit(target, outfit, tempo * 1000) doCreatureSetNoMove(target, 1) doTeleportThing(cid,tsuku) doTeleportThing(target,alvo) doSendMagicEffect(alvo, 182) doCreatureSay(cid, "...!", TALKTYPE_MONSTER) addEvent(Teleport_Player, 15000, cid) addEvent(Teleport_Target, 15000, target) addEvent(Teleport_Player_Emergency, 20000) addEvent(Teleport_Target_Emergency, 20000) else doPlayerSendCancel(cid, "Use apenas em players.") end end
Postado Maio 27, 2018 7 anos Autor @Sttorm Perfeito! Vlw Obrigado pela ajuda Editado Maio 27, 2018 7 anos por Jociel (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.