Lua Donate star (Viper star) to much damge

dunnish

Premium User
Premium User
Joined
Jun 18, 2009
Messages
260
Best answers
1
Reaction score
2
Hello!
the viper star do to much damge.
the player hit arround 1k damge on mobs.
i dont remmber since it was long time ago i change this thing.


Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_GREENSTAR)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 1, 1.5, 2)

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, -2)
addDamageCondition(condition, 6, 2000, -1)
setCombatCondition(xCombat, condition)

function onUseWeapon(cid, var)
    local ret = doCombat(cid, combat, var)
    if(ret == false) then
        return false
    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
 

namco

Alienbutserious
Joined
Sep 5, 2010
Messages
128
Best answers
2
Reaction score
33
Lua:
-- Skill based damage
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 1, 1.5, 2)
Usage (TY @AGS):
setCombatFormula(combat, COMBAT_FORMULA_SKILL, mina, minb, maxa, maxb)

minDamage = minb
maxDamage = Normal Weapon Damage * maxa + maxb

/\ THOSE FORMULAS MAY VARY
CHECK YOUR combat.cpp (search for FORMULA_SKILL)
 
Top