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

[REQUEST]Mana Drain Staff

exique

Natala-ot.com
Joined
Sep 28, 2008
Messages
1,673
Reaction score
25
Location
Sweden
Is it possible to make a staff that does this:
Player 1 attacks player 2..
Player 2 loses 50 mana for each hit (doesn't take on hp just mana)

Possible?
:thumbup:
 
If you give a bit more detail, I could probably come up with something. This is currently untested, place it in your weapons/scripts folder.

Name it drainstaff.lua
Lua:
local min = 50
local max = 50

local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) 
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -min, -1, -max) 

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

Then go to weapons.xml and

Lua:
	<wand id="XXXX" level="X" mana="X" type="earth" event="script" value="drainstaff.lua"/>

Modify the X's and it should work. Once again, untested.
 
Back
Top