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

Damage condition depending on magic level!

Tarielle

New Member
Joined
Nov 4, 2007
Messages
214
Reaction score
0
Location
Sweden
Hi, how can I make the condition with this script so the tic damage depends on the magic level? (The red one)


Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, [COLOR="Red"]10[/COLOR], 2000, -10)
setCombatCondition(combat, condition)

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

Yes, its a weapon script :<
 
Last edited by a moderator:
Code:
local combat = createCombatObject()
local ml = getPlayerMagicLevel(cid)
local damage = ml*10000

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, damage, 2000, -10)
setCombatCondition(combat, condition)

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

Just change the damage thing ;)
 
He doesnt get the condition, but shouldn't it be getPlayerMagLevel(cid) and (condition, 10, 2000, -damage)? Though I tested both none did work
 
ohhh now I understand your question hehehe, it a little too late where I live, you have all the reason... well i think this needa table, but i dont remeber how to do it :S
 
Code:
local combat = createCombatObject()
local ml = getPlayerMagicLevel(cid)
local damage = ml*10000

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, damage, 2000, -10)
setCombatCondition(combat, condition)

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

Just change the damage thing ;)

cid is a nil value in your script, therefor will not work :)
 
Well, try this...
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    local damage = -(getPlayerMagLevel(cid) / 3)
    local rounds = getPlayerMagLevel(cid) / 10
    addDamageCondition(condition, rounds, 2000, damage)
    return doCombat(cid, combat, var)
end
 
Back
Top