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

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

IF WEIGHT #0 ~InParty("Mazzy")
Detect("Mazzy")
!StateCheck("Mazzy",STATE_SLEEPING)
Global("DannoBeginsPalaPlot","GLOBAL",1)
!AreaCheck("AR2002")
Global("Pala","GLOBAL",0)
Global("SpawnDanno","GLOBAL",0)
GlobalTimerExpired("SpawnDannoTimer","GLOBAL")~ THEN BEGIN 0 // from:
  SAY #24279 /* ~Oh, Mazzy! Thank the gods that I've found you! I've hurt Pala!~ */
  IF ~~ THEN DO ~SetGlobal("Pala","GLOBAL",1)
SetGlobal("SpawnDanno","GLOBAL",1)
SetGlobalTimer("MazzyComplainPalaTimer","GLOBAL",FOUR_DAYS)~ EXTERN ~MAZZYJ~ 6
END

IF ~~ THEN BEGIN 1 // from:
  SAY #24280 /* ~You have to save her! I didn't mean to do it. I bought a love potion from Wallace the peddler at the market square. I just wanted her to love me. She only had a sip of it and she collapsed.~ */
  IF ~~ THEN EXTERN ~MAZZYJ~ 7
END

IF ~~ THEN BEGIN 2 // from:
  SAY #24281 /* ~She is with your mother, Mazzy. How was I to know it was poison? Oh, please hurry! I will meet you in Trademeet.~ */
  IF ~~ THEN DO ~EscapeArea()~ EXTERN ~MAZZYJ~ 8
END

IF ~~ THEN BEGIN 3 // from:
  SAY #24466 /* ~I'm here, Pala. I am so sorry, love. It was my fault that this happened.~ */
  IF ~~ THEN EXTERN ~MAZZYJ~ 57
END

IF WEIGHT #1 ~Global("Pala","GLOBAL",0)
OR(2)
!Detect("Mazzy")
!InPartyAllowDead("Mazzy")~ THEN BEGIN 4 // from:
  SAY #46885 /* ~Good fortune to you! I hope you are enjoying Trademeet, despite our recent troubles. Excuse me, I must return to my studies. I'm learning the ancient secrets of Untherian Cask Making.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~Global("Pala","GLOBAL",0)
InParty("Mazzy")
Detect("Mazzy")
!Dead("Mazzy")~ THEN BEGIN 5 // from:
  SAY #46886 /* ~Hullo, Mazzy! Been slaying dragons, have you?~ */
  IF ~See(Player1)~ THEN EXTERN ~MAZZYJ~ 105
  IF ~!See(Player1)~ THEN EXTERN ~MAZZYJ~ 106
END

IF ~~ THEN BEGIN 6 // from:
  SAY #46891 /* ~Nay, not yet. The road to Barrel-making Journeymanship is a long and difficult one. That reminds me, I should get back to studying. Pala must be happy to see you at home. You should visit more often.~ */
  IF ~~ THEN EXTERN ~MAZZYJ~ 107
END

IF ~~ THEN BEGIN 7 // from:
  SAY #46897 /* ~Hullo, <CHARNAME>. Welcome to Trademeet. Excuse me, I must get back to my studies.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 ~GlobalGT("PalaCureFound","GLOBAL",0)~ THEN BEGIN 8 // from:
  SAY #46901 /* ~Thank you for helping Pala. I am forever in your debt!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 /* Triggers after states #: 10 11 even though they appear after this state */
~GlobalGT("Pala","GLOBAL",0)
Global("PalaCureFound","GLOBAL",0)~ THEN BEGIN 9 // from:
  SAY #46902 /* ~Please help Pala! I don't know what I have done!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~Global("Pala","GLOBAL",0)
!InPartyAllowDead("Mazzy")
Dead("Mazzy")~ THEN BEGIN 10 // from:
  SAY #46912 /* ~'Tis a sad household you see before you. My betrothed's sister has passed on. Perhaps it is best if you leave.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 ~OR(2)
Dead("Pala02")
Global("MazzyNoCure","GLOBAL",1)~ THEN BEGIN 11 // from:
  SAY #61543 /* ~I have nothing to say to you!~ */
  IF ~~ THEN DO ~EscapeArea()~ EXIT
END
