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

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

IF WEIGHT #3 /* Triggers after states #: 1 8 9 even though they appear after this state */
~True()~ THEN BEGIN 0 // from:
  SAY #55258 /* ~Excuse me, friend, but we're not open. You'll have to come back later.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~GlobalGT("SanikPlot","GLOBAL",0)
Global("OpenedDoor","AR1611",0)
!Dead("pirmur01")
Global("PlayerOpenedDoor","AR1611",0)~ THEN BEGIN 1 // from:
  SAY #55259 /* ~Hello, my <LADYLORD>, welcome to Lady Galvena's Festhall. How may I serve you?~ */
  IF ~~ THEN REPLY #55260 /* ~What sort of establishment is this?~ */ GOTO 2
  IF ~PartyHasItem("miscAN")
CheckStatLT(LastTalkedToBy,15,CHR)~ THEN REPLY #55261 /* ~Uh... I'm a new employee of the Lady's. How do I get in to see her?~ */ GOTO 3
  IF ~PartyHasItem("miscAN")
CheckStatGT(LastTalkedToBy,14,CHR)~ THEN REPLY #55262 /* ~Uh... I'm a new employee of the Lady's. How do I get in to see her?~ */ GOTO 7
  IF ~~ THEN REPLY #55277 /* ~I need nothing at this time.~ */ GOTO 5
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #55263 /* ~It is a palace of romantic delights! The finest off of the Sword Coast! Why, the courtesans of Lady Galvena's Festhall turn none away!~ */
  IF ~PartyHasItem("miscAN")
CheckStatLT(LastTalkedToBy,15,CHR)~ THEN REPLY #55264 /* ~You can save the sales pitch. I'm a new employee. How do I get in to see Lady Galvena?~ */ GOTO 3
  IF ~PartyHasItem("miscAN")
CheckStatGT(LastTalkedToBy,14,CHR)~ THEN REPLY #55267 /* ~You can save the sales pitch. I'm a new employee. How do I get in to see Lady Galvena?~ */ GOTO 7
  IF ~~ THEN REPLY #55268 /* ~That is all that I need. Farewell.~ */ GOTO 5
  IF ~~ THEN REPLY #55274 /* ~I would be interested in partaking of said delights.~ */ GOTO 6
END

IF ~~ THEN BEGIN 3 // from: 2.0 1.1
  SAY #55269 /* ~That's the most blatant lie I ever heard. Look, if you want to get in, there are two courtesans out front and you'll have to pay them for their services just like everyone else.~ */
  IF ~~ THEN REPLY #55270 /* ~Fine. I'll leave.~ */ GOTO 5
  IF ~PartyHasItem("miscAN")~ THEN REPLY #55271 /* ~I have proof. Here! Do you see the medallion?~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.1
  SAY #55272 /* ~Thief! I know not where you obtained that but it will not serve you well! Guards!~ */
  IF ~~ THEN DO ~SetGlobal("GalvenaHostile","GLOBAL",1)
CreateCreature("pirmur11",[597.452],6)
CreateCreature("pirmur11",[643.426],6)~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 3.0 2.2 1.3
  SAY #55273 /* ~Thank you for visiting Lady Galvena's Festhall.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from: 2.3
  SAY #55275 /* ~Of course! Just out the door of our fine establishment, you shall find a selection of courtesans such as the world has never seen. For a small fee they shall take care of you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 2.1 1.2
  SAY #55276 /* ~Ah yes, I see the medallion. One of our new masters. Allow me to open the way. Go downstairs and find the guards. Galvena will see you when she is ready.~ */
  IF ~~ THEN DO ~SetGlobal("OpenedDoor","AR1611",1)
MoveToPointNoInterrupt([576.221])
Unlock("Secret 1")
OpenDoor("Secret 1")~ EXIT
END

IF WEIGHT #1 ~Global("PlayerOpenedDoor","AR1611",1)~ THEN BEGIN 8 // from:
  SAY #55278 /* ~Guards! Thieves try to gain entrance! Kill them!~ */
  IF ~~ THEN DO ~SetGlobal("GalvenaHostile","GLOBAL",1)
CreateCreature("pirmur11",[597.452],6)
CreateCreature("pirmur11",[643.426],6)~ EXIT
END

IF WEIGHT #2 ~Global("OpenedDoor","AR1611",1)~ THEN BEGIN 9 // from:
  SAY #55279 /* ~Enjoy your stay at Lady Galvena's Festhall!~ */
  IF ~~ THEN EXIT
END
