Rainbow Muffler

Item ID 20969 Name Rainbow Muffler
A beautiful scarf that shines in rainbow colors.
Feel the power of the four major elements.
_______________________
MaxHP +2%, MaxSP +2.%
_______________________
Decreases damage taken from Players by 5%.
_______________________
Increases Magical Damage by 2%.
_______________________
When Level 5 Frigg's Song is learned:
Increases Attack Speed (decreases After Attack Delay by 10%).
Decreases Metallic Sound skill cooldown by 0.2 seconds.
_______________________
For each Level of Gloomy Shyness:
Increases Magical Damage by additional 4%.
Increases damage of Metallic Sound by 4%.
_______________________
When Level 5 Deep Sleep Lullaby is learned:
Enables the use of Level 10 Heal.
Recovers 200 HP and 20 SP when defeating enemies with magical attacks.
_______________________
Refine Level +5:
MaxHP +3% , MaxSP +3%.
Increases Magical Damage by additional 3%.
_______________________
Refine Level +7:
MaxHP +5% , MaxSP +5%.
Increases Magical Damage by additional 5%.
_______________________
When equipped with Fire Arrow:
Decreases damage taken from Fire elemental attacks by 75%.
_______________________
When equipped with Crystal Arrow:
Decreases damage taken from Water elemental attacks by 75%.
_______________________
When equipped with Wind Arrow:
Decreases damage taken from Wind elemental attacks by 75%.
_______________________
When equipped with Stone Arrow:
Decreases damage taken from Earth elemental attacks by 75%.
_______________________
Type: Garment
Defense: 12
Weight: 30
Armor Level: 1
_______________________
Requirement:
Base Level 100
Weapon Level 0 Identifier Rainbow_Muffler_Jp
Attack 0 Type Armor
MATK 0 Equip Locations Garment
Defense 12 Equippable Jobs None
Range 0 Equip Gender Both (Male and Female)
Slots 0 Equip Upper None
Weight 30 Min Equip Level 100
NPC Buy 20 Max Equip Level None
NPC Sell 10 Refineable Yes
Credit Price None Trade restriction None
Item Script
.@r = getrefine();
.@lvl = getskilllv("WM_GLOOMYDAY");
if (.@r >= 7) {
   .@val = 10;
} else if (.@r >= 5) {
   .@val = 5;
}
else {
   .@val = 2;
}
bonus bMaxHPrate,.@val;
bonus bMaxSPrate,.@val;
bonus bMatkRate,.@val+(4*.@lvl);
bonus2 bSubRace,RC_Player_Human,5;
bonus2 bSubRace,RC_Player_Doram,5;
bonus2 bSkillAtk,"WM_METALICSOUND",4*.@lvl;
if (getskilllv("WM_FRIGG_SONG") == 5) {
   bonus2 bSkillCooldown,"WM_METALICSOUND",-200;
   bonus bAspdRate,10;
}
if (getskilllv("WM_LULLABY_DEEPSLEEP") == 5) {
   skill "AL_HEAL",10;
   bonus bMagicHPGainValue,200;
   bonus bMagicSPGainValue,20;
}

Set Script
Rainbow Muffler
Fire Arrow
bonus2 bSubEle,Ele_Fire,75;
Rainbow Muffler
Crystal Arrow
bonus2 bSubEle,Ele_Water,75;
Rainbow Muffler
Arrow of Wind
bonus2 bSubEle,Ele_Wind,75;
Rainbow Muffler
Stone Arrow
bonus2 bSubEle,Ele_Earth,75;