// creator  : weidu.exe (version 23600)
// argument : CALDO.DLG
// game     : .
// source   : ./override/CALDO.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #1 /* Triggers after states #: 7 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN BEGIN 0 // from:
  SAY #704 /* ~We think dis here's a magic tree, 'cuz it's all alone up here and so big. Probably got gnomes or pixies or sumthin' in it, so we're gonna bust it down and take any treasure! Ain't that right Krumm? You wanna help? It's a big tree, probably got enough gold fer alluh us!~ */
  IF ~~ THEN REPLY #5044 /* ~Let's do it, big fella! Riches beyond the dreams of avarice await, I am sure!~ */ GOTO 6
  IF ~~ THEN REPLY #5045 /* ~You don't really want to do this, do you? Just think of how beautiful this tree is. It's truly a wonder of nature.~ */ GOTO 5
  IF ~~ THEN REPLY #5046 /* ~I'll not let you harm a branch on this tree! You'll have to go through me first!~ */ GOTO 2
  IF ~Global("X#EdwinCaldo","GLOBAL",0)
InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#EdwinCaldo","GLOBAL",1)~ EXTERN ~EDWINJ~ 97
END

IF WEIGHT #2 /* Triggers after states #: 7 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN BEGIN 1 // from:
  SAY #705 /* ~I don't know who you are, but I'll not have you sneakin' about behind us while we work! We think there's treasure in this tree, and if you wanna get up front and help, do it! Otherwise me 'n Krumm will do sumthin... uh... well, sumthin' really nasty! Ain't that right Krumm?~ */
  IF ~~ THEN REPLY #5047 /* ~Let's do it, big fella! Riches beyond the dreams of avarice await, I am sure!~ */ GOTO 6
  IF ~~ THEN REPLY #5048 /* ~You don't really want to do this, do you? Just think of how beautiful this tree is. It's truly a wonder of nature.~ */ GOTO 5
  IF ~~ THEN REPLY #5049 /* ~I'll not let you harm a branch on this tree! You'll have to go through me first!~ */ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 12.2 11.2 1.2 0.2 EDWINJ:98.2 EDWINJ:97.2
  SAY #706 /* ~First or last, we probable go through you sometime! Get them Krumm!~ */
  IF ~~ THEN EXTERN ~KRUMM~ 3
END

IF WEIGHT #3 /* Triggers after states #: 7 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN BEGIN 3 // from:
  SAY #707 /* ~Leave now or I bust yer head! Dis our magic tree, an any treasure here is ours! Right Krumm?~ */
  IF ~~ THEN EXTERN ~KRUMM~ 0
END

IF ~~ THEN BEGIN 4 // from:
  SAY #708 /* ~Fine! You wantta busted head, then you get one!~ */
  IF ~~ THEN DO ~ActionOverride("Krumm",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 12.1 11.1 1.1 0.1 EDWINJ:98.1 EDWINJ:97.1
  SAY #709 /* ~Well, if ye're not gonna help, I'm not gonna let you sit and watch us do it! Yous were probably gonna rob us when we're done, weren't cha? Me an' Krumm don't cotton to bandits one bit! Do we, Krumm?~ */
  IF ~~ THEN EXTERN ~KRUMM~ 1
END

IF ~~ THEN BEGIN 6 // from: 12.0 11.0 1.0 0.0 EDWINJ:98.0 EDWINJ:97.0
  SAY #710 /* ~Yeah! Beyond da average dreams for sure! We'll all go home richer today! You go 'round the back, an' me 'n Krumm will start bashin' the front.~ */
  IF ~~ THEN EXTERN ~KRUMM~ 2
  IF ~Global("X#CALDO6","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
InParty("khalid")
InMyArea("khalid")
!StateCheck("khalid",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CALDO6","GLOBAL",1)~ EXTERN ~BKHALI~ 276
  IF ~Global("X#CALDO6","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CALDO6","GLOBAL",1)~ EXTERN ~JAHEIJ~ 415
  IF ~Global("X#CALDO6","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CALDO6","GLOBAL",1)~ EXTERN ~AJANTJ~ 275
  IF ~Global("X#CALDO6","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CALDO6","GLOBAL",1)~ EXTERN ~BFALDO~ 338
END

IF WEIGHT #0 ~  Dead("CDryad")
~ THEN BEGIN 7 // from:
  SAY #711 /* ~Treasure for all? No, just treasure for Caldo and Krumm!~ */
  IF ~~ THEN DO ~ActionOverride("Krumm",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #5052 /* ~Yeah! Get you gone! Me an' Krumm got business to take care of.~ */
  IF ~~ THEN EXIT
  IF ~Global("X#AjantisHelpDryadCaldo1","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AjantisHelpDryadCaldo1","GLOBAL",1)~ EXTERN ~AJANTJ~ 57
END

IF WEIGHT #4 ~  True()
~ THEN BEGIN 9 // from:
  SAY #6074 /* ~Git lost, we don't wanna talk to you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10 // from: DRYAD:5.0
  SAY #11801 /* ~Ah! It's the dryad! Krumm, we gotta get outta here.~ */
  IF ~~ THEN DO ~ActionOverride("KRUMM",EscapeArea())
ActionOverride("CDRYAD",Enemy())
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 11 // from: EDWINJ:97.5
  SAY #46671 /* ~That'd be lotsa gold... the tree is big. Even if roots 're silvar.~ */
  IF ~~ THEN REPLY #5044 /* ~Let's do it, big fella! Riches beyond the dreams of avarice await, I am sure!~ */ GOTO 6
  IF ~~ THEN REPLY #5045 /* ~You don't really want to do this, do you? Just think of how beautiful this tree is. It's truly a wonder of nature.~ */ GOTO 5
  IF ~~ THEN REPLY #5046 /* ~I'll not let you harm a branch on this tree! You'll have to go through me first!~ */ GOTO 2
  IF ~  InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN GOTO 12
  IF ~  InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN EXTERN ~EDWINJ~ 98
END

IF ~~ THEN BEGIN 12 // from: 11.3 EDWINJ:98.3 EDWINJ:97.3
  SAY #46673 /* ~Ya hear that, Krumm? We got helpers.. Ya do wanna in, aren't ya?~ */
  IF ~~ THEN REPLY #5044 /* ~Let's do it, big fella! Riches beyond the dreams of avarice await, I am sure!~ */ GOTO 6
  IF ~~ THEN REPLY #5045 /* ~You don't really want to do this, do you? Just think of how beautiful this tree is. It's truly a wonder of nature.~ */ GOTO 5
  IF ~~ THEN REPLY #5046 /* ~I'll not let you harm a branch on this tree! You'll have to go through me first!~ */ GOTO 2
END
