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

BEGIN ~WAYLANE~ 2 // non-zero flags may indicate non-pausing dialogue
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #0 ~See("Minsc")
InParty("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
RandomNum(2,1)
Global("waylaneminsc","LOCALS",0)~ THEN BEGIN 0 // from:
  SAY #24850 /* ~Hey!  Hey you there!  Fella with the painted head!~ */
  IF ~~ THEN DO ~SetGlobal("waylaneminsc","LOCALS",1)~ EXTERN ~MINSCJ~ 38
END

IF ~~ THEN BEGIN 1 // from:
  SAY #24853 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~~ THEN EXTERN ~MINSCJ~ 39
END

IF ~~ THEN BEGIN 2 // from:
  SAY #24857 /* ~Oh, er... the l'il fella says all that, does he?~ */
  IF ~~ THEN EXTERN ~MINSCJ~ 40
END

IF ~~ THEN BEGIN 3 // from:
  SAY #24859 /* ~I see.  What else does he say?~ */
  IF ~~ THEN EXTERN ~MINSCJ~ 41
END

IF WEIGHT #1 ~See("Yoshimo")
InParty("Yoshimo")
!StateCheck("Yoshimo",STATE_SLEEPING)
RandomNum(2,2)
Global("waylaneyoshimo","LOCALS",0)~ THEN BEGIN 4 // from:
  SAY #24863 /* ~Hey!  Hey you there!  Fella in the black leather!~ */
  IF ~~ THEN DO ~SetGlobal("waylaneyoshimo","LOCALS",1)~ EXTERN ~YOSHJ~ 7
END

IF ~~ THEN BEGIN 5 // from: YOSHJ:7.0
  SAY #24866 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 8
END

IF ~~ THEN BEGIN 6 // from: YOSHJ:8.0
  SAY #24868 /* ~You... er... you think so?  Too cheap?~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 9
END

IF ~~ THEN BEGIN 7 // from: YOSHJ:9.0
  SAY #24870 /* ~Say... you are right, sir!  From now on, the asking price is 10,000 gold pieces!~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 10
END

IF ~~ THEN BEGIN 8 // from: YOSHJ:10.0
  SAY #24872 /* ~Thank you!  For a fella who looks like a ruffian, yer pretty bright, I'd say!~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 11
END

IF WEIGHT #2 ~See("Jaheira")
InParty("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)
RandomNum(2,1)
Global("waylanejaheira","LOCALS",0)~ THEN BEGIN 9 // from:
  SAY #24874 /* ~You!  Hey you!  Elf lady with the curly hair!~ */
  IF ~~ THEN DO ~SetGlobal("waylanejaheira","LOCALS",1)~ EXTERN ~JAHEIRAJ~ 234
END

IF ~~ THEN BEGIN 10 // from:
  SAY #24876 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 235
END

IF ~~ THEN BEGIN 11 // from:
  SAY #24878 /* ~Yes, well... er...200 gold pieces?~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 236
END

IF WEIGHT #3 ~See("Jan")
InParty("Jan")
!StateCheck("Jan",STATE_SLEEPING)
RandomNum(2,2)
Global("waylanejan","LOCALS",0)~ THEN BEGIN 12 // from:
  SAY #24881 /* ~You!  Hey you!  Gnome!~ */
  IF ~~ THEN DO ~SetGlobal("waylanejan","LOCALS",1)~ EXTERN ~JANJ~ 55
END

IF ~~ THEN BEGIN 13 // from:
  SAY #24883 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~~ THEN EXTERN ~JANJ~ 56
END

IF ~~ THEN BEGIN 14 // from:
  SAY #24891 /* ~Er... ummm... You!  You over there!  No, not the gnome... you!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 /* Triggers after states #: 21 25 even though they appear after this state */
~True()~ THEN BEGIN 15 // from:
  SAY #24896 /* ~You!  Hey you!  The <LADYLORD> there with the others!~ */
  IF ~~ THEN REPLY #24899 /* ~Er... me?~ */ GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #24898 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~PartyGoldGT(499)~ THEN REPLY #24900 /* ~Sure, that sounds like a great deal!~ */ DO ~TakePartyGold(500)~ GOTO 17
  IF ~~ THEN REPLY #24902 /* ~You own the sphere, here?~ */ GOTO 18
  IF ~~ THEN REPLY #24903 /* ~Tell me what the sphere is, first.  And how do you open it?~ */ GOTO 19
  IF ~~ THEN REPLY #24904 /* ~Forget it.~ */ GOTO 20
END

IF ~~ THEN BEGIN 17 // from: 19.1 16.0
  SAY #24905 /* ~Excellent doing business with you!  I'll just... leave you alone with your new purchase.~ */
  IF ~~ THEN DO ~EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 18 // from: 16.1
  SAY #24907 /* ~No.  What does that have to do with anything?~ */
  IF ~~ THEN REPLY #24908 /* ~How can you sell something you don't own?~ */ GOTO 20
  IF ~~ THEN REPLY #24909 /* ~This is wrong... you can't go selling something like that!~ */ GOTO 20
  IF ~~ THEN REPLY #24911 /* ~I suppose nothing.  But I don't want to buy it off of you, that's for sure.~ */ GOTO 20
END

IF ~~ THEN BEGIN 19 // from: 16.2
  SAY #24913 /* ~You... open it with a magic word.  Yes... a magic word.  Which I will sell to you for the 500 gold pieces.~ */
  IF ~~ THEN REPLY #24915 /* ~Show me, first.  Open up the sphere for me.~ */ GOTO 20
  IF ~PartyGoldGT(499)~ THEN REPLY #24918 /* ~That sounds like a deal.  Here's the 500 gp.~ */ DO ~TakePartyGold(500)~ GOTO 17
  IF ~~ THEN REPLY #24920 /* ~Forget it.  Not interested.~ */ GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.2 19.0 18.2 18.1 18.0 16.3
  SAY #24921 /* ~Rats!  Hmm... You!  Hey you!  You over there!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~See("Valygar")
InParty("Valygar")
!StateCheck("Valygar",STATE_SLEEPING)
RandomNum(2,1)~ THEN BEGIN 21 // from:
  SAY #38948 /* ~Hey!  Hey, you there!  Fella in the dusty coat!~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 28
END

IF ~~ THEN BEGIN 22 // from: VALYGARJ:28.0
  SAY #38950 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 29
END

IF ~~ THEN BEGIN 23 // from: VALYGARJ:29.0
  SAY #38953 /* ~Er... ah... got it, ah, yes I sure do...~ */
  IF ~~ THEN DO ~EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 24 // from:
  SAY #38957 /* ~Yes, you!  See this mighty fine sphere, here?  You can have it for your very own for a mere 500 gold pieces!  What do you say?~ */
  IF ~~ THEN EXTERN ~NALIAJ~ 142
END

IF WEIGHT #5 ~See("Nalia")
InParty("Nalia")
!StateCheck("Nalia",STATE_SLEEPING)
RandomNum(2,2)
Global("waylanenalia","LOCALS",0)~ THEN BEGIN 25 // from:
  SAY #38958 /* ~Hey!  You there!  The pretty young lady in the hood!~ */
  IF ~~ THEN DO ~SetGlobal("waylanenalia","LOCALS",1)~ EXTERN ~NALIAJ~ 141
END
