Jump to content

[Encerrado] [Duvida] Spells.


endreox

Recommended Posts

Ola Vim aqui de novo só para perguntar uma duvida , Uma o roksas Tirou , mas ainda tenho uma ,

 

tenho esta spells > local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.5, 0)

 

 

function onCastSpell(cid, var)

return doCombat(cid, combat, var)

end

 

 

Como mostra na script ela lança uma a cada 5 secs de exaustion Gostaria de faze lá lançar 10 , Como o roksas mandou uma script testei ela lanço 2 seguida do efect certo , mas logo depois lançou o efect da outra , mesmo eu trocando em tão oque eu coloco para lançar 10 desse efect msm? obrigado valendo Rep+

Edited by endreox
Link to comment
Share on other sites

Amigo, podia perguntar isso no outro tópico, mas tudo bem.

~~

 

Você havia postado esse script:

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

 

 

 

 

 

 

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

 

local function onCastSpell4(parameters)

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

end

 

local function onCastSpell5(parameters)

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

end

 

 

 

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,combat4 = combat4,combat5 = combat5,}

 

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

 

end

 

 

 

mt bem.

 

Em seguida pediu 5 atks seguidos, fiz assim:

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

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

 

local function onCastSpell4(parameters)

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

end

 

local function onCastSpell5(parameters)

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

end

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,combat4 = combat4,combat5 = combat5,}

 

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

end

 

 

Mas ai pediu agora com 10, não entendi mt bem o erro que deu. Me explique melhor com mais detalhes

Link to comment
Share on other sites

Amigo, podia perguntar isso no outro tópico, mas tudo bem.

~~

 

Você havia postado esse script:

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

 

 

 

 

 

 

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

 

local function onCastSpell4(parameters)

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

end

 

local function onCastSpell5(parameters)

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

end

 

 

 

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,combat4 = combat4,combat5 = combat5,}

 

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

 

end

 

 

 

mt bem.

 

Em seguida pediu 5 atks seguidos, fiz assim:

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

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

 

local function onCastSpell4(parameters)

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

end

 

local function onCastSpell5(parameters)

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

end

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,combat4 = combat4,combat5 = combat5,}

 

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

end

 

 

Mas ai pediu agora com 10, não entendi mt bem o erro que deu. Me explique melhor com mais detalhes

há minha duvida erra tipo eu penhei a script se me deu peguei pus ela em 1que soltava 1 por vez , ela solto mas o efecct erra da outra eu troquei mas não troquie distanci efect poriso , mas ai notei que as outras erra diferente peguei o efect distance dela fiz isso olha

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

 

function onCastSpell(cid, var)

return doCombat(cid, combat, var)

end

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 233)

setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 30)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -3.4, 0, -3.4, 0)

 

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

 

local function onCastSpell4(parameters)

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

end

 

local function onCastSpell5(parameters)

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

end

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,combat4 = combat4,combat5 = combat5,}

 

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

end

 

Deu certinho , duvida sanada s2 você me deu uma grande mão cara.

Link to comment
Share on other sites

  • 5 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...