ON INIT {
 SET §reflection_mode 0
 SET §road 0			// Used to know the path npc has chosen
 SET Łkey_carried "KEY_BASE_0005portcullis"
// INVENTORY ADD "PROVISIONS\\BOTTLE_WINE\\BOTTLE_WINE"
 ACCEPT
}

ON INITEND {
 TWEAK SKIN "npc_goblin_base_head" "npc_goblin_helm_mask"
 SENDEVENT -ir DURABILITY 100 "45"
 SETWEAPON DAGGER_IRON
 OBJECT_HIDE SELF YES
 ACCEPT
}

ON RELOAD {
 SET §enemy 1
 ACCEPT
}

ON LOAD {
 USEMESH "GOBLIN_BASE\TWEAKS\GOBLIN_WEAKER.TEO"
 ACCEPT
}

ON REACHEDTARGET {
  IF (^TARGET == MARKER_0580) {
    BEHAVIOR NONE
    SETTARGET NONE
>>DECISION
    RANDOM 50 {
      IF (§road == 1) GOTO DECISION
      SET §road 1
      BEHAVIOR MOVE_TO
      SETTARGET MARKER_0579
      ACCEPT
    }
    RANDOM 50 {
      IF (§road == 2) GOTO DECISION
      SET §road 2
      BEHAVIOR MOVE_TO
      SETTARGET MARKER_0367
      ACCEPT
    }
   ACCEPT
  }
  IF (^TARGET == MARKER_0367) {
    BEHAVIOR NONE
    SETTARGET NONE
    BEHAVIOR MOVE_TO
    SETTARGET MARKER_0579
    ACCEPT
  }
 ACCEPT
}

ON CUSTOM {
  IF (^$PARAM1 == "UNHIDE") {
    OBJECT_HIDE SELF NO
    BEHAVIOR MOVE_TO
    SETTARGET MARKER_0580
    ACCEPT
  }
 ACCEPT
}