• 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!

doCombat add skill

Laron25

New Member
Joined
Mar 28, 2010
Messages
127
Reaction score
2
Hello guys, i have problem with doCombat, i don't know why doCombat add skill to Axe. Can someone help me with that shit?

Code:
local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
    setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.0, 0, 1.0, 0)

function onUseWeapon(cid, var)
    if (getPlayerSkill(cid, 3) < 30) then
        return doCombat(cid, combat, var)
    end
end

Thanks,
LAron
 
Crazy script, attacker can use this spell only if his axe fighting is lower then 30. Doesn't matter what weapon he is holding.
Your character gets skill becouse it's onUseWeapon. That is the same as on attack.
If you holding an axe (items.xml attribute axe) you will always get a skill everytime you attack.

Get your item ID and find it in items.xml, then remove attribute axe line.
 
Back
Top Bottom