Magician Shadow Earring

Item ID 24249 Name Magician Shadow Earring
A sacred earring which is believed to protect its wearer. It also draws the wearer's potential abilities.
_______________________
Decreases SP Consumption of Fire Bolt, Cold Bolt and Lightning Bolt by 20%.
_______________________
For each Refine Level:
Decreases SP Consumption of Fire Bolt, Cold Bolt and Lightning Bolt by additional 3%.
_______________________
When equipped with Magician Shadow Pendant:
MATK +1%
MaxSP +1%
_______________________
Total Refine Level of entire set at least +10:
MATK +2%
MaxSP +2%
_______________________
Type: Shadow Earring
_______________________
Requirement: None
Weapon Level 0 Identifier S_Magician_earring
Attack 0 Type Shadow Equipment
MATK 0 Equip Locations Shadow Accessory Right (Earring)
Defense 0 Equippable Jobs None
Range 0 Equip Gender Both (Male and Female)
Slots 0 Equip Upper None
Weight 0 Min Equip Level 1
NPC Buy 0 Max Equip Level None
NPC Sell 0 Refineable Yes
Credit Price None Trade restriction None
Item Script
.@r = getrefine();
bonus bMaxHP,.@r*10;
bonus2 bVariableCastrate,"MG_COLDBOLT",-20-(5*.@r);
bonus2 bVariableCastrate,"MG_FIREBOLT",-20-(5*.@r);
bonus2 bVariableCastrate,"MG_LIGHTNINGBOLT",-20-(5*.@r);

Set Script
Magician Shadow Pendant
Magician Shadow Earring
Wizard Shadow Shoes
Wizard Shadow Armor
Warlock Shadow Weapon
Warlock Shadow Shield
bonus bAllStats,10;
bonus bMaxHPrate,5;
bonus bMaxSPrate,5;
bonus2 bIgnoreDefClassRate,Class_Normal,50;
bonus2 bIgnoreMDefClassRate,Class_Normal,50;
Magician Shadow Pendant
Magician Shadow Earring
Sage Shadow Shoes
Sage Shadow Armor
Sorcerer Shadow Weapon
Sorcerer Shadow Shield
bonus bAllStats,10;
bonus bMaxHPrate,5;
bonus bMaxSPrate,5;
bonus2 bIgnoreDefClassRate,Class_Normal,50;
bonus2 bIgnoreMDefClassRate,Class_Normal,50;
Magician Shadow Earring
Magician Shadow Pendant
bonus bMatkRate,1;
bonus bMaxSPrate,1;
if (getequiprefinerycnt(EQI_SHADOW_ACC_R)+getequiprefinerycnt(EQI_SHADOW_ACC_L) >= 10) {
   bonus bMatkRate,2;
   bonus bMaxSPrate,2;
}