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

BEGIN ~NEMAGREB~

IF ~  Global("MAGREB_PC","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #28181 /* ~Look out! They're coming through the trees. There, behind that rock! No, wait—that was just the shadow of a cloud. You have to be on your guard. They came out of nowhere, but now they're everywhere!~ [NEK1] */
  IF ~~ THEN REPLY #28182 /* ~What? I don't see a thing.~ */ DO ~SetGlobal("MAGREB_PC","GLOBAL",1)
~ GOTO 2
  IF ~~ THEN REPLY #28183 /* ~Calm yourself, man. Take a deep breath and tell us what you've seen.~ */ DO ~SetGlobal("MAGREB_PC","GLOBAL",1)
~ GOTO 2
  IF ~~ THEN REPLY #28184 /* ~Are you sure you haven't been eating the wrong mushrooms?~ */ DO ~SetGlobal("MAGREB_PC","GLOBAL",1)
~ GOTO 1
  IF ~  InParty("NEERA")
~ THEN REPLY #28185 /* ~I don't have time for this. If I want crazy, I'll talk with Neera.~ */ DO ~SetGlobal("MAGREB_PC","GLOBAL",1)
~ EXTERN ~NEERAJ~ 136
END

IF ~~ THEN BEGIN 1 // from: 0.2
  SAY #28186 /* ~Of course not! I know every type of mushroom in this region, and— Say, maybe they're sprouting from the mushrooms. I've never heard of that before, but it makes sense now that I think about it.~ [NEK2] */
  IF ~~ THEN REPLY #28187 /* ~Something has obviously shaken you up. What did you see?~ */ GOTO 2
  IF ~~ THEN REPLY #28188 /* ~You aren't going to make this easy, are you? Spit it out, and I'll do my best to make sense of it.~ */ GOTO 2
  IF ~~ THEN REPLY #21253 /* ~Go on.~ */ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: NEERAJ:136.2 NEERAJ:136.1 NEERAJ:136.0 1.2 1.1 1.0 0.1 0.0
  SAY #28189 /* ~Goblins! They fell out of the sky or leaped up full grown out of the grass. I don't know! All I know is they killed Rilsa when she tried to talk to them, and I can't face them by myself.~ [NEK4] */
  IF ~~ THEN REPLY #28190 /* ~Slow down. You've obviously been through a lot, but you are safe now. Tell me what happened.~ */ GOTO 3
  IF ~~ THEN REPLY #28191 /* ~Get a grip on yourself, you're babbling!~ */ GOTO 3
  IF ~~ THEN REPLY #28192 /* ~You know, I don't have time to listen to another madman. Out of my way.~ */ DO ~SetGlobal("MAGREB_PC","GLOBAL",0)
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 2.1 2.0
  SAY #28193 /* ~Forgive me. My name is Magreb. Rilsa and I have watched over this area for years, and we never had any trouble with goblins before. Since they killed her, I've been half out of my mind with grief.~ [NEK5] */
  IF ~~ THEN REPLY #28194 /* ~I can understand your pain, Magreb. It's hard to lose a loved one.~ */ GOTO 4
  IF ~~ THEN REPLY #28195 /* ~More than half, I'd say. Get to the point.~ */ GOTO 4
  IF ~~ THEN REPLY #21253 /* ~Go on.~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.2 3.1 3.0
  SAY #28196 /* ~Just a few months ago, poof! Goblins as far as the eye can see.~ [NEK6] */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #28197 /* ~At first they appeared around the house of an old mage, but soon they moved into a set of caves to the northeast, taking him with them. Not long after that, a big hobgoblin arrived and made himself king of the tribe.~ [NEK7] */
  IF ~  !Global("ADOY_MET_PARTY","GLOBAL",1)
~ THEN REPLY #28198 /* ~What do you know of this old mage?~ */ GOTO 6
  IF ~  Global("ADOY_MET_PARTY","GLOBAL",1)
~ THEN REPLY #30664 /* ~I might have met this old mage.~ */ GOTO 7
  IF ~  !Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28199 /* ~What else can you tell me about this hobgoblin?~ */ GOTO 8
  IF ~  !Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28200 /* ~I'll deal with these goblins. Where can I find them?~ */ GOTO 9
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28210 /* ~I slew them to the last goblin. Rilsa is avenged.~ */ GOTO 16
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28211 /* ~I took care of the troublemakers among them. You should find the survivors much more open to negotiations.~ */ GOTO 17
END

IF ~~ THEN BEGIN 6 // from: 8.0 5.0
  SAY #28201 /* ~The mage's name was Adoy. He always kept his distance, he said, because he didn't want to hurt us with his magic. I thought it was some kind of threat, but Rilsa said he was just peculiar.~ [NEK8] */
  IF ~  InParty("NEERA")
~ THEN EXTERN ~NEERAJ~ 137
  IF ~  !InParty("NEERA")
~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: NEERAJ:137.0 8.1 6.1 5.1
  SAY #28202 /* ~I suppose he could still be alive, but I haven't seen Adoy since the goblins carried him into their cave. I just assumed they'd slain him, since they'd also killed... *sob*... Rilsa.~ [NEK10] */
  IF ~~ THEN REPLY #28199 /* ~What else can you tell me about this hobgoblin?~ */ GOTO 8
  IF ~~ THEN REPLY #28200 /* ~I'll deal with these goblins. Where can I find them?~ */ GOTO 9
END

IF ~~ THEN BEGIN 8 // from: 7.0 5.2
  SAY #28203 /* ~The goblins call their new king Rogdok. Apparently he's set himself up as a high priest to one of their gods. Hm, that's weird. Rog-dok... god-rock. Maybe the goblins sprang up out of the rocks. Look out, there's one at your feet!~ [NEK11] */
  IF ~  !Global("ADOY_MET_PARTY","GLOBAL",1)
~ THEN REPLY #28204 /* ~Don't worry, it's just a rock. What else can you tell me of this old mage?~ */ GOTO 6
  IF ~  Global("ADOY_MET_PARTY","GLOBAL",1)
~ THEN REPLY #28204 /* ~Don't worry, it's just a rock. What else can you tell me of this old mage?~ */ GOTO 7
  IF ~~ THEN REPLY #28205 /* ~Relax, I'll deal with these goblins. Where can I find them?~ */ GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.2 7.1 5.3
  SAY #28206 /* ~They've taken over a series of caves to the northeast. Be careful if you go there. They send out so many patrols that I've been afraid to go near enough to recover Rilsa's body. Poor Rilsa! She only wanted to talk with them.~ [NEK12] */
  IF ~  !Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28207 /* ~Don't worry. I'll get to the bottom of all this.~ */ UNSOLVED_JOURNAL #32198 /* ~Magreb and Rilsa
A ranger named Magreb talked of a recent goblin uprising in the local area. These goblins murdered his close friend, Rilsa, as she tried to make contact with them. They've apparently taken over a series of caves to the northeast.~ */ EXIT
  IF ~  !Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28208 /* ~Rilsa will have justice!~ */ UNSOLVED_JOURNAL #32198 /* ~Magreb and Rilsa
A ranger named Magreb talked of a recent goblin uprising in the local area. These goblins murdered his close friend, Rilsa, as she tried to make contact with them. They've apparently taken over a series of caves to the northeast.~ */ EXIT
  IF ~  !Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28209 /* ~Rilsa should have known better than to try talking with goblins. I'll show you how it's done.~ */ UNSOLVED_JOURNAL #32198 /* ~Magreb and Rilsa
A ranger named Magreb talked of a recent goblin uprising in the local area. These goblins murdered his close friend, Rilsa, as she tried to make contact with them. They've apparently taken over a series of caves to the northeast.~ */ EXIT
  IF ~  PartyHasItem("NERING01")
!Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28219 /* ~I found this ring with your name inscribed on it.~ */ GOTO 18
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28210 /* ~I slew them to the last goblin. Rilsa is avenged.~ */ GOTO 16
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28211 /* ~I took care of the troublemakers among them. You should find the survivors much more open to negotiations.~ */ GOTO 17
END

IF ~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 10 // from:
  SAY #28193 /* ~Forgive me. My name is Magreb. Rilsa and I have watched over this area for years, and we never had any trouble with goblins before. Since they killed her, I've been half out of my mind with grief.~ [NEK5] */
  IF ~~ THEN EXIT
END

IF ~  Global("MAGREB_PC","GLOBAL",1)
~ THEN BEGIN 11 // from:
  SAY #28218 /* ~I hope you haven't had too much trouble from the local goblins. That's such a strange thing to say: "local goblins." We never had any until a few months ago.~ [NEQ1] */
  IF ~  GlobalLT("BURY_RILSA","GLOBAL",4)
~ THEN GOTO 12
  IF ~  GlobalLT("NEROGDOK_MAGREB","GLOBAL",2)
~ THEN GOTO 13
  IF ~  GlobalGT("BURY_RILSA","GLOBAL",2)
GlobalGT("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN DO ~SetGlobal("MAGREB_PC","GLOBAL",2)
~ EXIT
END

IF ~~ THEN BEGIN 12 // from: 17.0 16.0 11.0
  SAY #30666 /* ~Did you find where those goblins murdered my Rilsa?~ [NE_30666] */
  IF ~~ THEN REPLY #28213 /* ~I was going to do that, but then I decided to go on living my life.~ */ GOTO 15
  IF ~  PartyHasItem("NERING01")
~ THEN REPLY #28219 /* ~I found this ring with your name inscribed on it.~ */ GOTO 18
  IF ~~ THEN REPLY #28212 /* ~Not yet, but I'll get to it soon.~ */ EXIT
END

IF ~~ THEN BEGIN 13 // from: 11.1
  SAY #30667 /* ~What have you discovered? Have you avenged my Rilsa?~ [NE_30667] */
  IF ~~ THEN REPLY #28213 /* ~I was going to do that, but then I decided to go on living my life.~ */ GOTO 15
  IF ~  Global("GOBLINS_KILLED","GLOBAL",9)
Dead("NEROGDOK")
~ THEN REPLY #28210 /* ~I slew them to the last goblin. Rilsa is avenged.~ */ GOTO 16
  IF ~  GlobalLT("GOBLINS_KILLED","GLOBAL",9)
Dead("NEROGDOK")
~ THEN REPLY #28211 /* ~I took care of the troublemakers among them. You should find the survivors much more open to negotiations.~ */ GOTO 17
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",0)
~ THEN REPLY #28221 /* ~You know what they say: "No one expects the summoned tribe of goblins."~ */ GOTO 15
  IF ~  PartyHasItem("NERING01")
!Global("NEROGDOK_MAGREB","GLOBAL",1)
~ THEN REPLY #28219 /* ~I found this ring with your name inscribed on it.~ */ GOTO 18
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",0)
~ THEN REPLY #28212 /* ~Not yet, but I'll get to it soon.~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.5
  SAY #28216 /* ~Thank you. I wish I could do something myself, but Rilsa's death has been such a shock. I wouldn't be any good in a fight.~ [NEM4] */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from: 13.3 13.0 12.0
  SAY #28217 /* ~Well... Of course you owe me nothing. I just hoped you might be... I don't know. Some kind of hero.~ [NEM5] */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from: 13.1 9.4 5.4
  SAY #28214 /* ~I suppose that's for the best, even though I know Rilsa would have preferred a peaceful solution. Thank you.~ [NEM2] */
  IF ~  GlobalLT("BURY_RILSA","GLOBAL",4)
~ THEN DO ~AddexperienceParty(250)
SetGlobal("NEROGDOK_MAGREB","GLOBAL",2)
~ GOTO 12
  IF ~  Global("BURY_RILSA","GLOBAL",4)
~ THEN DO ~AddexperienceParty(250)
EraseJournalEntry(32198)
SetGlobal("NEROGDOK_MAGREB","GLOBAL",2)
SetGlobal("MAGREB_PC","GLOBAL",2)
~ SOLVED_JOURNAL #32199 /* ~Magreb and Rilsa
We found where the goblins had slain Rilsa. We gave her a proper burial and returned a ring we found on her to Magreb. He was happy with the news, considering.~ */ EXIT
END

IF ~~ THEN BEGIN 17 // from: 13.2 9.5 5.5
  SAY #28215 /* ~Maybe that's the best solution. Rilsa would be glad to know you spared those who were open to peaceful coexistence. For both myself and Rilsa, I thank you.~ [NEM3] */
  IF ~  GlobalLT("BURY_RILSA","GLOBAL",4)
~ THEN DO ~AddexperienceParty(250)
SetGlobal("NEROGDOK_MAGREB","GLOBAL",2)
~ GOTO 12
  IF ~  Global("BURY_RILSA","GLOBAL",4)
~ THEN DO ~AddexperienceParty(250)
EraseJournalEntry(32198)
SetGlobal("MAGREB_PC","GLOBAL",2)
SetGlobal("NEROGDOK_MAGREB","GLOBAL",2)
~ SOLVED_JOURNAL #32199 /* ~Magreb and Rilsa
We found where the goblins had slain Rilsa. We gave her a proper burial and returned a ring we found on her to Magreb. He was happy with the news, considering.~ */ EXIT
END

IF ~~ THEN BEGIN 18 // from: 13.4 12.1 9.3
  SAY #28222 /* ~I gave this to Rilsa! You must have found her body. Did you give her a proper burial?~ [NEQ2] */
  IF ~  Global("BURY_RILSA","GLOBAL",2)
~ THEN REPLY #28223 /* ~Yes, it was the least I could do.~ */ GOTO 19
  IF ~  Global("BURY_RILSA","GLOBAL",1)
GlobalLT("GOBLINS_KILLED","GLOBAL",9)
~ THEN REPLY #28224 /* ~Yes, if by "proper burial" you mean "left her for the wild animals."~ */ GOTO 20
  IF ~  Global("BURY_RILSA","GLOBAL",1)
GlobalGT("GOBLINS_KILLED","GLOBAL",8)
Dead("NEROGDOK")
~ THEN REPLY #28224 /* ~Yes, if by "proper burial" you mean "left her for the wild animals."~ */ GOTO 21
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #28225 /* ~Thank you, <CHARNAME>. After all I've been through recently, I'm not sure I had the heart to do it myself.~ [NEQ3] */
  IF ~  GlobalLT("NEROGDOK_MAGREB","GLOBAL",2)
~ THEN DO ~AddexperienceParty(250)
SetGlobal("BURY_RILSA","GLOBAL",4)
TakePartyItem("NERING01")
~ EXIT
  IF ~  Global("NEROGDOK_MAGREB","GLOBAL",2)
~ THEN DO ~AddexperienceParty(250)
EraseJournalEntry(32198)
SetGlobal("MAGREB_PC","GLOBAL",2)
SetGlobal("BURY_RILSA","GLOBAL",4)
TakePartyItem("NERING01")
~ SOLVED_JOURNAL #32199 /* ~Magreb and Rilsa
We found where the goblins had slain Rilsa. We gave her a proper burial and returned a ring we found on her to Magreb. He was happy with the news, considering.~ */ EXIT
END

IF ~~ THEN BEGIN 20 // from: 18.1
  SAY #28226 /* ~What? You left her there all alone? I don't care whether the goblins catch me. I must go and bury her properly.~ [NEQ4] */
  IF ~~ THEN DO ~AddexperienceParty(250)
EraseJournalEntry(32198)
SetGlobal("BURY_RILSA","GLOBAL",3)
TakePartyItem("NERING01")
EscapeArea()
~ SOLVED_JOURNAL #32200 /* ~Magreb and Rilsa
We found Rilsa and returned a ring we found on her to Magreb. While thankful, he was not very happy that we did not give Rilsa a proper burial and ran off to do it himself. We simply have more important things to do.~ */ EXIT
END

IF ~~ THEN BEGIN 21 // from: 18.2
  SAY #32201 /* ~What? You left her there all alone? I must go and bury her properly.~ */
  IF ~~ THEN DO ~AddexperienceParty(250)
EraseJournalEntry(32198)
SetGlobal("BURY_RILSA","GLOBAL",3)
TakePartyItem("NERING01")
EscapeArea()
~ SOLVED_JOURNAL #32200 /* ~Magreb and Rilsa
We found Rilsa and returned a ring we found on her to Magreb. While thankful, he was not very happy that we did not give Rilsa a proper burial and ran off to do it himself. We simply have more important things to do.~ */ EXIT
END

IF ~  Global("MAGREB_PC","GLOBAL",2)
~ THEN BEGIN 22 // from:
  SAY #30665 /* ~Thank you, friend. Rilsa and I have watched over this area for years. Now that she is at peace, I will continue our work.~ [NE_30665] */
  IF ~~ THEN EXIT
END
