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

SD Attack depending on LEVEL and not Mag.

Wifebeater

New Member
Joined
Feb 24, 2011
Messages
60
Reaction score
1
Hi, i want to make my SD damage depending on my level, and not the magic

I find this very annoying because a lvl 500 with same mag as a level 300 deals same amount of damage :S

Here's my code ATM

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -155, -1, -155, 5, 5, 4, 7)

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

Please if someone can send me the code that makes it deal damage depending on ur level, or both ml and level. :-)

/wifebeater kthx
 
Problem number 2.

i have some issues with people exiting at monks, they never get kicked. Here is the code in config

Code:
idleWarningTime = 8 * 60 * 1000
	
idleKickTime = 9 * 60 * 1000

What is wrong? :S

i want them to get kicked after 10 minutes. and warning at 9 minutes.
 
5, 5, 4, 7
Modify those numbers, at the moment the formulas look like this:

min = level / 5 + maglevel * 4
max = level / 5 + maglevel * 7

Its basic math, you know what to do — decrease the divisors.
Problem number 2.

i have some issues with people exiting at monks, they never get kicked. Here is the code in config

Code:
idleWarningTime = 8 * 60 * 1000
	
idleKickTime = 9 * 60 * 1000

What is wrong? :S

i want them to get kicked after 10 minutes. and warning at 9 minutes.
Make sure idle.lua is registered and executing properly
 
it worked, i found one of ur earlier posts.


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetFormulaValues(cid, level, maglevel)
local min = level * 2 + maglevel * 2
local max = level * 3.5 + maglevel * 3.5
return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
return doCombat(cid, combat, var)

Thanks mate! <3
 
Back
Top