• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

mana up help

szajker123

New Member
Joined
May 12, 2012
Messages
195
Reaction score
0
Hi, I need a script such that when we use the items it will increase our example, 20% mana.
REP+++
 
Last edited:
:3 try

Forever add 20% of mana
PHP:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 20)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(doAddCondition(cid, condition)) then
		doRemoveItem(item.uid)
	doCreatureSay(cid, "Yummy!", TALKTYPE_ORANGE_1)
end
	return true
end

with time
PHP:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 20)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(doAddCondition(cid, condition)) then
		doRemoveItem(item.uid)
	doCreatureSay(cid, "Yummy!", TALKTYPE_ORANGE_1)
end
	return true
end
 
Read the post above you, rox666 said all there is needed.
If you still don't know, then I advise you to read tutorials before running a server.
 
evan i think i explained him good but i do it once again

guy lissten to me!
u want edit CEREMONIAL MASK that give 20% of mana?
find in items.xml 2501 id

where is attribute keys? put this
XML:
<attribute key="maxmanapercent" value="120"/>
 
It's not only changing the items.xml, you have to change in movements.xml to let it give the attributes I think.

Forexample like this:
XML:
	<movevent type="Equip" itemid="7892" slot="feet" event="function" value="onEquipItem">
		<vocation id="1"/>
		<vocation id="5" showInDescription="0"/>
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
	</movevent>
	<movevent type="DeEquip" itemid="7892" slot="feet" event="function" value="onDeEquipItem"/>
 
I didn't mention that he didn't have to change anything in items.xml. I said that he have to change in movements.xml if the item is not already registered. The item must be registered in order to give the player the 20%+ mana.
 
Back
Top