• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Donate star (Viper star) to much damge

dunnish

New Member
Joined
Jun 18, 2009
Messages
262
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
139
Best answers
2
Reaction score
35
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