Soul Purifying Rune Robe

Item ID 450280 Name Soul Purifying Rune Robe
An robe created through deep energy research on the Varmundt Biosphere.
Imprinted with the runic magic of soul and purification.
_______________________
Increases SP Consumption by 10%.
MATK +100.
_______________________
For each 2 Refine Levels:
MATK +15, DEF +30.
_______________________
Refine Level +7:
MATK +3%, S.MATK +2, MDEF +25.
_______________________
Refine Level +9:
S.MATK +3, MDEF +25.
_______________________
Refine Level +11:
Decreases After Skill Delay by 10%.
Increases Magical Damage with every element by 5%.
_______________________
[Bonus by Grade]
[Grade D]: MATK +10, MATK +5%.
[Grade C]: MATK +20, MATK +8%, Magical Damage with every element +3%.
[Grade B]: MATK +11%, Magical Damage with every element +5%, SPL +5.
[Grade A]: MATK +14%, Magical Damage with every element +7%, CON +5.
_______________________
Type: Armor
Defense: 0
Weight: 50
Armor Level: 2
_______________________
Requirement:
Base Level 250
Weapon Level 0 Identifier Soul_P_R_Robe
Attack 0 Type Armor
MATK 0 Equip Locations Armor
Defense 0 Equippable Jobs None
Range 0 Equip Gender Both (Male and Female)
Slots 1 Equip Upper None
Weight 50 Min Equip Level 250
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
.@g = getenchantgrade();
.@r = getrefine();
bonus bUseSPrate,10;
bonus bMatk,100+15*(.@r/2);
bonus bDef,30*(.@r/2);
if (.@r>=7) {
   bonus bSMatk,2;
   bonus bMatkRate,3;
   bonus bMdef,25;
   if (.@r>=9) {
      bonus bSMatk,3;
      bonus bMdef,25;
      if (.@r>=11) {
         bonus2 bMagicAtkEle,Ele_All,5;
         bonus bDelayrate,-10;
      }
   }
}
if (.@g>=ENCHANTGRADE_D) {
   bonus bMatkRate,5;
   bonus bMatk,10;
   if (.@g>=ENCHANTGRADE_C) {
      bonus2 bMagicAtkEle,Ele_All,3;
      bonus bMatkRate,8;
      bonus bMatk,20;
      if (.@g>=ENCHANTGRADE_B) {
         bonus2 bMagicAtkEle,Ele_All,5;
         bonus bMatkRate,11;
         bonus bSpl,5;
         if (.@g>=ENCHANTGRADE_A) {
            bonus2 bMagicAtkEle,Ele_All,7;
            bonus bMatkRate,14;
            bonus bCon,5;
         }
      }
   }
}

Set Script
Soul Purifying Rune Robe
Biosphere Abyss Ring
bonus2 bIgnoreMdefClassRate,Class_All,50;
bonus bMatkRate,30;