ON INIT {
 SETNAME [description_silver_ring]
 SET_MATERIAL METAL
 SET_GROUP JEWELRY
 SET_PRICE 50
 SET_STEAL 50
 SETOBJECTTYPE RING
 SET §potion 0
 SET_WEIGHT 0
 PLAYERSTACKSIZE 20
 ACCEPT
}

ON EQUIPIN {
 PLAY "EQUIP_RING"
 ACCEPT
}
ON INVENTORYUSE {
 EQUIP PLAYER
 ACCEPT
}

ON COMBINE {
 IF (^$PARAM1 ISCLASS "POTION_INVISIBLE") {
  IF (§potion == 1) ACCEPT
  IF (^PLAYER_SKILL_OBJECT_KNOWLEDGE < 50) {
   SPEAK -p [player_not_skilled_enough] NOP
   HEROSAY [required_obj_50]
   ACCEPT
  }
  SET §potion 1
  HALO -os 30
  SENDEVENT EMPTY ^$PARAM1 ""
  ACCEPT
 }
 ACCEPT
}


ON SPELLCAST {
 IF (§potion == 0) ACCEPT
 IF (^$PARAM1 != ENCHANT_WEAPON) ACCEPT
 IF (^#PARAM2 < 6) {
  SPEAK -p [player_not_skilled_enough] NOP
  HEROSAY [required_cast_60]
  ACCEPT
 }
 PLAY -o "Magic_Spell_Enchant_Weapon"
 REPLACEME "MAGIC\\RING_INVISIBILITY_HANDMADE\\RING_INVISIBILITY_HANDMADE"
 ACCEPT
} 