ON INIT {
 SET £type "human_guard_kingdom"
 SET £friend "kingdom"
 SET £KEY_CARRIED "portcullis"
 ACCEPT
}

ON INITEND {
 TWEAK SKIN "npc_human_chainmail_body" "npc_human_armoredmail_guard_body" 
 TWEAK SKIN "npc_human_chainmail_guard_head" "npc_human_chainmail_guard_head3"
 BEHAVIOR FRIENDLY
 SETTARGET LIGHT_DOOR_0117
 SET £initmarker "MARKER_0647"
 SENDEVENT -ir DURABILITY 100 "90"
 ACCEPT
}

ON CHANGESTATUS {
  IF (^$PARAM1 == "4") {
    SET §reflection_mode 0
    BEHAVIOR FRIENDLY
    SETTARGET human_base_0082 //king
    ACCEPT
  }
  IF (^$PARAM1 == "4end") {
    SET §reflection_mode 1
    BEHAVIOR FRIENDLY
    SETTARGET LIGHT_DOOR_0117
    ACCEPT
  }
 ACCEPT
}

ON CUSTOM {
  IF (^$PARAM1 == "LIGHT_FIRE") {
    TIMERtorch 1 1 GOTO LIGHT_FIRE
    ACCEPT
  }
 ACCEPT
}

>>LIGHT_FIRE
 IF (§enemy == 1) ACCEPT
 BEHAVIOR FRIENDLY
 SETTARGET MARKER_0736
 SPELLCAST -SMF 1 IGNIT MARKER_0736
 TIMERrot 1 1 GOTO LIGHT_FIRE2
 ACCEPT

>>LIGHT_FIRE2
 BEHAVIOR FRIENDLY
 SETTARGET LIGHT_DOOR_0117
 BEHAVIOR FRIENDLY
 TIMERlook 1 2 SETTARGET LIGHT_DOOR_0117
 ACCEPT