Quero alterar o atack dessa knife, arma de paladin,
A tag da minha KNIFE VIP é Este:
<distance id="2410" event="script" value="knife.lua"/>
Bom o script da minha KNIFE VIP é este:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGKNIFE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1.0, 0)
local xCombat = createCombatObject()
setCombatParam(xCombat, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 4, 2000, -50)
addDamageCondition(condition, 6, 2000, -50)
setCombatCondition(xCombat, condition)
function onUseWeapon(cid, var)
local ret = doCombat(cid, combat, var)
if(ret == LUA_ERROR) then
return LUA_ERROR
end
local target = variantToNumber(var)
if(target ~= 0) then
-- chance to poison the enemy
local chance = math.random(0, 100)
if(chance > 90) then
ret = doCombat(cid, xCombat, var)
end
end
return ret
end
Mais ela esta ritando demais, gostaria de abaichar o rit dela, eu acho que e em setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1.0, 0)
mais nao intendo este linha:
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1.0, 0)
Gostaria que alguem me explicasse, agradeço, e obrigado.