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

Action Double Atack Weapon.

jpkulik

New Member
Joined
Mar 15, 2008
Messages
208
Reaction score
2
Hello all!
I have a script for double atack weapon.
It is for serpent sword.
But the problem is:
The Poison Hit always is 45, every time 45..45..45.. :(
I dont know how to fix it, and the problem number 2 is the poison atack is so fast.
I need to put it in a normal script.
There line in weapons.xml is --->
PHP:
	<melee id="2409" enabled="1" exhaustion="0" script="serpent sword.lua">
The script is:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ZZZ)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.0, 0, 1.1, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 1, 200, -45)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
I hope some one help me fast.
Tank you all! :D
 
Poison could be fixed here:
PHP:
addDamageCondition(condition, 1, 200, -45)

Here's a fix of the script:
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ZZZ)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.0, 0, 1.1, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 5, 1000, -45)
addDamageCondition(condition, 4, 1000, -40)
addDamageCondition(condition, 3, 1000, -35)
addDamageCondition(condition, 2, 1000, -30)
addDamageCondition(condition, 1, 1000, -25)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end

1000 = 1 second
5 = repeat 5 times!
 
Last edited:
Okay, i will test it now, by the way, tank you fella,
and if it works, i will edit this comment.
 
well i was dumb by then it could be a simple loop :p
PHP:
local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) 
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ZZZ) 
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.0, 0, 1.1, 0) 

local condition = createConditionObject(CONDITION_POISON) 
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) 
for i = 0, 4 do
    addDamageCondition(condition, 5 - i, 1000, -45 + 5 * i) 
end
setCombatCondition(combat, condition) 

function onUseWeapon(cid, var) 
    return doCombat(cid, combat, var) 
end
 
Back
Top