• 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 Depends On Level ..

Black Dove

Web-Developer
Joined
Apr 14, 2010
Messages
129
Reaction score
4
Location
Egypt
Hey Otlanders ..
I Need Wand Script .. That Depends On ( Level & M-level )
Depends On Level By 70 % And M-Level 30 %

Hope you help Me ... :)
 
tell me, how much damage should it do?

level: X damage
magic level: X damage

To make it easier for you to understand what you should use, how much would you like a level 100 with magic level 60 should hit on monsters?
 
This is incredibly easy.

in the Weapons folder make a new script and add it to weapons.xml for whatever item you want the wand to be.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -- Put the damage type here
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) -- Put the distance effect here

function onGetFormulaValues(cid, level, maglevel)
   min = (level * 1) + (maglevel * 1) -- Minimum Damage
   max = min -- Maximum damage (you can add to the minimum to make a range)
   return -min, -max -- Must return negatives to do damage
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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