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

HELP WAND PARALYZE

josesaucedo

New Member
Joined
Jun 21, 2013
Messages
20
Reaction score
0
Hello, can someone help me, I have this problem.
For a strange reason, it does not respect the 30% probability since each blow that the wand applies is paralyzed, in reality it is as if it had a 100% chance


Lua:
local percent = 30 --- Chance Percent for Paralyse


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 38)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -19.9, -85, -20.6, 85)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -2000)
setConditionFormula(condition, -1.0, 0, -1.0, 0)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    if isCreature(variantToNumber(var)) then
        if percent >= math.random(1,100) then
            doAddCondition(variantToNumber(var), condition)
            end
    end       
return doCombat(cid, combat, var)
end
 
Hello, can someone help me, I have this problem.
For a strange reason, it does not respect the 30% probability since each blow that the wand applies is paralyzed, in reality it is as if it had a 100% chance


Lua:
local percent = 30 --- Chance Percent for Paralyse


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 38)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -19.9, -85, -20.6, 85)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -2000)
setConditionFormula(condition, -1.0, 0, -1.0, 0)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    if isCreature(variantToNumber(var)) then
        if percent >= math.random(1,100) then
            doAddCondition(variantToNumber(var), condition)
            end
    end      
return doCombat(cid, combat, var)
end
I am late, but can you tell me what your item.xml and weapon.xml look like for this wand? I am trying to do the same thing and cannot get it to work.
 
I am late, but can you tell me what your item.xml and weapon.xml look like for this wand? I am trying to do the same thing and cannot get it to work.
item.xml just what a regular wand would have
weapons.xml:

XML:
    <wand id="2181" level="26" mana="8"" event="script" value="your_script.lua"> <!-- Terra Rod -->
        <vocation id="2"/>
    </wand>
 
Last edited by a moderator:
Back
Top