// creator  : weidu.exe (version 23600)
// argument : NEADOY.DLG
// game     : .
// source   : ./DATA/DIALOG.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #0 ~  Global("RedWizards","OH2010",0)
Detect(Player1)
OR(2)
GlobalGT("GOBLINS_KILLED","GLOBAL",0)
Dead("NEROGDOK")
~ THEN BEGIN 0 // from:
  SAY #27646 /* ~Thank Mystra someone has come for me at last! It's too bad you had to cut your way through.~ [NER1] */
  IF ~  !Dead("NEERA")
~ THEN REPLY #27647 /* ~I could not leave you in the clutches of these savages.~ */ DO ~SetGlobal("ADOY_MET_PARTY","GLOBAL",1)
~ EXTERN ~NEERAJ~ 138
  IF ~  !Dead("NEERA")
~ THEN REPLY #27648 /* ~You look like a man grateful for rescue. Money is a terrific way to express gratitude.~ */ DO ~SetGlobal("ADOY_MET_PARTY","GLOBAL",1)
~ EXTERN ~NEERAJ~ 139
  IF ~~ THEN REPLY #27649 /* ~I am looking for a wild mage named Adoy.~ */ DO ~SetGlobal("ADOY_MET_PARTY","GLOBAL",1)
~ GOTO 2
END

IF WEIGHT #2 /* Triggers after states #: 12 even though they appear after this state */
~  !Dead("NEROGDOK")
Global("GOBLINS_KILLED","GLOBAL",0)
Global("RedWizards","OH2010",0)
Detect(Player1)
~ THEN BEGIN 1 // from:
  SAY #27650 /* ~Thank Mystra someone has come to rescue me! And without unnecessary bloodshed!~ [NER2] */
  IF ~~ THEN REPLY #27651 /* ~I had a feeling you might not be enjoying the goblin hospitality.~ */ DO ~SetGlobal("ADOY_MET_PARTY","GLOBAL",1)
~ EXTERN ~NEERAJ~ 138
  IF ~~ THEN REPLY #27652 /* ~Avoiding bloodshed costs extra, you know.~ */ DO ~SetGlobal("ADOY_MET_PARTY","GLOBAL",1)
~ EXTERN ~NEERAJ~ 139
  IF ~~ THEN REPLY #27649 /* ~I am looking for a wild mage named Adoy.~ */ DO ~SetGlobal("ADOY_MET_PARTY","GLOBAL",1)
~ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.2 0.2 NEERAJ:139.0 NEERAJ:138.0
  SAY #27653 /* ~Adoy is me, and I am Adoy. Why have you sought me out?~ [NER5] */
  IF ~  !Dead("NEERA")
~ THEN REPLY #27654 /* ~Neera here has a little trouble with her spells.~ */ EXTERN ~NEERAJ~ 140
  IF ~  !Dead("NEERA")
~ THEN REPLY #27655 /* ~Neera is a wild mage, too. She hoped you could teach her to control her magic.~ */ EXTERN ~NEERAJ~ 140
  IF ~  !Dead("NEERA")
~ THEN REPLY #27656 /* ~Don't look at me. This was all Neera's idea.~ */ EXTERN ~NEERAJ~ 140
  IF ~  Dead("NEERA")
~ THEN REPLY #27655 /* ~Neera is a wild mage, too. She hoped you could teach her to control her magic.~ */ GOTO 7
END

IF ~~ THEN BEGIN 3 // from: NEERAJ:140.1
  SAY #27657 /* ~Is that so? Well, I'm afraid I'm not the best example of learning to control wild magic. I'm not sure anyone can do that. You can't govern chaos! Otherwise, it wouldn't be chaos, would it?~ [NER8] */
  IF ~~ THEN EXTERN ~NEERAJ~ 141
END

IF ~~ THEN BEGIN 4 // from: NEERAJ:141.0
  SAY #27658 /* ~Of course not for nothing. You have just experienced the honor of meeting Bargrivyek, the goblin god of cooperation and territory.~ [NER10] */
  IF ~~ THEN REPLY #27659 /* ~You convinced the goblins you are their god?~ */ GOTO 5
  IF ~~ THEN REPLY #27660 /* ~That's funny, you don't look like a goblin.~ */ GOTO 6
  IF ~~ THEN REPLY #27661 /* ~What a great racket! How do I get in on it?~ */ GOTO 7
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #27662 /* ~Not intentionally, I assure you. It was all a great misunderstanding. It all started when I was trying to make a nice pot of pease porridge.~ [NER11] */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 6 // from: 4.1
  SAY #27663 /* ~I should hope not! Although one time I did transform myself into a goblin while making supper.~ [NER12] */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 7 // from: 4.2 2.3
  SAY #27664 /* ~You wouldn't want to, believe me.~ [NER13] */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0 6.0 5.0
  SAY #27665 /* ~It's all part of the wonder of wild magic. You have to be ready for a little unexpected excitement at any moment.~ [NER15] */
  IF ~  !Dead("NEERA")
~ THEN EXTERN ~NEERAJ~ 142
  IF ~  Dead("NEERA")
~ THEN DO ~SetGlobal("RedWizards","OH2010",1)
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: NEERAJ:142.0
  SAY #27666 /* ~The real trouble began when Rogdok came to find out where all the new goblins had come from. He didn't believe for a second that I was a god, but because the goblins did, he dared not attack me. Instead, he locked me up. As long as I remained in his care, he could control the goblins.~ [NER17] */
  IF ~~ THEN DO ~SetGlobal("RedWizards","OH2010",1)
~ EXIT
END

IF ~~ THEN BEGIN 10 // from: NEEKANDO:11.0
  SAY #27667 /* ~You will find that I do not submit meekly to tests, especially tests from Red Wizards.~ [NER22] */
  IF ~~ THEN EXTERN ~NEERAJ~ 144
END

IF ~~ THEN BEGIN 11 // from: NEEKANDO:13.0 NEEKANDO:12.0 NEEKANDO:11.1
  SAY #27668 /* ~Not if I can help it. Behold, the power of untamed magic!~ [NER26] */
  IF ~~ THEN DO ~SetGlobal("PolymorphAdoy","OH2010",1)
ActionOverride("NEEKANDO",Enemy())
ActionOverride("NETHAY01",Enemy())
~ EXIT
END

IF WEIGHT #1 ~  Dead("NEEKANDO")
Global("EKANDO_DEAD","GLOBAL",1)
~ THEN BEGIN 12 // from:
  SAY #27669 /* ~Whew! What an inconvenient mix up.~ [NES1] */
  IF ~~ THEN REPLY #27670 /* ~No matter. We dealt with the Red Wizards.~ */ GOTO 13
  IF ~~ THEN REPLY #27671 /* ~It conveniently kept you out of combat with those Red Wizards, I noticed.~ */ GOTO 14
  IF ~~ THEN REPLY #27672 /* ~What do those Red Wizards want with wild mages, anyway?~ */ GOTO 15
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #27673 /* ~And quite handily, I might add. Few can boast of defeating a Red Wizard of Thay, although they should have known better than to attack a wild mage—worse yet, two!~ [NES2] */
  IF ~  OR(2)
!Dead("NEERA")
AreaCheckObject("OH2010","NEERA")
~ THEN EXTERN ~NEERAJ~ 145
  IF ~  OR(2)
Dead("NEERA")
!AreaCheckObject("OH2010","NEERA")
~ THEN GOTO 24
END

IF ~~ THEN BEGIN 14 // from: 12.1 NEERAJ:145.0
  SAY #27674 /* ~Oh, I would have preferred to fight beside you. Alas, as a practitioner of wild magic, I cannot always predict the outcome of my spells.~ [NES4] */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.0 12.2
  SAY #27675 /* ~The Red Wizards pursue your friend Neera and me to study us—or perhaps just our brains—to learn why we can wield the power of arcane chaos and they can't.~ [NES5] */
  IF ~  OR(2)
!Dead("NEERA")
AreaCheckObject("OH2010","NEERA")
~ THEN EXTERN ~NEERAJ~ 146
  IF ~  OR(2)
Dead("NEERA")
!AreaCheckObject("OH2010","NEERA")
~ THEN GOTO 24
END

IF ~~ THEN BEGIN 16 // from: NEERAJ:146.0
  SAY #27676 /* ~Of course, my dear. Now, as I was saying before we were so rudely interrupted... Wait, where was I?~ [NES7] */
  IF ~~ THEN REPLY #27677 /* ~Summoned goblins, worshipped as a god, captured by a hobgoblin.~ */ GOTO 17
  IF ~~ THEN REPLY #27678 /* ~How about some thanks? That's the second time in a row we've saved your life.~ */ GOTO 18
  IF ~~ THEN REPLY #27679 /* ~You were about to teach Neera how to control her magic.~ */ GOTO 19
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #27680 /* ~Ah, yes, of course. Well, that about sums it up. The next thing I know, you've slain Rogdok and freed me from captivity.~ [NES8] */
  IF ~~ THEN EXTERN ~NEERAJ~ 147
END

IF ~~ THEN BEGIN 18 // from: 16.1
  SAY #27681 /* ~Of course I thank you! Rogdok would not listen to reason, and I was reluctant to unleash the full power of my wild magic upon a tribe who saw me as a god. It's not every day that I'm worshipped.~ [NES9] */
  IF ~~ THEN EXTERN ~NEERAJ~ 147
END

IF ~~ THEN BEGIN 19 // from: 16.2
  SAY #27682 /* ~That's the problem, you see. After all my years of casting wild magic, I still summon a tribe of goblins instead of pease porridge. No one can control wild magic. The best you can do is prepare yourself for the worst, because sooner or later it will happen.~ [NES10] */
  IF ~~ THEN EXTERN ~NEERAJ~ 147
END

IF ~~ THEN BEGIN 20 // from: NEERAJ:147.0
  SAY #27683 /* ~Not at all, my dear. The only secret is to accept the bad with the good. You don't complain when your fireball incinerates an entire tribe of trolls, do you? You just have to be ready to improvise when it showers them in flower petals instead.~ [NES12] */
  IF ~~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #27684 /* ~Half the fun of our profession is that you never know what will happen next. Why, I'd have never discovered the joy of being a woman if that spell hadn't turned on me last summer!~ [NES13] */
  IF ~~ THEN EXTERN ~NEERAJ~ 148
END

IF ~~ THEN BEGIN 22 // from: NEERAJ:148.0
  SAY #27685 /* ~Since you put it that way, maybe there is one thing I can give you. It isn't up my sleeve but around my waist. I constructed this belt for my occasional trips into town.~ [NES15] */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 23 // from: 22.0
  SAY #27686 /* ~Accidentally shocking those who shake my hand can be chalked up to carelessness, but a giant spider with the voice of an old man running through town? Forget about it!~ [NES16] */
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.0 15.1 13.1
  SAY #27687 /* ~I seldom visit settlements these days, so perhaps you'll get more use out of it than I do—and maybe a little peace of mind.~ [NES17] */
  IF ~  OR(2)
Dead("NEERA")
!AreaCheckObject("OH2010","NEERA")
~ THEN REPLY #27688 /* ~That's very generous. Thank you, Adoy.~ */ DO ~GiveItem("NEBELT01",Player1)
~ GOTO 25
  IF ~  !Dead("NEERA")
AreaCheckObject("OH2010","NEERA")
~ THEN REPLY #27688 /* ~That's very generous. Thank you, Adoy.~ */ DO ~GiveItem("NEBELT01",Player1)
~ EXTERN ~NEERAJ~ 149
  IF ~~ THEN REPLY #27689 /* ~Is that the best you can do, old man?~ */ DO ~GiveItem("NEBELT01",Player1)
~ GOTO 25
  IF ~~ THEN REPLY #27690 /* ~That's all very well for Neera. What are you going to do for me?~ */ DO ~GiveItem("NEBELT01",Player1)
~ GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.3 24.2 24.0 NEERAJ:149.0
  SAY #27691 /* ~Oh, don't think I've forgotten you, <CHARNAME>. Watch as I conjure my fabulous treasure trove, all for you!~ [NES19] */
  IF ~~ THEN REPLY #27692 /* ~Wait, is that such a good idea for you to conjure—?~ */ DO ~StartCutScene("CUTNE3A")
~ EXIT
  IF ~~ THEN REPLY #27693 /* ~This had better not be a trove of pease porridge.~ */ DO ~StartCutScene("CUTNE3A")
~ EXIT
  IF ~~ THEN REPLY #27694 /* ~I have a bad feeling about this...~ */ DO ~StartCutScene("CUTNE3A")
~ EXIT
END

IF WEIGHT #3 ~  !Detect(Player1)
~ THEN BEGIN 26 // from:
  SAY #1112 /* ~Can't you see I've troubles on my mind? Leave me and mine alone.~ */
  IF ~~ THEN EXIT
END
