BEGIN ~alatos~

IF WEIGHT #0 ~NumTimesTalkedTo(0)~ THEN BEGIN 0
  SAY @2783
  IF ~~ THEN DO ~SetGlobal("TalkedToThief","GLOBAL",1)
SetGlobal("TalkedToAlatos","GLOBAL",1)~ GOTO 1
END

IF ~~ THEN BEGIN 1
  SAY @2784
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)~ THEN REPLY @2785 GOTO 2
  IF ~~ THEN REPLY @2786 GOTO 5
  IF ~~ THEN REPLY @2787 GOTO 4
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)~ THEN REPLY @2803 GOTO 3
END

IF ~~ THEN BEGIN 2
  SAY @2788
  IF ~~ THEN REPLY @2789 GOTO 3
  IF ~~ THEN REPLY @2790 GOTO 5
  IF ~~ THEN REPLY @2791 GOTO 4
END

IF ~~ THEN BEGIN 3
  SAY @2792
  IF ~~ THEN DO ~EraseJournalEntry(@310248)
Shout(1)
Enemy()~ SOLVED_JOURNAL @310259 EXIT
END

IF ~~ THEN BEGIN 4
  SAY @2793
  IF ~~ THEN REPLY @2794 GOTO 6
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)~ THEN REPLY @2795 GOTO 7
  IF ~~ THEN REPLY @2796 GOTO 9
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)~ THEN REPLY @2821 GOTO 8
END

IF ~~ THEN BEGIN 5
  SAY @2798
  IF ~~ THEN REPLY @2799 GOTO 6
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)~ THEN REPLY @2800 GOTO 7
  IF ~~ THEN REPLY @2801 GOTO 9
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)~ THEN REPLY @2822 GOTO 8
END

IF ~~ THEN BEGIN 6
  SAY @2804
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)~ THEN REPLY @2807 GOTO 7
  IF ~~ THEN REPLY @2808 GOTO 9
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)~ THEN REPLY @2823 GOTO 8
END

IF ~~ THEN BEGIN 7
  SAY @2809
  IF ~~ THEN REPLY @2824 GOTO 6
  IF ~~ THEN REPLY @2825 GOTO 9
  IF ~~ THEN REPLY @2826 GOTO 8
END

IF ~~ THEN BEGIN 8
  SAY @2810
  IF ~~ THEN DO ~EraseJournalEntry(@310248)
Shout(1)
Enemy()~ SOLVED_JOURNAL @310260 EXIT
END

IF ~~ THEN BEGIN 9
  SAY @2811
  IF ~~ THEN REPLY @2827 DO ~SetGlobal("ASSNUTS","GLOBAL",1)~ GOTO 10
  IF ~~ THEN REPLY @2828 GOTO 18
END

IF ~~ THEN BEGIN 10
  SAY @2812
  IF ~~ THEN DO ~SetGlobal("HelpAlatos","GLOBAL",1)~ UNSOLVED_JOURNAL @310261 EXIT
END

IF WEIGHT #3 ~Global("HelpAlatos","GLOBAL",2)
!Dead("Resar")~ THEN BEGIN 11
  SAY @2813
  IF ~~ THEN DO ~TakePartyItem("MISC69")
TakePartyItem("MISC70")
TakePartyItem("MISC71")~ EXTERN ~RESAR~ 0
END

IF WEIGHT #2 ~PartyHasItem("MISC69")
PartyHasItem("MISC70")
PartyHasItem("MISC71")
!Dead("Resar")~ THEN BEGIN 12
  SAY @2814
  IF ~~ THEN DO ~SetGlobal("HelpAlatos","GLOBAL",2)
AddexperienceParty(4000)
TakePartyItem("MISC69")
TakePartyItem("MISC70")
TakePartyItem("MISC71")~ EXTERN ~RESAR~ 1
END

IF WEIGHT #1 ~PartyHasItem("MISC69")
PartyHasItem("MISC70")
PartyHasItem("MISC71")
!Dead("Helshara")
!Dead("Delorna")
!Dead("Ithmeera")
!Dead("Oberan")
!Dead("Resar")~ THEN BEGIN 13
  SAY @2815
  IF ~~ THEN DO ~SetGlobal("HelpAlatos","GLOBAL",2)
AddexperienceParty(4000)
TakePartyItem("MISC69")
TakePartyItem("MISC70")
TakePartyItem("MISC71")~ EXTERN ~RESAR~ 2
END

IF ~~ THEN BEGIN 14
  SAY @2816
  IF ~~ THEN EXTERN ~RESAR~ 3
END

IF ~~ THEN BEGIN 15
  SAY @2817
  IF ~~ THEN EXTERN ~NARLEN~ 27
END

IF ~~ THEN BEGIN 16
  SAY @2818
  IF ~~ THEN EXTERN ~NARLEN~ 28
END

IF ~~ THEN BEGIN 17
  SAY @2819
  IF ~~ THEN EXTERN ~NARLEN~ 29
END

IF ~~ THEN BEGIN 18
  SAY @2830
  IF ~~ THEN REPLY @2831 GOTO 19
  IF ~~ THEN REPLY @2832 GOTO 10
  IF ~~ THEN REPLY @2834 GOTO 3
END

IF ~~ THEN BEGIN 19
  SAY @2833
  IF ~~ THEN REPLY @2829 GOTO 8
  IF ~~ THEN REPLY @2835 GOTO 10
  IF ~~ THEN REPLY @2836 GOTO 3
END

IF WEIGHT #4 ~Dead("Resar")~ THEN BEGIN 20
  SAY @11813
  IF ~~ THEN EXIT
END
