ON INIT {
 SET_NAME [description_item_chainmail]
 SET_MATERIAL METAL
 SET_GROUP ARMORY
 SET_PRICE 310
 SET_STEAL 65
 PLAYERSTACKSIZE 10
 SETSCALE 75
 TWEAK SKIN "item_bedroll" "item_Chainmail"
  SET §ready 0
  SET §helmet 0
 SET_WEIGHT 1
 ACCEPT
} 

ON FORGEREADY {
 PLAYERSTACKSIZE 0
  SET §ready 1
  SET §helmet 0
  TIMERhalo 1 2 HALO -oc 1 0.5 0
  TIMERoff 1 20 GOTO TOOLATE
 ACCEPT
}

ON COMBINE {
 IF (^$PARAM1 ISCLASS "ingot_metal_hot" ) {
 PLAY "TORCH_END"
  SET §helmet 1
  TIMERhalo 1 2 HALO -oc 1 0.5 0
  TIMERoff 1 20 GOTO TOOLATE
 ACCEPT
}
 IF (^$PARAM1 ISCLASS "hammer" ) {
 IF (§helmet == 1) {
  TIMERoff OFF
  TIMERhit -m 3 500 PLAY -o "ANVIL_HIT"
  TIMERreplace 1 2 REPLACEME \\ARMOR\\helmet_chain\\helmet_chain
  ACCEPT
 }
 IF (§ready == 0) {
  SPEAK -P [PLAYER_NOT_NOW] NOP
  ACCEPT
 }
  TIMERoff OFF
  TIMERhit -m 3 500 PLAY -o "ANVIL_HIT"
  TIMERreplace 1 2 REPLACEME \\QUEST_ITEM\\Ingot_metal\\Ingot_metal
  ACCEPT
 }
 ACCEPT
}


>>TOOLATE
 PLAY "TORCH_END"
 HALO -f
 REPLACEME \\PROVISIONS\\Scrap_METAL\\Scrap_METAL
 ACCEPT