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

siield giving max hp

Xbass

New Member
Joined
Sep 12, 2008
Messages
371
Reaction score
0
hello!
i need script for shield (any)
shield must give +100 to max hp!:wub:
 
hello!
i need script for shield (any)
shield must give +100 to max hp!:wub:


Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
ifitem.itemid == <shield id> then
if get PlayerLevel (cid) >=50 then
doCreatureAddHealth(cid,<your amount of hp)
doPlayerSendTextMessage (cid,21,"Your now Protected")
else doPlayerSendCancel (cid,"You don't have the required level.")
end
elseif item.itemid == <shieldid> then
if get PlayerLevel (cid 21,You are not blessed with this shield for MAX hp)
end
end
return true
end

just watch if by the <add your HP> and <shield ID> you have to put your own
anyways this is my first script
REP++
 
it's not what he wanted extractly ;D
item.xml:
(I will show for mastermind shield for example)
HTML:
<item id="2514" article="a" name="mastermind shield">
		<attribute key="description" value="It is an enchanted shield.Hitpoints +100."/>
		<attribute key="maxhealthpoints" value="100"/>
		<attribute key="weight" value="5700"/>
		<attribute key="defense" value="37"/>
		<attribute key="weaponType" value="shield"/>
	</item>

movements.xml:
HTML:
<movevent type="Equip" itemid="2514" slot="shield" event="function" value="onEquipItem"/>
<movevent type="DeEquip" itemid="2514" slot="shield" event="function" value="onDeEquipItem"/>

works for tfs 0.3
 
Back
Top