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

Armor give mana / healt.

wohami

New Member
Joined
May 18, 2010
Messages
93
Reaction score
0
Location
sweden
Hello,
i wondering what i need to add to the armor in item.xml
if i wont it to give 1000 more healt and 200 more mana when player use it.

I rep for help. :D
 
Use functions in movement.
Code:
onEquipItem
onDeEquipItem
and in lua file:
Code:
setCreatureMaxHealth(cid, health)
setCreatureMaxMana(cid, mana)
 
what u mean,?
u change in same way?

when they use armor they get 1000 hp more and 200 mana more.

Use = click right mouse button <-- then mean use

Wear = when you pick up armor from backpack/ground and put into armor slot <-- this mean wear

So what do you want?
 
ex.

on use
Lua:
function onEquipItem(cid)
   for health, mana = 1000, 1000 do
 if isCreature(cid) == true then
return setCreatureMaxHealth(cid, health) and setCreatureMaxMana(cid, mana)
end
 
Hmm is easier add to this armor:
Code:
		<attribute key="maxhitpoints" value="1000"/>
		<attribute key="maxmanapoints" value="2000"/>
And to movements:
Code:
	<movevent type="Equip" itemid="[COLOR="Red"]iditem[/COLOR]" slot="armor" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="[COLOR="Red"]iditem[/COLOR]" slot="armor" event="function" value="onDeEquipItem"/>
 
Back
Top