Wifebeater
New Member
- Joined
- Feb 24, 2011
- Messages
- 60
- Reaction score
- 1
Hello, i have a 8.6 server. And i want to create a paralyze axe.
This is what i wrote in weapons.xml
And here's the script
I want it to paralyze like every 10th hit or something. But it doesnt work. i keep hitting and nothing happends :S Anybody got any idea what i did wrong?
This is what i wrote in weapons.xml
Code:
<melee id="8924" level="110" unproperly="1" event="script" value="paraaxe.lua"/>
And here's the script
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 5000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -150)
setCombatCondition(combat, condition)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
function onUseWeapon(cid, var)
if getPlayerLevel(cid) >= 100 then
local chance = math.random(1,10)
if chance == 1 then
doCombat(cid, combat, var)
else
doCombat(cid, combat2, var)
end
else
doPlayerSendCancel(cid, 'You need level 100 to use this weapon.')
end
end
I want it to paralyze like every 10th hit or something. But it doesnt work. i keep hitting and nothing happends :S Anybody got any idea what i did wrong?