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

BEGIN ~MINEC2~

IF ~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #915 /* ~If you set me free, <SIRMAAM>, I can tell you how to bring this mine crashing down around the heads of these fat-headed slavers.~ */
  IF ~~ THEN REPLY #918 /* ~We'll set you free. Now tell us what you know.~ */ GOTO 1
  IF ~~ THEN REPLY #919 /* ~Shut up, you fool.~ */ GOTO 4
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #916 /* ~Well, see, here's how it is: The way to bamboozle these ninnies is real easy. Right here beside me is a steel plug that stoppers up the river on the surface. If you were to release that, then the whole mine would be drowned. Only the master of the mine has the key to open the plug, and he's a real mean cuss. If you were to bring the key to me, I could use it to flood the mine.~ */
  IF ~~ THEN REPLY #10437 /* ~How do you know how to operate this key?~ */ DO ~EraseJournalEntry(31452)
AddJournalEntry(31452,QUEST_DONE)
AddJournalEntry(31453,QUEST)
~ UNSOLVED_JOURNAL #27267 /* ~Flooding the Cloakwood Mine
An enslaved miner has told us that there's a way to destroy the Iron Throne mine in the Cloakwood. A steel plug blocks the flow of an underground river. If the plug were released, the water would flood the entire mine. Only the master of the mine has the key to the plug.~ */ GOTO 5
  IF ~~ THEN REPLY #10438 /* ~All right, if we find this "master of the mine" and his key, we'll bring it back to you and see what you can do.~ */ DO ~EraseJournalEntry(31452)
AddJournalEntry(31452,QUEST_DONE)
AddJournalEntry(31453,QUEST)
~ UNSOLVED_JOURNAL #27267 /* ~Flooding the Cloakwood Mine
An enslaved miner has told us that there's a way to destroy the Iron Throne mine in the Cloakwood. A steel plug blocks the flow of an underground river. If the plug were released, the water would flood the entire mine. Only the master of the mine has the key to the plug.~ */ GOTO 7
END

IF ~~ THEN BEGIN 2 // from:
  SAY #6303 /* ~I can tell ya one bit of info ya might be interested in, friends. On the first mining level there's a steel plug that stoppers up the river on the surface. If you were to release that, then the whole mine would be drowned. Only the master of the mine has the key to open the plug and he's a real mean cuss.~ */
  IF ~~ THEN DO ~EraseJournalEntry(31452)
AddJournalEntry(31452,QUEST_DONE)
AddJournalEntry(31453,QUEST)
~ UNSOLVED_JOURNAL #27267 /* ~Flooding the Cloakwood Mine
An enslaved miner has told us that there's a way to destroy the Iron Throne mine in the Cloakwood. A steel plug blocks the flow of an underground river. If the plug were released, the water would flood the entire mine. Only the master of the mine has the key to the plug.~ */ EXIT
END

IF ~~ THEN BEGIN 3 // from:
  SAY #9159 /* ~Get away from me! I feel no safer with you than my captors!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 0.1
  SAY #14382 /* ~You need not have a hissy fit.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 1.0
  SAY #10439 /* ~There's a dwarf on the second level of the mine. His name's Yeslick, and he's the last surviving dwarf of the clan that used to live here. Under threat of death, he designed the plug for the master of the mine. I talked with him last time I was in the cells for bad behavior.~ */
  IF ~~ THEN REPLY #10440 /* ~Okay, we'll try and find this key.~ */ GOTO 7
  IF ~~ THEN REPLY #10441 /* ~A stupid story! Why should I believe a mere slave?~ */ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.1
  SAY #10442 /* ~Believe what you want.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.0 1.1
  SAY #10443 /* ~Good! If you haven't already been down to the lower levels, try to find a man named Rill. He's a good friend of mine, and should be able to come up with a plan on how to get all of the slaves to safety. I'll see you later then, and try not to get killed.~ */
  IF ~~ THEN EXIT
END

IF ~  PartyHasItem("MISC83")
~ THEN BEGIN 8 // from:
  SAY #10444 /* ~Hey there again. I see that you have the key. It must have been a bloody battle with the master, and you must be tough ones to have lived through it. All right then, give the key and let's be done with this. Oh, one more thing, you did talk to Rill, didn't you? So that all of the slaves could get out of here alive.~ */
  IF ~~ THEN REPLY #10445 /* ~Who cares about the other slaves?! Just open the plug so that we can flood this place and get out of here.~ */ GOTO 9
  IF ~~ THEN REPLY #10446 /* ~Yes, we talked to Rill. You don't have to worry about your friends. They'll all be safe. Here's the key, now let's do it.~ */ DO ~TakePartyItem("MISC83")
~ GOTO 10
  IF ~~ THEN REPLY #10449 /* ~We don't want to drown the mine just yet. Stay around here, and we might come back for you later.~ */ GOTO 11
  IF ~Global("X#MINEC28","GLOBAL",0)
InParty("dynaheir")
InMyArea("dynaheir")
!StateCheck("dynaheir",CD_STATE_NOTVALID)
Global("FREESLAV","GLOBAL",0)
~ THEN DO ~SetGlobal("X#MINEC28","GLOBAL",1)~ EXTERN ~DYNAHJ~ 224
  IF ~Global("X#MINEC28","GLOBAL",0)
InParty("kivan")
Global("FREESLAV","GLOBAL",0)
~ THEN DO ~SetGlobal("X#MINEC28","GLOBAL",1)~ EXTERN ~KIVANJ~ 383
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #10447 /* ~I'm not a murderer! There's no way that I'm going to open this plug and drown all my friends in the mine! Talk to Rill, and then you come back and talk to me.~ */
  IF ~~ THEN EXIT
  IF ~Global("X#BranwenMines","GLOBAL",0)
InParty("branwen")
InMyArea("branwen")
!StateCheck("branwen",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#BranwenMines","GLOBAL",1)~ EXTERN ~BRANWJ~ 28
END

IF ~~ THEN BEGIN 10 // from: 8.1
  SAY #10448 /* ~Well, then I guess that's it then. As soon as I open the plug, we're going to have to run for our lives, 'cause otherwise we'll be washed away just like the Orothiar dwarves. Ready then? Here we go!~ */
  IF ~  Global("FREESLAV","GLOBAL",1)
~ THEN DO ~StartMovie("MINEFLOD")
SetGlobal("FLOODED","GLOBAL",1)
SetGlobal("NashkellAdventures","GLOBAL",2)
EraseJournalEntry(27267)
EraseJournalEntry(27268)
EraseJournalEntry(26929)
EraseJournalEntry(27172)
EraseJournalEntry(27270)
ActionOverride(Player1,LeaveAreaLUAPanic("AR1800","",[3099.718],E))
ActionOverride(Player1,LeaveAreaLUA("AR1800","",[3099.718],E))
ActionOverride(Player2,LeaveAreaLUA("AR1800","",[3088.686],E))
ActionOverride(Player3,LeaveAreaLUA("AR1800","",[3087.649],E))
ActionOverride(Player4,LeaveAreaLUA("AR1800","",[3090.588],E))
ActionOverride(Player5,LeaveAreaLUA("AR1800","",[2998.680],E))
ActionOverride(Player6,LeaveAreaLUA("AR1800","",[2936.699],E))
~ SOLVED_JOURNAL #27269 /* ~Flooding the Cloakwood Mine
I have flooded the Cloakwood mine, killing anyone who remained inside. My party and I barely escaped the onrushing waters, and I have dealt a great blow to the Iron Throne.~ */ EXIT
  IF ~  !Global("FREESLAV","GLOBAL",1)
~ THEN DO ~StartMovie("MINEFLOD")
SetGlobal("FLOODED","GLOBAL",1)
SetGlobal("NashkellAdventures","GLOBAL",2)
EraseJournalEntry(27267)
EraseJournalEntry(27268)
EraseJournalEntry(26929)
EraseJournalEntry(27172)
EraseJournalEntry(27270)
ActionOverride(Player1,LeaveAreaLUAPanic("AR1800","",[3099.718],E))
ActionOverride(Player1,LeaveAreaLUA("AR1800","",[3099.718],E))
ActionOverride(Player2,LeaveAreaLUA("AR1800","",[3088.686],E))
ActionOverride(Player3,LeaveAreaLUA("AR1800","",[3087.649],E))
ActionOverride(Player4,LeaveAreaLUA("AR1800","",[3090.588],E))
ActionOverride(Player5,LeaveAreaLUA("AR1800","",[2998.680],E))
ActionOverride(Player6,LeaveAreaLUA("AR1800","",[2936.699],E))
~ SOLVED_JOURNAL #27436 /* ~Flooding the Cloakwood Mine
I have flooded the Iron Throne mine in the Cloakwood. Many of the slave miners drowned in the flood, but they were a necessary sacrifice. Hopefully the destruction of such a valuable resource will be a serious setback to whatever the Iron Throne has planned.~ */ EXIT
  IF ~Global("X#MontaronMineFlooded","GLOBAL",0)
InParty("montaron")
InMyArea("montaron")
!StateCheck("montaron",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#MontaronMineFlooded","GLOBAL",1)~ EXTERN ~MONTAJ~ 45
END

IF ~~ THEN BEGIN 11 // from: 8.2
  SAY #10450 /* ~Sure, just make sure not to leave me here too long.~ */
  IF ~~ THEN EXIT
END

IF ~  True()
~ THEN BEGIN 12 // from:
  SAY #10451 /* ~You're gonna have to stop talking to me so much, the guards will get suspicious.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from:
  SAY #45156 /* ~Rill! Please go talk to Rill!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from: MONTAJ:45.4
  SAY #45828 /* ~It's not that easy... the key is... stuck...~ */
  IF ~  Global("FREESLAV","GLOBAL",1)
~ THEN DO ~StartMovie("MINEFLOD")
SetGlobal("FLOODED","GLOBAL",1)
SetGlobal("NashkellAdventures","GLOBAL",2)
EraseJournalEntry(27267)
EraseJournalEntry(27268)
EraseJournalEntry(26929)
EraseJournalEntry(27172)
EraseJournalEntry(27270)
ActionOverride(Player1,LeaveAreaLUAPanic("AR1800","",[3099.718],E))
ActionOverride(Player1,LeaveAreaLUA("AR1800","",[3099.718],E))
ActionOverride(Player2,LeaveAreaLUA("AR1800","",[3088.686],E))
ActionOverride(Player3,LeaveAreaLUA("AR1800","",[3087.649],E))
ActionOverride(Player4,LeaveAreaLUA("AR1800","",[3090.588],E))
ActionOverride(Player5,LeaveAreaLUA("AR1800","",[2998.680],E))
ActionOverride(Player6,LeaveAreaLUA("AR1800","",[2936.699],E))
~ SOLVED_JOURNAL #27269 /* ~Flooding the Cloakwood Mine
I have flooded the Cloakwood mine, killing anyone who remained inside. My party and I barely escaped the onrushing waters, and I have dealt a great blow to the Iron Throne.~ */ EXIT
  IF ~  !Global("FREESLAV","GLOBAL",1)
~ THEN DO ~StartMovie("MINEFLOD")
SetGlobal("FLOODED","GLOBAL",1)
SetGlobal("NashkellAdventures","GLOBAL",2)
EraseJournalEntry(27267)
EraseJournalEntry(27268)
EraseJournalEntry(26929)
EraseJournalEntry(27172)
EraseJournalEntry(27270)
ActionOverride(Player1,LeaveAreaLUAPanic("AR1800","",[3099.718],E))
ActionOverride(Player1,LeaveAreaLUA("AR1800","",[3099.718],E))
ActionOverride(Player2,LeaveAreaLUA("AR1800","",[3088.686],E))
ActionOverride(Player3,LeaveAreaLUA("AR1800","",[3087.649],E))
ActionOverride(Player4,LeaveAreaLUA("AR1800","",[3090.588],E))
ActionOverride(Player5,LeaveAreaLUA("AR1800","",[2998.680],E))
ActionOverride(Player6,LeaveAreaLUA("AR1800","",[2936.699],E))
~ SOLVED_JOURNAL #27436 /* ~Flooding the Cloakwood Mine
I have flooded the Iron Throne mine in the Cloakwood. Many of the slave miners drowned in the flood, but they were a necessary sacrifice. Hopefully the destruction of such a valuable resource will be a serious setback to whatever the Iron Throne has planned.~ */ EXIT
  IF ~  InParty("montaron")
InMyArea("montaron")
!StateCheck("montaron",CD_STATE_NOTVALID)
~ THEN GOTO 15
  IF ~  InParty("montaron")
InMyArea("montaron")
!StateCheck("montaron",CD_STATE_NOTVALID)
~ THEN EXTERN ~MONTAJ~ 46
END

IF ~~ THEN BEGIN 15 // from: 14.2 MONTAJ:46.2 MONTAJ:45.2
  SAY #45830 /* ~Oh... You have a handy companion...~ */
  IF ~  Global("FREESLAV","GLOBAL",1)
~ THEN DO ~StartMovie("MINEFLOD")
SetGlobal("FLOODED","GLOBAL",1)
SetGlobal("NashkellAdventures","GLOBAL",2)
EraseJournalEntry(27267)
EraseJournalEntry(27268)
EraseJournalEntry(26929)
EraseJournalEntry(27172)
EraseJournalEntry(27270)
ActionOverride(Player1,LeaveAreaLUAPanic("AR1800","",[3099.718],E))
ActionOverride(Player1,LeaveAreaLUA("AR1800","",[3099.718],E))
ActionOverride(Player2,LeaveAreaLUA("AR1800","",[3088.686],E))
ActionOverride(Player3,LeaveAreaLUA("AR1800","",[3087.649],E))
ActionOverride(Player4,LeaveAreaLUA("AR1800","",[3090.588],E))
ActionOverride(Player5,LeaveAreaLUA("AR1800","",[2998.680],E))
ActionOverride(Player6,LeaveAreaLUA("AR1800","",[2936.699],E))
SetGlobalTimer("X#MontyMineBaldur","GLOBAL",TEN_DAYS)
~ SOLVED_JOURNAL #27269 /* ~Flooding the Cloakwood Mine
I have flooded the Cloakwood mine, killing anyone who remained inside. My party and I barely escaped the onrushing waters, and I have dealt a great blow to the Iron Throne.~ */ EXIT
  IF ~  !Global("FREESLAV","GLOBAL",1)
~ THEN DO ~StartMovie("MINEFLOD")
SetGlobal("FLOODED","GLOBAL",1)
SetGlobal("NashkellAdventures","GLOBAL",2)
EraseJournalEntry(27267)
EraseJournalEntry(27268)
EraseJournalEntry(26929)
EraseJournalEntry(27172)
EraseJournalEntry(27270)
ActionOverride(Player1,LeaveAreaLUAPanic("AR1800","",[3099.718],E))
ActionOverride(Player1,LeaveAreaLUA("AR1800","",[3099.718],E))
ActionOverride(Player2,LeaveAreaLUA("AR1800","",[3088.686],E))
ActionOverride(Player3,LeaveAreaLUA("AR1800","",[3087.649],E))
ActionOverride(Player4,LeaveAreaLUA("AR1800","",[3090.588],E))
ActionOverride(Player5,LeaveAreaLUA("AR1800","",[2998.680],E))
ActionOverride(Player6,LeaveAreaLUA("AR1800","",[2936.699],E))
SetGlobalTimer("X#MontyMineBaldur","GLOBAL",TEN_DAYS)
~ SOLVED_JOURNAL #27436 /* ~Flooding the Cloakwood Mine
I have flooded the Iron Throne mine in the Cloakwood. Many of the slave miners drowned in the flood, but they were a necessary sacrifice. Hopefully the destruction of such a valuable resource will be a serious setback to whatever the Iron Throne has planned.~ */ EXIT
END
