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

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

IF WEIGHT #4 /* Triggers after states #: 19 20 22 even though they appear after this state */
~NumTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #8421 /* ~Illusionist~ */
  IF ~~ THEN DO ~SetGlobal("SpokeToAreana","GLOBAL",1)
~ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #8422 /* ~Svirfneblin Leader~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #8423 /* ~Svirfneblin Leader~ */
  IF ~~ THEN REPLY #8446 /* ~Vampiric Illithid~ */ GOTO 3
  IF ~~ THEN REPLY #8447 /* ~Brain Golem~ */ GOTO 4
  IF ~~ THEN REPLY #8448 /* ~Brain Golem~ */ GOTO 5
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #8424 /* ~Kuo-Toa Prince~ */
  IF ~~ THEN REPLY #8449 /* ~Baalor~ */ GOTO 5
  IF ~~ THEN REPLY #8450 /* ~Baalor~ */ GOTO 6
  IF ~~ THEN REPLY #8451 /* ~Lesser Demon Lord~ */ GOTO 9
END

IF ~~ THEN BEGIN 4 // from: 2.1
  SAY #8425 /* ~Kuo-Toa Prince~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 10.1 9.1 7.3 3.0 2.2
  SAY #8426 /* ~Simyaz~ */
  IF ~~ THEN DO ~SetGlobal("AcceptedJob","GLOBAL",2)
~ EXIT
END

IF ~~ THEN BEGIN 6 // from: 3.1
  SAY #8427 /* ~Simyaz~ */
  IF ~~ THEN DO ~SetGlobal("AcceptedJob","GLOBAL",1)
SetGlobal("AreanaAmount","GLOBAL",500)
~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 19 20 22 even though they appear after this state */
~Global("AcceptedJob","GLOBAL",1)
~ THEN BEGIN 7 // from:
  SAY #8428 /* ~Welcome to the guildhouse of my Order, old friends. It seems you fared better than I in those sewers -- I felt the evil below me fade, which is well. Tell me, how might I be of service to you?~ [KELDOR83] */
  IF ~Global("AreanaAmount","GLOBAL",500)
Dead("Cyrdemac")
~ THEN REPLY #8452 /* ~Lesser Demon Lord~ */ GOTO 12
  IF ~GlobalGT("AreanaAmount","GLOBAL",500)
Dead("Cyrdemac")
~ THEN REPLY #8453 /* ~~ */ GOTO 15
  IF ~!Dead("Cyrdemac")
~ THEN REPLY #8454 /* ~Silver Dragon~ */ GOTO 8
  IF ~~ THEN REPLY #8455 /* ~Silver Dragon~ */ GOTO 5
END

IF ~~ THEN BEGIN 8 // from: 7.2
  SAY #8429 /* ~Of course.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from: 3.2
  SAY #8430 /* ~Lil waela lueth waela ragar brorna lueth wund nind, kyorlin elghinn! Lolth kyorl dos! ( The drow then casts a spell that transports the entire party to the council room of Imrae.)~ */
  IF ~~ THEN REPLY #8456 /* ~I only did what I had to as captain of the group.  The Order would have frowned heavily had I let the novice fools be diced by the creature.~ */ DO ~SetGlobal("AreanaAmount","GLOBAL",2000)
~ GOTO 11
  IF ~~ THEN REPLY #8457 /* ~Lich~ */ GOTO 5
  IF ~~ THEN REPLY #8458 /* ~Your heroics saved the day.~ */ GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.2
  SAY #8431 /* ~Insane Dwarf Warrior~ */
  IF ~~ THEN REPLY #8459 /* ~Lich~ */ DO ~SetGlobal("AreanaAmount","GLOBAL",4000)~ GOTO 11
  IF ~~ THEN REPLY #8460 /* ~This is the Holy Font of the Druid Grove. Its waters are said the hold a magic that keeps the Grove and its Spirit alive and healthy. If something should happen to the waters, the Grove and the druids would suffer.~ */ GOTO 5
END

IF ~~ THEN BEGIN 11 // from: 10.0 9.0
  SAY #8432 /* ~It would have been a veritable slaughter had I not kept my wits about me.~ */
  IF ~~ THEN DO ~SetGlobal("AcceptedJob","GLOBAL",1)
~ EXIT
END

IF ~~ THEN BEGIN 12 // from: 7.0
  SAY #8433 /* ~Insane Dwarf Warrior~ */
  IF ~~ THEN REPLY #8461 /* ~Should you wish to do so, you could poison the Grove in an attempt to weaken Faldorn. You would need an appropriate poison.~ */ GOTO 14
  IF ~~ THEN REPLY #8462 /* ~Young Anomen, it seems to me that you have been too long away from the fold.  Perhaps this is a good time to continue your lessons.~ [KELDOR50] */ GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 16.0 15.0 12.1
  SAY #8434 /* ~War Elf~ */
  IF ~~ THEN DO ~SetGlobal("AcceptedJob","GLOBAL",2)
GiveGoldForce(500)
~ EXIT
END

IF ~~ THEN BEGIN 14 // from: 16.1 15.2 12.0
  SAY #8435 /* ~Efreeti Bottle~ */
  IF ~~ THEN DO ~SetGlobal("AcceptedJob","GLOBAL",2)
SetGlobal("BlackmailedNoblewoman","GLOBAL",1)
GiveGoldForce(500)
SetGlobalTimer("Blackmail","GLOBAL",TWO_DAYS)
SetGlobalTimer("Areana","GLOBAL",TEN_DAYS)
~ EXIT
END

IF ~~ THEN BEGIN 15 // from: 7.1
  SAY #8436 /* ~War Elf~ */
  IF ~~ THEN REPLY #8463 /* ~As Lord Khellon has suggested, you empty the sulphurous poison into the pool. The change happens within seconds and a putrid, unhealthy odor arises from the once pure waters.~ */ GOTO 13
  IF ~~ THEN REPLY #8464 /* ~I assure you, noble Keldorn, that I am well-versed in the statutes and moral laws of the Order.~ [ANOMEN55] */ GOTO 16
  IF ~~ THEN REPLY #8465 /* ~There is no further damage that you can do to the pool that would be greater than that which you have already wrought. The Grove is dying.~ */ GOTO 14
END

IF ~~ THEN BEGIN 16 // from: 15.1
  SAY #8437 /* ~Vampiric Illithid~ */
  IF ~~ THEN REPLY #8466 /* ~Silver Dragon Cone of Cold~ */ GOTO 13
  IF ~~ THEN REPLY #8467 /* ~Silver Dragon Paralyzation~ */ GOTO 14
END

IF WEIGHT #6 /* Triggers after states #: 19 20 22 even though they appear after this state */
~!GlobalTimerExpired("Blackmail","GLOBAL")
Global("BlackmailedNoblewoman","GLOBAL",1)
GlobalLT("Shakedown","GLOBAL",7)
~ THEN BEGIN 17 // from:
  SAY #8439 /* ~I jumped on its back and impaled it through the spine with my spear.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 /* Triggers after states #: 19 20 22 even though they appear after this state */
~GlobalTimerExpired("Blackmail","GLOBAL")
Global("BlackmailedNoblewoman","GLOBAL",1)
GlobalLT("Shakedown","GLOBAL",7)
~ THEN BEGIN 18 // from:
  SAY #8440 /* ~Dilav~ */
  IF ~~ THEN DO ~GiveGoldForce(500)
SetGlobalTimer("Blackmail","GLOBAL",TWO_DAYS)
IncrementGlobal("Shakedown","GLOBAL",1)
ReputationInc(-1)
~ EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
Global("AcceptedJob","GLOBAL",1)
Global("AreanaAmount","GLOBAL",500)
~ THEN BEGIN 19 // from:
  SAY #8468 /* ~~ */
  IF ~~ THEN DO ~Global("AcceptedJob","GLOBAL",2)
GiveGoldForce(500)
GiveItem("MISC20",LastTalkedToBy)
~ EXIT
END

IF WEIGHT #1 ~StateCheck(Myself,STATE_CHARMED)
Global("AcceptedJob","GLOBAL",1)
!Global("AreanaAmount","GLOBAL",500)
~ THEN BEGIN 20 // from:
  SAY #8469 /* ~Rest House~ */
  IF ~~ THEN DO ~Global("AcceptedJob","GLOBAL",2)
GiveGoldForce(500)
GiveItem("MISC20",LastTalkedToBy)
~ EXIT
END

IF ~~ THEN BEGIN 21 // from:
  SAY #9126 /* ~I would like that.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 ~GlobalTimerExpired("Areana","GLOBAL")
!Exists("TorLobo")
!Dead("TorLobo")
~ THEN BEGIN 22 // from:
  SAY #17322 /* ~You have been involved in illegal use of magic.  You will come with us!~ [CSCO704A] */
  IF ~~ THEN DO ~CreateCreature("TORLOB",[349.474])
~ EXIT
END
