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

MoveEvent ring that increase attack damage

Erikas Kontenis

Board Moderator
Staff member
Board Moderator
Joined
Jul 3, 2009
Messages
1,864
Reaction score
566
Location
Lithuania
Install:
To make this work you need source changes you can found it in this link: http://otland.net/f35/increase-player-damage-177331/

after successfull compilation simple lua part:

movements.xml

Code:
<movevent type="DeEquip" itemid="2164" slot="ring" function="onDeEquipItem" script="set/damageRing.lua"/> 
<movevent type="Equip" itemid="2164" slot="ring" function="onEquipItem" script="set/damageRing.lua"/>
-- Important note, keep sure you not dublicating existing ring with same id in movements.xml

set/damageRing.lua

Code:
function onEquip(cid, item, slot)
	doPlayerSetExtraMagicDamage(cid, 100)
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MORTAREA)
return true
end	
		
function onDeEquip(cid, item, slot)
	doPlayerSetExtraMagicDamage(cid, 1)
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MORTAREA)
return true
end

Tested on 0.3.6
 
Can it be used as an item, exemple a carrot ( right click duration 10sec) or something like that, ? or maybe it could take money every sec?
 
Can it be used as an item, exemple a carrot ( right click duration 10sec) or something like that, ? or maybe it could take money every sec?

You can use addEvent function with storages and run it after use item.
After X time the buff for extra attack damage dissapears and your storage returns to 0.
 

Similar threads

Back
Top