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

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

IF WEIGHT #0 ~Global("arntra03Move","AR0307",4)
Global("TalkedToPelanna","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #36469 /* ~Hold!  Do you be a new trainee, here?~ */
  IF ~~ THEN REPLY #36470 /* ~Yes, I am, in fact.~ */ DO ~SetGlobal("TalkedToPelanna","GLOBAL",1)
~ GOTO 1
  IF ~~ THEN REPLY #36471 /* ~Actually, I'm looking for Aran Linvail.~ */ DO ~SetGlobal("TalkedToPelanna","GLOBAL",1)
~ GOTO 2
  IF ~~ THEN REPLY #36472 /* ~No, I'm not.  What is this place?~ */ DO ~SetGlobal("TalkedToPelanna","GLOBAL",1)
~ GOTO 4
  IF ~~ THEN REPLY #36477 /* ~Out of my way, woman!  I have no business with you!~ */ DO ~SetGlobal("TalkedToPelanna","GLOBAL",1)
~ GOTO 5
END

IF ~~ THEN BEGIN 1 // from: 5.1 0.0
  SAY #36473 /* ~Hmmn.  I don't seem to recall anyone being scheduled with me.  Aran certainly hasn't mentioned anything... mind you, he's too busy with that tart of his.  What is your name?~ */
  IF ~~ THEN REPLY #36474 /* ~I am <CHARNAME>.~ */ GOTO 6
  IF ~~ THEN REPLY #36475 /* ~My name is none of your business.~ */ GOTO 7
  IF ~~ THEN REPLY #36476 /* ~Actually, I'm looking for Aran Linvail.~ */ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 8.2 6.2 5.0 4.0 1.2 0.1
  SAY #36478 /* ~Eh?  Looking for Aran, are you?  Well, he doesn't meet with just anyone... you'll have to tear him away from the clutches of Tassa, first, and that won't be easy.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #36479 /* ~Just who are you and what is your business with Aran?~ */
  IF ~~ THEN REPLY #36480 /* ~My name is <CHARNAME>... and I was told that Aran could help me.~ */ GOTO 9
  IF ~~ THEN REPLY #36481 /* ~My name is <CHARNAME>... and I paid a great deal for Aran's help.~ */ GOTO 11
  IF ~CheckStatGT(Player1,13,42)~ THEN REPLY #36482 /* ~My name is none of your business... nor is my purpose.~ */ GOTO 12
  IF ~CheckStatLT(Player1,14,42)~ THEN REPLY #36503 /* ~My name is none of your business... nor is my purpose.~ */ GOTO 13
END

IF ~~ THEN BEGIN 4 // from: 0.2
  SAY #36483 /* ~This is the training run for the Shadow Thieves, my friend.  I am Sergeant Pelanna, Mistress of the Run.  If you're not here to see me, then what are you here for?~ */
  IF ~~ THEN REPLY #36484 /* ~I'm here to see Aran Linvail.~ */ GOTO 2
  IF ~~ THEN REPLY #36486 /* ~It's none of your business.~ */ GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.1 0.3
  SAY #36487 /* ~Hmph!  You'll have business with me soon enough, friend, if you keep up that tone!  Why are you here?~ */
  IF ~~ THEN REPLY #36488 /* ~I'm here to see Aran Linvail.~ */ GOTO 2
  IF ~~ THEN REPLY #36489 /* ~I'm here to receive training.~ */ GOTO 1
END

IF ~~ THEN BEGIN 6 // from: 1.0
  SAY #36491 /* ~<CHARNAME>, is it?  Fair enough.  I am Pelanna, Mistress of the Run.  This here is part of the training facility for the Shadow Thieves.  Did... did Renal send you here?~ */
  IF ~~ THEN REPLY #36492 /* ~Yes, he did.~ */ GOTO 19
  IF ~~ THEN REPLY #36493 /* ~No, Gaelan Bayle did.~ */ GOTO 19
  IF ~~ THEN REPLY #36494 /* ~Actually, I'm here to see Aran Linvail.~ */ GOTO 2
END

IF ~~ THEN BEGIN 7 // from: 1.1
  SAY #36495 /* ~(sigh)  I get far too many of your type arriving, these days.  I don't care how mysterious you are, you know.  I am Pelanna, Mistress of the Run... I'll be in charge of your training, here.~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #36496 /* ~It IS odd, though, that I don't recognize you.  Did Renal send you?  Did he give you access to the door?~ */
  IF ~~ THEN REPLY #36497 /* ~Yes, he did.~ */ GOTO 19
  IF ~~ THEN REPLY #36498 /* ~No, Gaelan Bayle did.~ */ GOTO 19
  IF ~~ THEN REPLY #36499 /* ~Actually, I'm looking for Aran Linvail.~ */ GOTO 2
END

IF ~~ THEN BEGIN 9 // from: 13.0 3.0
  SAY #36500 /* ~Aran could help a great many people... the question is whether he will want to or not.  Hmm.  Well, you've been given access, so I won't stop you.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 19.0 12.0 11.0 9.0
  SAY #36501 /* ~You can find Aran in his quarters in the southeast corner of this level of the guild. Eh, I'd better give you better directions than that. He keeps it hidden well.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 11 // from: 13.1 3.1
  SAY #36502 /* ~Ah.  I've never known Aran to treat gold as anything more than water... but if he's demanded a payment, likely he wants to see you, regardless.  Very well, I won't stop you.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 12 // from: 3.2
  SAY #36505 /* ~Hmph.  Very well, then... it's not exactly me place to stop you.  You've been given access and look the decent sort, I suppose.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 13 // from: 3.3
  SAY #36508 /* ~Sorry, friend... I don't know your face and you don't look trustworthy.  Either tell me what your business is with Aran or you'll deal with me... and the rest of the Guild...~ */
  IF ~~ THEN REPLY #36509 /* ~I was sent by Gaelan Bayle... he said Aran could help me.~ */ GOTO 9
  IF ~~ THEN REPLY #36510 /* ~I paid a great deal of gold for Aran's help!~ */ GOTO 11
  IF ~~ THEN REPLY #36511 /* ~I doubt Aran Linvail... the Shadowmaster... would appreciate you sticking your nose into his business.  Perhaps we can ask him together?~ */ GOTO 20
  IF ~False()
~ THEN REPLY #36512 /* ~Forget it, I don't have to tell you anything.~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.3
  SAY #36514 /* ~That's it!  Time to die, my friend!~ */
  IF ~~ THEN DO ~CreateCreatureObject("TASSA",Myself,0,0,0)~ EXTERN ~TASSA~ 0
END

IF ~~ THEN BEGIN 15 // from:
  SAY #36519 /* ~What?  What do you mean by that, tart?!~ */
  IF ~~ THEN EXTERN ~TASSA~ 1
END

IF ~~ THEN BEGIN 16 // from:
  SAY #36521 /* ~You might have told me that sooner, wench!~ */
  IF ~~ THEN EXTERN ~TASSA~ 2
END

IF ~~ THEN BEGIN 17 // from:
  SAY #36523 /* ~(growl)  I'll gut that little harpy soon, I swear it.  Fine, then... you, <CHARNAME>.  You might have told me your purpose and spared me the aggravation.~ */
  IF ~~ THEN GOTO 18
END

IF ~~ THEN BEGIN 18 // from: 17.0
  SAY #36524 /* ~The Shadowmaster can be found in his quarters in the southeast corner of this level of the guild. Eh, I'd better give you better directions than that. He keeps it hidden well.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 19 // from: 8.1 8.0 6.1 6.0
  SAY #36525 /* ~Wait... wait a minute.  I remember, now.  Bah!  You might have saved me some aggravation and told me you were here to see Aran right off.  He's expecting you.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 20 // from: 13.2
  SAY #36526 /* ~I will not be shown up by the likes of you, fool!  I am the training mistress, here, and Aran's confidante!  And I, my young friend, am about to teach you a lesson!~ */
  IF ~~ THEN DO ~CreateCreatureObject("TASSA",Myself,0,0,0)~ EXTERN ~TASSA~ 0
END

IF WEIGHT #5 /* Triggers after states #: 22 23 24 25 even though they appear after this state */
~True()~ THEN BEGIN 21 // from:
  SAY #36527 /* ~This is the training run for the Shadow Thieves, my friend.  My domain.  If you have business with the Shadowmaster, you'll find him in his quarters.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~Global("arntra03Move","AR0307",1)
~ THEN BEGIN 22 // from:
  SAY #39059 /* ~Hold the string closer to your arm! Your shot can be easily disrupted.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut27c")
~ EXIT
END

IF WEIGHT #2 ~Global("arntra03Move","AR0307",2)
~ THEN BEGIN 23 // from:
  SAY #39061 /* ~Good shot!~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut27d")
~ EXIT
END

IF WEIGHT #3 ~Global("arntra03Move","AR0307",3)
~ THEN BEGIN 24 // from:
  SAY #39062 /* ~Good work today, Phealos. Go and hit the baths.~ */
  IF ~~ THEN DO ~SetGlobal("arntra03Move","AR0307",4)
ActionOverride("arntra03",MoveToPointNoInterrupt([2192.1535])
ActionOverride("arntra03",DestroySelf())
Wait(1)
StartDialogueNoSet([PC])
~ EXIT
END

IF WEIGHT #4 ~NumTimesTalkedTo(0)
!Dead("arntra03")
See("arntra03")
!StateCheck("arntra03",STATE_SLEEPING)
~ THEN BEGIN 25 // from:
  SAY #39064 /* ~You there! Move to the side. We're in the middle of training.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut27a")
~ EXIT
END

IF ~~ THEN BEGIN 26 // from: 18.0 10.0
  SAY #58246 /* ~Go back to the entrance to this level. In that first common room there will be a hidden door in the Northeast wall. A long hallway will lead you to his quarters... eventually.~ */
  IF ~~ THEN EXIT
END
