Divine Guard Hat

Item ID 5900 Name Divine Guard Hat
A majestic hat that displays the divine authority that has been invested in the wearer.
_______________________
Decreases damage taken from Small, Medium and Large size monsters by 5%.
_______________________
Refine Level +7:
Random chance to auto-cast Level 5 Heal on yourself when wearer receive physical attack. (Or activate based on learned skill Level)
Refine Level +9:
Increases damage of Genesis Ray by 20%.
_______________________
Type: Headgear
Defense: 10
Position: Upper
Weight: 20
Armor Level: 1
_______________________
Requirement:
Base Level 100
Royal Guard
Weapon Level 0 Identifier Divine_Guard_Hat_
Attack 0 Type Armor
MATK 0 Equip Locations Upper Headgear
Defense 10 Equippable Jobs Crusader
Range 0 Equip Gender Both (Male and Female)
Slots 1 Equip Upper Third, Third Upper, Third Baby
Weight 20 Min Equip Level 100
NPC Buy 0 Max Equip Level None
NPC Sell 0 Refineable Yes
Credit Price None Trade restriction Can't be dropped, Can't be traded with player, Can't be put in Cart, Can't be put in Guild Storage, Can't be attached in Mail, Can't be auctioned
Item Script
.@r = getrefine();
bonus2 bSubSize,Size_All,5;
if (.@r>=7) {
   .@level = getskilllv("AL_HEAL");
   bonus3 bAutoSpellWhenHit,"AL_HEAL",(.@level ? .@level : 5),10;
}
if (.@r>=9) {
   bonus2 bSkillAtk,"LG_RAYOFGENESIS",20;
}