Ir para conteúdo
  • 0

Magia de 3 tempos


JGNoya

Pergunta

Vi um tutorial bom ensinando a fazer spells e tals , ai seguindo o que eu aprendi fiz uma magia de 3 áreas , configurei pra dar dano 3 vezes e mostrar 3 efeitos diferentes . Depois que eu testei a magia já pronta ela da dano 3 vezes mas só aparece 2 efeitos , tentei fazer o script novamente e agora mostra os 3 efeitos só que só da dano uma vez. Alguém podia ver o que está errado ou arrumar pf sou novo com scripts então fica meio complicado '-'

Esse script hita 3 vezes mas só aparece 2 efeitos :

local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 19)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
local condition1 = createConditionObject(CONDITION_PARALYZE)
--setConditionParam(condition1, CONDITION_PARAM_SPEED, -500)
setConditionFormula(condition1, -0.8, 0, -0.8, 0)
setCombatCondition(combat1, condition1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 18)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setConditionParam(condition2, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition2, 10, 2000, -80)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 24)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setConditionParam(condition3, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition3, 10, 2000, -80)
setCombatCondition(combat3, condition3)

arr1 = {
{1, 1, 0, 1, 1, 1, 1, 1, 0,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1, 1, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)

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 function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell2, 500, parameters)

return true
end

 



E esse é o dos 3 efeitos e 1 hit :

local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setCombatCondition(combat1, condition1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 21)
setCombatFormula(combat2, COMBAT_FORMULA_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat3, COMBAT_FORMULA_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setCombatCondition(combat3, condition3)

arr1 = {
{1, 1, 0, 1, 1, 1, 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, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)

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 function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3 }
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 250, parameters)
addEvent(onCastSpell3, 350, parameters)

return true
end

 




			
		
Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

Tenta:

local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 19)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
local condition1 = createConditionObject(CONDITION_PARALYZE)
--setConditionParam(condition1, CONDITION_PARAM_SPEED, -500)
setConditionFormula(condition1, -0.8, 0, -0.8, 0)
setCombatCondition(combat1, condition1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 18)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setConditionParam(condition2, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition2, 10, 2000, -80)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 24)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -100.5, -200, -100.5, -200)
setConditionParam(condition3, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition3, 10, 2000, -80)
setCombatCondition(combat3, condition3)

arr1 = {
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
{1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1}
}

arr2 = {
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
{1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1}
}

arr3 = {
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
{1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)

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 function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 500, parameters)

return true
end

VC se complico aqui e repitiu o "onCastSpell2" addEvent(onCastSpell3, 500, parameters)

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...