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

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

IF WEIGHT #0 ~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #15329 /* ~Mmn, how impertinent of you to spy on a lady as she's changing. My name is Voltinabulai... but you may call me Voltine, if you wish.~ */
  IF ~~ THEN GOTO 1
  IF ~Global("X#CorVoltin","GLOBAL",0)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CorVoltin","GLOBAL",1)~ EXTERN ~CORANJ~ 98
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #15332 /* ~There is a dirty old mage in these parts. His name's Gervisse and he lurks around at night, peering in through people's windows. As it is a "hobby" you seem to share, may I presume that you are close acquaintances...?~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27226 /* ~Laerta and Louise
Voltine, a shape-changing druid, claims that Gervisse is a malevolent voyeur. While I got off to a bad start with Voltine, I sense she is the one telling the truth.~ */ EXIT
  IF ~Global("X#VOLTIN1","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VOLTIN1","GLOBAL",1)~ GOTO 10
  IF ~Global("X#VOLTIN1","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VOLTIN1","GLOBAL",1)~ EXTERN ~JAHEIJ~ 413
  IF ~Global("X#VOLTIN1","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VOLTIN1","GLOBAL",1)~ EXTERN ~FALDOJ~ 169
END

IF WEIGHT #3 /* Triggers after states #: 3 4 even though they appear after this state */
~  Global("HelpVoltine","GLOBAL",0)
~ THEN BEGIN 2 // from:
  SAY #15334 /* ~I don't have the patience to play your silly games.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~  Dead("Gervisse")
Global("HelpVoltine","GLOBAL",0)
~ THEN BEGIN 3 // from:
  SAY #15335 /* ~So, you have proved yourself to be of some use after all. As I told you, Gervisse was a dirty old man and this city is safer without him. Here, allow me to give this wand as a... thank you for services rendered.~ */
  IF ~~ THEN DO ~GiveItem("WAND09",LastTalkedToBy)
SetGlobal("HelpVoltine","GLOBAL",1)
~ EXIT
  IF ~Global("X#JahVoltine2","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JahVoltine2","GLOBAL",1)~ EXTERN ~JAHEIJ~ 80
END

IF WEIGHT #2 ~  False()
~ THEN BEGIN 4 // from:
  SAY #15336 /* ~Taste, then, the fury of Voltine!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 8 even though they appear after this state */
~  True()
~ THEN BEGIN 5 // from:
  SAY #15337 /* ~I'm afraid you have done all you can for me.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from:
  SAY #45193 /* ~I am afraid not, Jaheira. I hear that the bandits of Larswood have been routed... I... fled to the city after it was clear that I would be unable to protect nature from their intrusion. I think it is time for me to return and seek to heal the damage they have done, as well as try and earn redemption in the eyes of the Oak Father.~ */
  IF ~~ THEN DO ~GiveItem("WAND09",LastTalkedToBy)
SetGlobal("HelpVoltine","GLOBAL",1)
~ EXIT
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN GOTO 7
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 81
END

IF ~~ THEN BEGIN 7 // from: 6.1
  SAY #45195 /* ~To you, as well.~ */
  IF ~~ THEN DO ~GiveItem("WAND09",LastTalkedToBy)
SetGlobal("HelpVoltine","GLOBAL",1)
~ EXIT
END

IF WEIGHT #4 ~  Global("HelpVoltine","GLOBAL",0)
~ THEN BEGIN 8 // from:
  SAY #45400 /* ~Ah, it's you again. Any luck tracking down that mage Gervisse?~ */
  IF ~~ THEN REPLY #45401 /* ~No, not yet. We'll go look for him right now.~ */ EXIT
  IF ~~ THEN REPLY #45402 /* ~We've talked to Gervisse, and he says that it was you who's been scaring the twins and that you intend to kidnap them. I think I'm getting rid of you now!~ */ GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.1
  SAY #45403 /* ~That's very foolish of you. Taste, then, the fury of Voltine!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
  IF ~  InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN EXTERN ~FALDOJ~ 73
END

IF ~~ THEN BEGIN 10 // from: 1.1
  SAY #50157 /* ~Hmm, another druid here in the city. How... odd. I suppose you could try speaking with him; I do not see how you could make things worse. I have tried to drive him away, but in return he now spreads ugly rumors about me. If you rid this neighborhood of him, I would be grateful.~ */
  IF ~~ THEN DO ~SetGlobal("X#VoltineAdd","GLOBAL",1)
~ UNSOLVED_JOURNAL #27226 /* ~Laerta and Louise
Voltine, a shape-changing druid, claims that Gervisse is a malevolent voyeur. While I got off to a bad start with Voltine, I sense she is the one telling the truth.~ */ EXIT
END

IF ~~ THEN BEGIN 11 // from:
  SAY #50157 /* ~Hmm, another druid here in the city. How... odd. I suppose you could try speaking with him; I do not see how you could make things worse. I have tried to drive him away, but in return he now spreads ugly rumors about me. If you rid this neighborhood of him, I would be grateful.~ */
  IF ~~ THEN DO ~SetGlobal("X#VoltineAdd","GLOBAL",1)
~ UNSOLVED_JOURNAL #27226 /* ~Laerta and Louise
Voltine, a shape-changing druid, claims that Gervisse is a malevolent voyeur. While I got off to a bad start with Voltine, I sense she is the one telling the truth.~ */ EXIT
END

IF ~~ THEN BEGIN 12 // from:
  SAY #50157 /* ~Hmm, another druid here in the city. How... odd. I suppose you could try speaking with him; I do not see how you could make things worse. I have tried to drive him away, but in return he now spreads ugly rumors about me. If you rid this neighborhood of him, I would be grateful.~ */
  IF ~~ THEN DO ~SetGlobal("X#VoltineAdd","GLOBAL",1)
~ UNSOLVED_JOURNAL #27226 /* ~Laerta and Louise
Voltine, a shape-changing druid, claims that Gervisse is a malevolent voyeur. While I got off to a bad start with Voltine, I sense she is the one telling the truth.~ */ EXIT
END
