// creator  : weidu.exe (version 23100)
// argument : SAFANA.DLG
// game		 : .
// source	 : ./DATA/DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~SAFANA~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #2 /* Triggers after states #: 11 14 even though they appear after this state */
~NumTimesTalkedTo(0)
InParty([0.0.0.0.0.MALE])
~ THEN BEGIN 0 // from:
  SAY #587 /* ~Yes, I would. Welcome!~ */
  IF ~~ THEN REPLY #601 /* ~I've changed my mind. Enjoy your day!~ */ EXIT
  IF ~ReactionGT(LastTalkedToBy(),NEUTRAL_UPPER)
~ THEN REPLY #602 /* ~Here is your gold.~ */ GOTO 1
  IF ~ReactionLT(LastTalkedToBy(),FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy(),HOSTILE_UPPER)
~ THEN REPLY #822 /* ~Barracks Guard~ */ GOTO 2
  IF ~ReactionLT(LastTalkedToBy(),NEUTRAL_LOWER)
~ THEN REPLY #823 /* ~Barracks Guard~ */ GOTO 3
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #588 /* ~Not at this time, Jan. Perhaps later.~ */
  IF ~~ THEN REPLY #603 /* ~Look, I can spot you 200gp. Do you have just 600gp?~ */ GOTO 6
  IF ~~ THEN REPLY #604 /* ~Yes, I do. It's a deal.~ */ GOTO 4
END

IF ~~ THEN BEGIN 2 // from: 0.2
  SAY #589 /* ~Yes I would. Welcome!~ */
  IF ~~ THEN REPLY #605 /* ~I'm afraid that I just don't have enough.~ */ GOTO 6
  IF ~~ THEN REPLY #606 /* ~I refuse to take your charity. You'll simply have to wait.~ */ GOTO 4
END

IF ~~ THEN BEGIN 3 // from: 0.3
  SAY #590 /* ~Not at this time, Jan. Perhaps later.~ */
  IF ~~ THEN REPLY #607 /* ~You're not <CHARNAME>? Ah, well. I guess I'll just cling to the hope that someone will bail him out... or buy me enough liquor to drink myself senseless.~ */ GOTO 6
  IF ~~ THEN REPLY #608 /* ~Ah, well. I suppose I shall have to cling to the hope that someone will bail him or at least buy me enough liquor to drink myself senseless.~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.1 2.1 1.1
  SAY #591 /* ~It's alright, Daleson. It is nothing I have not heard from Aunty already.~ */
  IF ~~ THEN REPLY #609 /* ~Am I to be cursed with this gnome forever? You're driving me to drink! You and my mother, both. Take pity on a simple man... come back and pay the fine.~ */ GOTO 6
  IF ~~ THEN REPLY #610 /* ~Right, she's one stuffed old biddy, isn't she? We got a saying for her kind we do. South end of a north-bound ogre...~ */ GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.1
  SAY #592 /* ~Ah, the fabled savior of yonder gnome. You've come to pay his fine?~ */
  IF ~~ THEN DO ~SetGlobalTimer("Safana","GLOBAL",FIVE_DAYS)
JoinParty()
~ JOURNAL #16772 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 6 // from: 4.0 3.0 2.0 1.0
  SAY #593 /* ~Yes, I would like to pay his fine.~ */
  IF ~~ THEN DO ~

~ EXIT
END

IF ~~ THEN BEGIN 7 // from:
  SAY #594 /* ~I don't know what you're talking about. What gnome?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #598 /* ~He would like to think so but I am not planning to pay his way out of jail.~ */
  IF ~~ THEN REPLY #611 /* ~That will do, Daleson! You will not talk of her thus!~ */ DO ~

~ EXIT
  IF ~~ THEN REPLY #612 /* ~Excellent! He is free so, please, take him and go.~ */ DO ~JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 12.0
  SAY #599 /* ~At last! That gnome is the worst prisoner I ever had!  He keeps picking the lock, complains about the food... even my hygiene!  Just pay the 800gp and take him!~ */
  IF ~~ THEN DO ~

~ EXIT
END

IF ~~ THEN BEGIN 10 // from: 12.1
  SAY #600 /* ~I'm afraid that I don't have enough gold right now.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Safana","GLOBAL",FIVE_DAYS)
JoinParty()
~ EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
InParty([0.0.0.0.0.MALE])
~ THEN BEGIN 11 // from:
  SAY #6371 /* ~Shadow Dragon Scale +6~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 12 // from:
  SAY #6372 /* ~I admit I have come to spy on Mae'Var. What exactly do you want of me?~ */
  IF ~~ THEN REPLY #6373 /* ~I wonder if I saw what I think I saw. You were all ogres fighting, yet deaths yielded human bodies. Now there are no monsters, only you and these slain knights.~ */ GOTO 9
  IF ~~ THEN REPLY #6374 /* ~It appears that we have been tricked into killing these knights!~ */ GOTO 10
END

IF WEIGHT #3 /* Triggers after states #: 14 even though they appear after this state */
~NumTimesTalkedTo(0)
~ THEN BEGIN 13 // from:
  SAY #14737 /* ~Raelis Shai~ */
  IF ~~ THEN JOURNAL #24108 /* ~We merely stopped by to admire your beauty.~ */ EXIT
END

IF WEIGHT #1 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 14 // from:
  SAY #14738 /* ~Ye don't know where ye are?  By Helm, ye're in Athkatla, jewel of Amn.~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~~ THEN BEGIN 15 // from:
  SAY #14739 /* ~Raelis Shai~ */
  IF ~~ THEN DO ~LeaveParty()
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 16 // from:
  SAY #14740 /* ~Aye, the wizard was angrier 'an a dragon, blastin' these men in black.  Bleedin' wizard killed 'em all, an took half the Promenade too, 'fore he stopped.~ */
  IF ~~ THEN DO ~LeaveParty()
SetDialogue("Safanap")
~ EXIT
END

IF WEIGHT #4 ~True()
~ THEN BEGIN 17 // from:
  SAY #10884 /* ~Protected by Spell Deflection~ */
  IF ~~ THEN REPLY #10885 /* ~It is not my concern. Give me what you have.~ */ EXIT
  IF ~~ THEN REPLY #10886 /* ~I've no time to spare talking to you. I must find away out of this madman's dungeon.~ */ DO ~SetGlobalTimer("Safana","GLOBAL",TEN_DAYS)
JoinParty()
~ EXIT
END
