;"Restore" skill

;The cost of blood the skill takes
BloodCost = Floor(GetUserMaxMana(#USERID) * 0.62)
;BloodCost = Floor(GetUserWisdom(#USERID) / 2)

;The amount of HP the skill will heal
HealthGain = Floor(GetUserMaxMana(#USERID))

;The effect graphic to use
Graphic = 1

If GetUserHP(#USERID) > GetUserMaxHP(#USERID) - 1
   SendMessageToUser(#USERID, "You already have full health!", #MSG_EMOTE)
   GoTo END
EndIf

If GetUserMana(#USERID) < BloodCost
   SendMessageToUser(#USERID, "You do not have the required blood to use this skill!", #MSG_CRITICAL)
   GoTo END
EndIf

Blood = GetUserMana(#USERID)
Blood = Blood - BloodCost
SetUserMana(#USERID,Blood)

Health = GetUserHP(#USERID)
Health = Health + HealthGain
If Health > GetUserMaxHP(#USERID)
   Health = GetUserMaxHP(#USERID)
EndIf
SetUserHP(#USERID, Health)

SendMessageToUser(#USERID, "Your flesh regenerates.", #MSG_EMOTE)

CreateEffect(Graphic,350,0,#DIR_UP,#MAPID,#XPOS,#YPOS,0,#USERID,0)

Label END

Continue = 1