// creator  : weidu.exe (version 23100)
// argument : _CORAN.DLG
// game		 : .
// source	 : ./override/_CORAN.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #1 /* Triggers after states #: 12 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
ReactionGT(LastTalkedToBy(Myself),NEUTRAL_UPPER)
~ THEN BEGIN 0 // from:
  SAY #88054 /* ~It's refreshing to find other people in this wood.  My name is Coran: thief and archer!  I've been alone in the wilderness for far too long.  I wouldn't mind returning to the big city but I have yet to collect my bounty.  I'd share the reward with the lot of you, if you would help hasten the hunt.  You interested in hearing more?~ */
  IF ~~ THEN REPLY #88055 /* ~Yes, tell us more.~ */ GOTO 4
  IF ~~ THEN REPLY #88056 /* ~Nope, go away.~ */ GOTO 3
END

IF WEIGHT #2 /* Triggers after states #: 12 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy(Myself),FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy(Myself),HOSTILE_UPPER)
~ THEN BEGIN 1 // from:
  SAY #88057 /* ~Sorry if I startled you, but I always approach strangers cautiously.  I'm Coran, hunter and archer.  Are any of you interested in making some money?  If you are, I'm the person who could help you do it.~ */
  IF ~~ THEN REPLY #88055 /* ~Yes, tell us more.~ */ GOTO 4
  IF ~~ THEN REPLY #88058 /* ~No time for that right now.~ */ GOTO 3
END

IF WEIGHT #3 /* Triggers after states #: 12 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy(Myself),NEUTRAL_LOWER)
~ THEN BEGIN 2 // from:
  SAY #88059 /* ~Sorry to be so abrupt, but I haven't time for monotonous chit chat.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.1 0.1
  SAY #88060 /* ~No problem, though you are missing quite the little adventure.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 7.1 1.0 0.0
  SAY #88061 /* ~Good, I'm glad you're smart enough to recognize opportunity when it comes knocking.  The deal is this:  I've been hired out by the mayor of Beregost to hunt down a great winged dragon that's been plaguing the caravan routes.  He's offered 2,000 gold for its head.  Now before you get cold feet, let me allay your fears.  The only descriptions of the beast have always mentioned its deadly barbed tail.  From what I know about dragons they don't have barbs on their tails: that's something unique to wyverns.  So all we have to do is find this wyvern's nest and kill it.  Our only worries are if it has friends over for dinner!  So what is your decision, yea or nay?~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
  IF ~Global("X#CORAN4","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORAN4","GLOBAL",1)~ GOTO 17
  IF ~Global("X#CORAN4","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORAN4","GLOBAL",1)~ GOTO 18
  IF ~Global("X#CORAN4","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORAN4","GLOBAL",1)~ EXTERN ~_XANJ~ 284
  IF ~Global("X#CORAN4","GLOBAL",0)
InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORAN4","GLOBAL",1)~ EXTERN ~_SHARTJ~ 201
END

IF ~~ THEN BEGIN 5 // from: 23.0 22.0 21.0 20.0 19.0 18.0 17.0 4.0
  SAY #88064 /* ~Very well then.  We shouldn't tarry any longer; let's collect the heads of those soon-to-be-sorry wyverns.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Coran","GLOBAL",EIGHT_DAYS)
JoinParty()
~ UNSOLVED_JOURNAL #88065 /* ~Coran, hunter of wyverns

We have decided to join up with an elf named Coran in hunting down a wyvern.  There has been a substantial reward offered for the head of the beast.  We can collect the award just east of Beregost at the temple of Lathander.  That is where the mayor of Beregost is to be found, as he is also the head of the temple.~ */ EXIT
  IF ~Global("wyvernp","GLOBAL",1)
~ THEN DO ~SetGlobalTimer("Coran","GLOBAL",EIGHT_DAYS)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 6 // from: 23.1 22.1 21.1 20.1 19.1 18.1 17.1 4.1
  SAY #88066 /* ~Aren't stout enough of heart?  I can understand, not all of us are.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 12 even though they appear after this state */
~True()
~ THEN BEGIN 7 // from:
  SAY #88067 /* ~Perhaps you've changed your minds about my offer from before.  Come now, it would be quite the adventure.~ */
  IF ~~ THEN REPLY #88068 /* ~Still not interested.~ */ EXIT
  IF ~~ THEN REPLY #82318 /* ~Okay, what do you have to say?~ */ GOTO 4
END

IF ~~ THEN BEGIN 8 // from:
  SAY #84943 /* ~I have a daughter?  That's... that's ahhhhh... wonderful.~ */
  IF ~~ THEN EXTERN ~_BRIELB~ 1
END

IF ~~ THEN BEGIN 9 // from:
  SAY #84944 /* ~Her name's Namara... curse, what curse?  Slow down and let me...~ */
  IF ~~ THEN EXTERN ~_BRIELB~ 2
END

IF ~~ THEN BEGIN 10 // from:
  SAY #84945 /* ~All right, I'll do this for my... ummmm... daughter.  So friends, are you with me or not? 'Cause if you're not I'll have to do this alone.~ */
  IF ~~ THEN REPLY #88069 /* ~We don't have time for stupid family problems, you're on your own.~ */ EXIT
  IF ~~ THEN REPLY #80560 /* ~Sure, we'll help you.~ */ EXTERN ~_BRIELB~ 7
END

IF ~~ THEN BEGIN 11 // from:
  SAY #84947 /* ~I'm sorry Briel, but I just don't have the time or inclination to care for your... I mean our child.~ */
  IF ~~ THEN EXTERN ~_BRIELB~ 14
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 12 // from:
  SAY #84956 /* ~What knowledge would you like from me?  I could tell you about the beautiful forests of Tethir, or the many gorgeous damsels that have fallen for my charms.  I have studied up on the wyverns that prey upon the area.  They have wicked barbs upon their tails, which they use to poison their victims.  They are cruel beasts that enjoy inflicting suffering upon their prey.  I really have not much more to say.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from:
  SAY #88070 /* ~Can't stick around to talk, I have some wyverns to kill.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from:
  SAY #76111 /* ~I'll not speak a word after what you did!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from:
  SAY #84955 /* ~It is too hard to be stealthy with a group like this. I should have known not to have joined you in the first place.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from:
  SAY #84950 /* ~Ah well, even the best things pass away.  Your company was enjoyable while it lasted.  Perhaps we shall meet again.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 17 // from: 4.2
  SAY #103617 /* ~So, are you as jittery as this cold-footed, long-faced fellow?~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
END

IF ~~ THEN BEGIN 18 // from: 4.3
  SAY #103616 /* ~The scenery, mellonamin, the scenery...~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.2
  SAY #103617 /* ~So, are you as jittery as this cold-footed, long-faced fellow?~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
END

IF ~~ THEN BEGIN 20 // from:
  SAY #103616 /* ~The scenery, mellonamin, the scenery...~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.2
  SAY #103617 /* ~So, are you as jittery as this cold-footed, long-faced fellow?~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
END

IF ~~ THEN BEGIN 22 // from:
  SAY #103616 /* ~The scenery, mellonamin, the scenery...~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN GOTO 23
END

IF ~~ THEN BEGIN 23 // from: 22.2
  SAY #103617 /* ~So, are you as jittery as this cold-footed, long-faced fellow?~ */
  IF ~~ THEN REPLY #88062 /* ~Yea.~ */ GOTO 5
  IF ~~ THEN REPLY #88063 /* ~Nay.~ */ GOTO 6
END
