// creator  : weidu.exe (version 23100)
// argument : GORCAR.DLG
// game		 : .
// source	 : ./override/GORCAR.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #0 ~NumTimesTalkedTo(0)~ THEN BEGIN 0 // from:
  SAY #62733 /* ~What?  Where did you come from? I didn't conjure you up, did I? No... of course not.  Only planar creatures get summoned.  Must be more foolish adventurers.~ [GORCAR07] */
  IF ~~ THEN REPLY #62737 /* ~I'm <CHARNAME>.  I have been sent by Odren to find the Imprisoned One.  Who are you?~ */ DO ~SetGlobalTimer("Shout","LOCALS",5)
~ GOTO 1
  IF ~~ THEN REPLY #62738 /* ~Who I am and where I come from are none of your business.~ */ DO ~SetGlobalTimer("Shout","LOCALS",5)
~ GOTO 2
  IF ~~ THEN REPLY #62739 /* ~Are you the Imprisoned One Odren talked about?~ */ DO ~SetGlobalTimer("Shout","LOCALS",5)
~ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.2 0.0
  SAY #62740 /* ~Odren?  Imprisoned One?  Those names mean nothing to me.~ [GORCAR08] */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0 0.1
  SAY #62741 /* ~Who you are is not really important, anyway.  I'm the only one who matters around here.  I am Carston the Magnificent, Lord of the Level!~ [GORCAR09] */
  IF ~~ THEN REPLY #62742 /* ~If you're Lord of the Level, why are you stuck behind that glass?~ */ GOTO 3
  IF ~~ THEN REPLY #62743 /* ~Uh... fine.  Tell me, Carston the Magnificent, how did you become Lord of the Level?~ */ GOTO 3
  IF ~~ THEN REPLY #62744 /* ~What's that strange machine you're in?~ */ DO ~SetGlobal("MachineTalk","GLOBAL",1)~ GOTO 4
  IF ~~ THEN REPLY #62748 /* ~Great - more raving.  Is everyone in this dungeon insane?~ */ GOTO 3
  IF ~~ THEN REPLY #62750 /* ~Why were those monsters attacking you?  And how did you manage to drive them off?~ */ DO ~SetGlobal("MachineTalk","GLOBAL",1)~ GOTO 4
END

IF ~~ THEN BEGIN 3 // from: 2.3 2.1 2.0
  SAY #62749 /* ~Do not look at me as if I am insane.  I'm just a victim of circumstance, is all.  Making the best of a bad situation.  It's an interesting story, really.~ */
  IF ~~ THEN DO ~SetGlobal("HistoryTalk","GLOBAL",1)~ GOTO 5
END

IF ~~ THEN BEGIN 4 // from: 5.0 2.4 2.2
  SAY #62783 /* ~Glad you asked.  This fascinating device beside me is the Machine of Lum the Mad.  With it I can summon creatures to entertain me, and then unleash my wrath upon them when I get bored.~ */
  IF ~Global("HistoryTalk","GLOBAL",1)~ THEN REPLY #62787 /* ~But how did you end up inside that glass?~ */ GOTO 6
  IF ~Global("HistoryTalk","GLOBAL",0)~ THEN REPLY #62788 /* ~Fair enough.  But how did you get here in the first place?~ */ DO ~SetGlobal("HistoryTalk","GLOBAL",1)
~ GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.1 3.0
  SAY #62784 /* ~About ten years ago I was an adventurer, much like you.  I came with my apprentices to explore this dungeon, seeking fame and fortune.  What I found was this machine, the most amazing creation I'd ever seen.~ */
  IF ~Global("MachineTalk","GLOBAL",0)~ THEN REPLY #62785 /* ~You must mean that strange machine you're in.  What is it?~ */ DO ~SetGlobal("MachineTalk","GLOBAL",1)
~ GOTO 4
  IF ~Global("MachineTalk","GLOBAL",1)~ THEN REPLY #62786 /* ~But how did you end up in that glass prison?~ */ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.1 4.0
  SAY #62790 /* ~Ahhh... the glass casing.  Well, you see, I didn't actually mean to create it.  The Machine of Lum the Mad can be a fickle mistress.  Actions have consequences which cannot be undone.~ */
  IF ~~ THEN REPLY #62792 /* ~So you fiddled with the machine, and it blew up in your face.  Now you're trapped.  How poetic.~ */ GOTO 7
  IF ~~ THEN REPLY #62795 /* ~Since you are trapped, do you want me to try and release you?~ */ GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.1 6.0
  SAY #62797 /* ~Trapped?  You misunderstand:  this glass protects me.  It makes me impervious to harm.  I need neither food nor sustenance.  Even the ravages of time can no longer touch me.  I have become immortal!~ */
  IF ~~ THEN REPLY #62799 /* ~So you sit in your little cage and summon unfortunate creatures for your own twisted amusement.  Nice life.~ */ GOTO 8
  IF ~~ THEN REPLY #62800 /* ~But surely you must want to be free?  What good is immortality if you're stuck in one place forever?~ */ GOTO 8
  IF ~~ THEN REPLY #62810 /* ~So when you "became immortal" what happened to your apprentices?~ */ GOTO 10
END

IF ~~ THEN BEGIN 8 // from: 7.1 7.0
  SAY #62801 /* ~I, Carston the Magnificent, Lord of the Level, grow weary of your chatter.  Time to make things more interesting!~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("cut209a")
~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 15 even though they appear after this state */
~True()~ THEN BEGIN 9 // from:
  SAY #62804 /* ~You again?  What do you want this time?~ */
  IF ~~ THEN REPLY #62805 /* ~Uh... nothing.  I'll come back later.~ */ GOTO 13
  IF ~~ THEN REPLY #62807 /* ~When you became trapped in that cage, what happened to your apprentices?~ */ GOTO 10
  IF ~~ THEN REPLY #62813 /* ~I want to ask you some questions, oh great Lord of the Level.~ */ GOTO 11
END

IF ~~ THEN BEGIN 10 // from: 11.0 9.1 7.2
  SAY #62812 /* ~How dare you ask about my apprentices?  Maybe this will cure your curiosity!~ */
  IF ~~ THEN DO ~Face(6)
ActionOverride("gorcar",SwingOnce())
CreateVisualEffectObject("SPDISPMA",Myself)
ReallyForceSpell(LastTalkedToBy,TRAP_LIGHTNING_ORB3)
~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 9.2
  SAY #62814 /* ~I will deign to hear your question - but beware you do not bore me, or I shall unleash the wrath of the Machine of Lum the Mad upon you!~ */
  IF ~~ THEN REPLY #62816 /* ~Whatever happened to your apprentices?~ */ GOTO 10
  IF ~~ THEN REPLY #62817 /* ~Can you show me how to operate the Machine of Lum the Mad?~ */ GOTO 12
  IF ~~ THEN REPLY #62818 /* ~Do you know how to get down to the next level of the dungeon?~ */ GOTO 12
  IF ~~ THEN REPLY #62819 /* ~Is there any way to get inside that glass case of yours?~ */ GOTO 12
  IF ~~ THEN REPLY #62820 /* ~Can you tell me anything about the monsters you've summoned over the past few years?~ */ GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.4 11.3 11.2 11.1
  SAY #62821 /* ~The question bores me. Begone!~ */
  IF ~~ THEN REPLY #62823 /* ~Fine.  Rot in your cage for all I care.~ */ GOTO 13
  IF ~~ THEN REPLY #62824 /* ~Just one more question Lord Carston, if I may.~ */ GOTO 14
END

IF ~~ THEN BEGIN 13 // from: 12.0 9.0
  SAY #62825 /* ~Good.  Leave me to ponder greater matters.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from: 12.1
  SAY #62827 /* ~NO!  No more questions.  Time to make things more interesting.~ */
  IF ~~ THEN DO ~Face(6)
ActionOverride("gorcar",SwingOnce())
CreateVisualEffectObject("SPDISPMA",Myself)
ReallyForceSpell(LastTalkedToBy,TRAP_LIGHTNING_ORB3)
~ EXIT
END

IF WEIGHT #1 ~Global("BellJar","GLOBAL",1)~ THEN BEGIN 15 // from:
  SAY #62839 /* ~No - spare me, please! (sob!)  I beg you, don't hurt me!  I never meant any harm!  It was all the machine's fault, I tell you! (sob!) I'm just a poor old man who got stuck inside a glass case.~ [GORCAR10] */
  IF ~~ THEN REPLY #62841 /* ~Not so "magnificent" now, are you?  Get out of my sight, you sniveling worm.~ */ GOTO 16
  IF ~~ THEN REPLY #62842 /* ~The more you whimper and whine, the more I'm going to enjoy gutting you!~ */ GOTO 17
  IF ~~ THEN REPLY #62843 /* ~I won't kill you, Carston, even though you deserve to die for what you've done.  But I'm a better person than you'll ever be.~ */ GOTO 16
  IF ~~ THEN REPLY #62846 /* ~Tell me how to use the Machine of Lum the Mad and I will let you live.~ */ GOTO 18
END

IF ~~ THEN BEGIN 16 // from: 18.1 15.2 15.0
  SAY #62844 /* ~Thank you, kind <SIRMAAM>!  You are truly noble for sparing my wretched life!  Take my journal - it may help you discover the secrets to this infernal machine.~ */
  IF ~~ THEN DO ~AddXP2DA("PLOT6F")
GiveItem("plot04j",LastTalkedToBy)
SmallWait(5)
EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 17 // from: 18.0 15.1
  SAY #62845 /* ~Well, I'm not going down without a fight!!~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~~ THEN BEGIN 18 // from: 15.3
  SAY #62849 /* ~All I knew was how to summon monsters and shoot off fireballs or lightning bolts. (sob!)  I was too afraid to try anything else.  It's the truth, I swear!~ */
  IF ~~ THEN REPLY #62850 /* ~Then you are of no use to me - time to die, Carston!~ */ GOTO 17
  IF ~~ THEN REPLY #62851 /* ~If you cannot help me then just get out of my sight, you cry-baby.~ */ GOTO 16
END
