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

Ring that increases player life 25%

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
I need a ring that increases player life by 25
I tryed maxhealthpointsvalue and no work... That in items.XML
it can be also in actions
 
This should work

Code:
<item id="ITEM_ID" article="a" name="ring">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="decayTo" value="0" />
		<attribute key="transformDeEquipTo" value="ITEM_ID" />
		<attribute key="duration" value="1200" />
		<attribute key="showduration" value="1" />
		<attribute key="maxhealthpercent" value="25" />
	</item>

Code:
<item id="ITEM_ID" article="a" name="ring">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="transformEquipTo" value="ITEM_ID" />
		<attribute key="stopduration" value="1" />
		<attribute key="showduration" value="1" />
	</item>
movements.xml
PHP:
<movevent type="Equip" itemid="ITEM_ID" slot="ring" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="ITEM_ID" slot="ring" event="function" value="onDeEquipItem"/>
 
Ok, then just use:
Code:
<item id="ITEM_ID" article="a" name="ring">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="maxhealthpercent" value="25" />
	</item>

movements.xml
PHP:
<movevent type="Equip" itemid="ITEM_ID" slot="ring" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="ITEM_ID" slot="ring" event="function" value="onDeEquipItem"/>
 
LOL

<attribute key="maxhealthpercent" value="25" />
that will reduce your max health to 25% you need to change to

<attribute key="maxhealthpercent" value="125" />

WHY? becaouse 100% is the 100%of all your life so you need to put 125 it increas 25% your maxhealth!!!

I have pro mana and health ring also helaht and mana ring :P and all works 100%
 
LOL

<attribute key="maxhealthpercent" value="25" />
that will reduce your max health to 25% you need to change to

<attribute key="maxhealthpercent" value="125" />

WHY? becaouse 100% is the 100%of all your life so you need to put 125 it increas 25% your maxhealth!!!

I have pro mana and health ring also helaht and mana ring :P and all works 100%

You're right, my bad
 
2 rings? Why? Obs; ring of sky
anyway I'm on itouch
inferno-ot.vapus.net

the ring is infinite

Using 2 rings will give you a "equipment effect".

For an example, when ring is not in use, and you equip it, it gets a sparkling effect while effective.
 
PHP:
<movevent type="Equip" itemid="XXXX" slot="ring" event="script" value="script_name.lua"/>
<movevent type="DeEquip" itemid="XXXX" slot="ring" event="script" value="script_name.lua"/>

Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 125) -- 125% Total Hp

function onEquip(cid, item, slot)
	return doAddCondition(cid, condition) and doPlayerSave(cid, true)
end

function onDeEquip(cid, item, slot)
	return doRemoveCondition(cid, condition) and doPlayerSave(cid, true)
end
 
PHP:
<movevent type="Equip" itemid="XXXX" slot="ring" event="script" value="script_name.lua"/>
<movevent type="DeEquip" itemid="XXXX" slot="ring" event="script" value="script_name.lua"/>

Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 125) -- 125% Total Hp

function onEquip(cid, item, slot)
	return doAddCondition(cid, condition) and doPlayerSave(cid, true)
end

function onDeEquip(cid, item, slot)
	return doRemoveCondition(cid, condition) and doPlayerSave(cid, true)
end
>>786131
>doRemoveCondition(cid, condition)
>condition
>doRemoveCondition(cid, type[, subId])
>type

shit brix
Code:
return doRemoveCondition(cid, CONDITION_ATTRIBUTES) and doPlayerSave(cid, true);
 
I don't even remember posting that. Good for you Xeon, your addiction has lead to some knowledge.
 
Back
Top