hello!
i need script for shield (any)
shield must give +100 to max hp!:wub:
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
<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>
<movevent type="Equip" itemid="2514" slot="shield" event="function" value="onEquipItem"/>
<movevent type="DeEquip" itemid="2514" slot="shield" event="function" value="onDeEquipItem"/>