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

Wand of Sd attacking by Level ?

picachu

Member
Joined
Dec 2, 2007
Messages
970
Reaction score
11
Hail

My wand just attack with magic level ;(
I want the wand to attack for lvl ....

here's my wand:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.4, -50, -1.9, 0)

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

at the level 250 the wand must hit 300-400 +- !! and it will increase at lvl up... :D
 
Last edited:
data/weapons/weapons.xml

Code:
<wand [U][B]id="2185"[/B][/U] [U][B]level="19"[/B][/U] [U][B]mana="5"[/B][/U] [U][B]min="27" max="33"[/B][/U] type="death" event="function" value="default"> 
		[U][B]<vocation id="2"/>[/B][/U]
	</wand>


id="2185" : the id of the wand/weapon
level="19" : the level to use the weapon
mana="5" : how much mana it takes when shooting
min="27" max="33" : minimum and max damage meaning in ur case min="300" max="400"

HTML:
<vocation id="2"/>
= It means which vocation that is allowed to use it, if you want both sorc and druid, use this


Code:
<vocation id="1"/>
<vocation id="2"/>


yw
 
no no, i want the wand with MY SCRIPT.

and the wand will increase the damage when you up lvl...
example:
i'm lvl 230
and i hit 300-350 in wand.
i'm lvl 300
i will hit 400-500, etc....
=D
please!
ty
 
Barker did not understand his request

I don't know how to do that, but I have an alternative
Make it like 4 wands with 4 different ids, once you're lvled enough you can click and change between them.
One for level 10 , that would take like 40 damage
one for level 100 ~
and so on
Don't forget to put level restrictions and actions
 
Barker did not understand his request

I don't know how to do that, but I have an alternative
Make it like 4 wands with 4 different ids, once you're lvled enough you can click and change between them.
One for level 10 , that would take like 40 damage
one for level 100 ~
and so on
Don't forget to put level restrictions and actions
That could work, if he understands it ;)


------------------
Ma hongsh!
 
I guess you mean you want the damage to be calculated by the players level and magic level yes? or just level? whatever?
 
change
Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.4, -50, -1.9, 0)
to
Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -20, -1.2, -100)
This wand would hit 140-220 at lvl 100, 320-400 at level 250
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetFormulaValues(cid, level, maglevel)
	local min = math.floor(level / 5) + maglevel * 2.8 + 50
	local max = math.floor(level / 5) + maglevel * 3.8 + 50
	return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end
Lvl 250, Mlvl 80:
min = 324
max = 404
 
At level 370, ml 119...

15:51 You deal 212 damage to Mol'ery.
15:51 You deal 225 damage to Mol'ery.
15:51 You deal 230 damage to Mol'ery.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetFormulaValues(cid, level, maglevel)
	local min = math.floor(level / 5) + maglevel * 2.8 + 50
	local max = math.floor(level / 5) + maglevel * 3.8 + 50
	return -min * 2, -max * 2
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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