// creator  : weidu.exe (version 23600)
// argument : GELLAN.DLG
// game     : .
// source   : ./DATA/DIALOG.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~GELLAN~

IF ~  !PartyHasItem("MISC13")
~ THEN BEGIN 0 // from:
  SAY #5271 /* ~For a bit o' respectful coin we can cure what ails thee, if you need.~ */
  IF ~~ THEN REPLY #15583 /* ~What sort of cures do you have available?~ */ DO ~StartStore("tem2304",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15584 /* ~Thank you, but we've just come to take a look around.~ */ EXIT
END

IF ~  PartyHasItem("MISC13")
~ THEN BEGIN 1 // from:
  SAY #5277 /* ~It would seem that you have someone among you who is badly injured. Is there something I could do for them?~ */
  IF ~~ THEN REPLY #5278 /* ~No, there isn't.~ */ EXIT
  IF ~  !GlobalTimerExpired("Samuel","GLOBAL")
~ THEN REPLY #5279 /* ~This man is named Samuel. We were told to bring him to you.~ */ GOTO 2
  IF ~  GlobalTimerExpired("Samuel","GLOBAL")
~ THEN REPLY #5293 /* ~This man is named Samuel. We were told to bring him to you.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 1.1
  SAY #5282 /* ~Oh, dear! It is Samuel, and what bad shape he is in. I am glad you have brought him to me. Such a fine young man, it's a pity that he let himself be persuaded by Lena to desert the Fist. Well nothing can be done about that, but something can be done about his health. For the service that you have provided, I want you to have some potions as a show of my gratitude.~ */
  IF ~  !GlobalTimerExpired("Samuel","GLOBAL")
~ THEN DO ~AddexperienceParty(500)
ReputationInc(1)
TakePartyItem("MISC13")
GiveItem("POTN09",LastTalkedToBy)
GiveItem("POTN17",LastTalkedToBy)
EraseJournalEntry(27086)
EraseJournalEntry(27085)
AddJournalEntry(27123,QUEST_DONE)
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.2
  SAY #5292 /* ~It seems you have brought him too late. He has expired from his injuries. This is such a great loss, but I guess there was nothing you could do.~ */
  IF ~  GlobalTimerExpired("Samuel","GLOBAL")
~ THEN DO ~TakePartyItem("MISC13")
EraseJournalEntry(27086)
EraseJournalEntry(27085)
AddJournalEntry(27124,QUEST_DONE)
~ EXIT
END
