ON INIT {
  IF (§die_count > 2) {
    TELEPORT MARKER_0737 
    ACCEPT
  }
 SET §dead 0	// Used to know if npc is dead
 IF (§die_count > 0) ACCEPT
 SET §die_count 0	// Used to know how many times the npc has revived
 ACCEPT
}

ON INITEND {
 BEHAVIOR WANDER_AROUND 300
 SETTARGET NONE
 ACCEPT
}

ON RELOAD {
  IF (#TROLL_QUEST == 1) {
    IF (§die_count == 1) {
      INC §die_count 1
      REVIVE
      ACCEPT
    }
   ACCEPT
  }
  IF (#PLAYER_ON_QUEST > 3) {
    IF (§die_count == 1) GOTO SUITE
    IF (§die_count == 2) {
>>SUITE
      SET §die_count 3
      GOTO WRAT_SPAWN
      ACCEPT
    }
   ACCEPT
  }
 ACCEPT
}

ON DIE {
 IF (§die_count > 1) ACCEPT
 SET §die_count 1
 SET §dead 1
 ACCEPT
}

>>WRAT_SPAWN
 REVIVE
 SET £type "Rat_wrat"
 USEMESH "wrat_base\wrat_base.teo"
 TWEAK SKIN "npc_rat_base_cm" "npc_rat_base"
 ACCEPT