Ir para conteúdo
  • 0

Colocar Muted Nessa Spell


Allangod

Pergunta

Olá.

Gostaria de pedir que algum de vocês pudessem colocar um muted nessa minha spell.

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 175)

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_NONEDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 180)

function onGetFormulaValues(cid, level, maglevel)

min = -((level*1 + maglevel*2.1) + 250)

max = -((level*1 + maglevel*2.3) + 250)

return min, max

end

 

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 175)

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_NONEDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, 180)

function onGetFormulaValues(cid, level, maglevel)

min = -((level*1 + maglevel*2.1) + 250)

max = -((level*1 + maglevel*2.3) + 250)

return min, max

end

 

setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

 

 

 

 

local arr1 = {

{0, 0, 0},

{0, 0, 0},

{0, 0, 0},

{0, 3, 0},

{0, 0, 0},

{0, 0, 0},

{0, 0, 0},

}

 

local arr2 = {

{0, 0, 0},

{0, 0, 0},

{0, 0, 0},

{0, 3, 0},

{0, 0, 0},

{0, 0, 0},

{0, 0, 0},

}

 

 

 

 

local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

 

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

 

local function onCastSpell1(parameters)

doCombat(parameters.cid, parameters.combat1, parameters.var)

end

 

local function onCastSpell2(parameters)

doCombat(parameters.cid, parameters.combat2, parameters.var)

end

 

local teleport = {x=625, y=986, z=7} -- Coordenadas para onde o player irá ser teleportado.

local target = {x=625, y=982, z=7} --

 

local players = {}

 

function voltar(cid, target2)

 

local pp = players[cid]

local mp = players[target2]

doTeleportThing(cid,pp)

doTeleportThing(target2, mp)

doSendMagicEffect(pp, 175)

doSendMagicEffect(mp, 175)

exhaustion.set(cid, 23028, 60)

players[cid] = nil

players[target2] = nil

 

return true

end

 

function onCastSpell(cid, var)

if exhaustion.get(cid, 23008) == false then

local target2 = getCreatureTarget(cid)

local playerpos = getCreaturePosition(target2)

local monsterpos = getCreaturePosition(target2)

doTeleportThing(cid,teleport)

doTeleportThing(target2, target)

doSendMagicEffect(teleport, 175)

doSendMagicEffect(target, 175)

exhaustion.set(cid, 23028, 60)

exhaustion.set(target2, 23028, 60)

players[cid] = playerpos

players[target2] = monsterpos

local parameters = { cid = cid, var = var,combat1 = combat1, combat2 = combat2 }

addEvent(onCastSpell1, 100, parameters)

addEvent(onCastSpell2, 1000, parameters)

addEvent(onCastSpell2, 2000, parameters)

addEvent(onCastSpell2, 3000, parameters)

addEvent(onCastSpell2, 4000, parameters)

addEvent(onCastSpell2, 5000, parameters)

addEvent(onCastSpell2, 6000, parameters)

addEvent(onCastSpell2, 7000, parameters)

addEvent(onCastSpell2, 8000, parameters)

addEvent(onCastSpell2, 8900, parameters)

addEvent(voltar, 30*1000, cid, target2)

return true

else

doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23028).."]")

end

 

end

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...