Ir para conteúdo

[Pedido] Bow De 2 Elementos


lucasy1995

Posts Recomendados

Eu to com um script aqui q em um ot antigo tava funfando, mas migrei pra outro e agora n esta, tipo era pro arco lançar uma arrow e hitar 2 hits, um de ice e outro physical, mas só ta hitando ice, olha o script:

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 3, 0, 3, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 4, 0, 4, 0)

local function onUseWeapon1(parameters)

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

end

 

local function onUseWeapon2(parameters)

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

end

 

function onUseWeapon(cid, var)

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

 

addEvent(onUseWeapon1, 0, parameters)

addEvent(onUseWeapon2, 0, parameters)

 

 

end

Link para o comentário
Compartilhar em outros sites

se esqueceu do function onuseweapon1

ta ae

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 3, 0, 3, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 4, 0, 4, 0)

 

local function onUseWeapon1(parameters)

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

end

 

 

local function onUseWeapon2(parameters)

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

end

 

function onUseWeapon(cid, var)

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

addEvent(onUseWeapon1, 0, parameters)

addEvent(onUseWeapon2, 0, parameters)

end

 

Editado por lordbug99
Link para o comentário
Compartilhar em outros sites

tenta assim

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 34)

setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 3, 0, 3, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)

setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 4, 0, 4, 0)

 

local function onUseWeapon1(parameters)

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

end

 

 

local function onUseWeapon2(parameters)

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

end

 

function onUseWeapon(cid, var)

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

addEvent(onUseWeapon1, 0, parameters)

addEvent(onUseWeapon2, 100, parameters)

end

 

Editado por lordbug99
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...