BEGIN ~perdue~

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 0
  SAY @14802
  IF ~~ THEN REPLY @14818 GOTO 1
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)~ THEN REPLY @14819 GOTO 2
  IF ~~ THEN REPLY @14820 GOTO 3
  IF ~~ THEN REPLY @14821 GOTO 4
END

IF ~~ THEN BEGIN 1
  SAY @14803
  IF ~~ THEN REPLY @14822 GOTO 6
  IF ~~ THEN REPLY @14823 GOTO 5
  IF ~~ THEN REPLY @14824 GOTO 6
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)~ THEN REPLY @14825 GOTO 2
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)~ THEN REPLY @14826 GOTO 3
END

IF ~~ THEN BEGIN 2
  SAY @14804
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3
  SAY @14805
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4
  SAY @14806
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5
  SAY @14807
  IF ~~ THEN REPLY @14827 GOTO 7
  IF ~~ THEN REPLY @14829 GOTO 16
  IF ~~ THEN REPLY @14832 GOTO 2
END

IF ~~ THEN BEGIN 6
  SAY @14808
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7
  SAY @14809
  IF ~~ THEN REPLY @14833 DO ~SetGlobal("PerduePayment","GLOBAL",50)
SetGlobal("HelpPerdue","GLOBAL",1)~ UNSOLVED_JOURNAL @310049 GOTO 3
  IF ~~ THEN REPLY @14834 GOTO 2
END

IF ~~ THEN BEGIN 8
  SAY @14810
  IF ~~ THEN REPLY @14835 DO ~SetGlobal("PerduePayment","GLOBAL",75)
SetGlobal("HelpPerdue","GLOBAL",1)~ UNSOLVED_JOURNAL @310050 GOTO 3
  IF ~~ THEN REPLY @14836 GOTO 2
END

IF ~False()~ THEN BEGIN 9
  SAY @14811
  IF ~~ THEN EXIT
END

IF ~StateCheck(Myself,STATE_CHARMED)~ THEN BEGIN 10
  SAY @14812
  IF ~~ THEN EXIT
END

IF ~Global("HelpPerdue","GLOBAL",1)
!PartyHasItem("SW1H17")~ THEN BEGIN 11
  SAY @14813
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 12
  SAY @14814
  IF ~~ THEN DO ~AddexperienceParty(250)
GivePartyGold(50)
SetGlobal("HelpPerdue","GLOBAL",2)~ EXIT
END

IF ~~ THEN BEGIN 13
  SAY @14815
  IF ~~ THEN DO ~AddexperienceParty(250)
GivePartyGold(75)
SetGlobal("HelpPerdue","GLOBAL",2)~ EXIT
END

IF ~PartyHasItem("SW1H17")~ THEN BEGIN 14
  SAY @14816
  IF ~~ THEN DO ~TakePartyItem("SW1H17")
GivePartyGoldGlobal("PerduePayment","GLOBAL")
AddexperienceParty(500)
EraseJournalEntry(@310049)
EraseJournalEntry(@310050)
SetGlobal("HelpPerdue","GLOBAL",2)~ SOLVED_JOURNAL @310051 EXIT
END

IF ~~ THEN BEGIN 15
  SAY @14817
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16
  SAY @14830
  IF ~~ THEN EXIT
END

IF ~True()~ THEN BEGIN 17
  SAY @14831
  IF ~~ THEN EXIT
END
