Ir para conteúdo
  • 0

Magia sem exhasted


GuuhMaster

Pergunta

local combatx = createCombatObject()

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 30)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 39)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.6, 0)

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 39)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.6, 0)

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 255)

setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 35)

local arr1 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},

{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},

{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},

{0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0},

{0, 0, 1, 0, 1, 3, 1, 0, 1, 0, 0},

{0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0},

{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},

{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},

{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

local arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},

{0, 0, 1, 1, 0, 1, 0, 1, 1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atArea(arr1)

local area2 = createCombatArea(arr2)

local area3 = createCombatArea(arr3)

local area4 = createCombatArea(arr4)

local areax = createCombatArea(arr1)

local areax = createCombatArea(arr2)

setCombatArea(combatx, area1)

setCombatArea(combatx, area2)

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

setCombatArea(combat3, area3)

function onTargetTile(cid, pos)

doCombat(cid,combat1,positionToVariant(pos))

end

setCombatCallback(combatx, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

local function onCastSpell1(parameters)

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

end

local function onCastSpell2(parameters)

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

end

local function onCastSpell3(parameters)

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

end

local function onCastSpell4(parameters)

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

end


function onCastSpell(cid, var)

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

addEvent(onCastSpell1, 100, parameters)

addEvent(onCastSpell2, 1000, parameters)

addEvent(onCastSpell3, 100, parameters)

addEvent(onCastSpell4, 1000, parameters)

end







A MAGIA ACIMA NÃO ESTÁ APARECENDO O NOME AO SER USADA, E TAMBÉM ESTÁ SEM EXHAUSTED.


AGRADECERIA QUEM PUDESSE ARRUMA-LA.

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

Brother o exhauster da magia se defini em sua tag e não na própria spell.

 

Vá em spells.xml e verifique se ele está registrada.

 

Exemplo: <instant name="Groundshaker" words="exori mas" lvl="33" mana="160" prem="0" needweapon="1" exhaustion="2000" groups="1,2000" icon="106" needlearn="0" event="script" value="attack/groundshaker.lua">

Link para o comentário
Compartilhar em outros sites

  • 0

pra aparecer o nome falto um return true no final

 

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 1000, parameters)
addEvent(onCastSpell3, 100, parameters)
addEvent(onCastSpell4, 1000, parameters)
return true
end
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...