Ir para conteúdo
  • 0

Help Spells


juniinhocadete

Pergunta

TEMO COMO ALGUEM TRIPLICA ESSA SPELLS :

 

local scom1 = createCombatObject()

local scom2 = createCombatObject()

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)

setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 18, 15, 6.0, -9)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)

setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 0.0, 0)

 

arr1 = {

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

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

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

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

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

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

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

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

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

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

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

}

 

arr2 = {

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

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

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

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

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

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

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

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

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

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

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

}

 

local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

setCombatArea(scom1, area1)

setCombatArea(scom2, area2)

 

function onTargetTile(cid, pos)

doCombat(cid,combat1,positionToVariant(pos))

end

 

function onTargetTile2(cid, pos)

doCombat(cid,combat2,positionToVariant(pos))

end

 

setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

 

local function onCastSpell1(parameters)

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

end

 

local function onCastSpell2(parameters)

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

end

 

function onCastSpell(cid, var)

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

addEvent(onCastSpell1, 100, parameters)

addEvent(onCastSpell2, 200, parameters)

 

return TRUE

end

-------------------------

 

 

AJUDA = REP+

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Triplicar em que sentido? O número de hits? Se for isso, segue abaixo:

 


local scom1 = createCombatObject()
local scom2 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 18, 15, 6.0, -9)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 9)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 0.0, 0)

arr1 = {
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}
}

arr2 = {
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)

function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end

setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end

function onCastSpell(cid, var)
local parameters = {cid = cid, var = var}

for i = 1, 3 do
addEvent(onCastSpell1, 100 * i, parameters)
addEvent(onCastSpell2, 200 * i, parameters)
end

return TRUE
end

Link para o comentário
Compartilhar em outros sites

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