// creator  : weidu.exe (version 23100)
// argument : SUDEMIN.DLG
// game		 : .
// source	 : ./DATA/DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~SUDEMIN~

IF ~NumTimesTalkedTo(0)
!GlobalGT("ElvenSpirits","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #59233 /* ~Strangers?  If you are not servants of the Exile, then aid me against these creatures, I beg of you!~ [DEMIN02] */
  IF ~~ THEN EXIT
END

IF ~Global("ElvenAvatar","GLOBAL",0)
Global("TalkedToDemin","GLOBAL",0)
Dead("suadsaan")
Dead("surakraj")
Dead("suraksha")~ THEN BEGIN 1 // from:
  SAY #59234 /* ~Ah... th-thank you for your assistance, strangers.  Forgive me, also, if I reward your effort with questions.  How do you come to be here?~ [DEMIN08] */
  IF ~~ THEN DO ~SetGlobal("TalkedToDemin","GLOBAL",1)~ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #59235 /* ~Our city is not usually found by outsiders, doubly so with the Exile employing his magics to hide us.  It is beyond fortuitous if you stumbled here unknowing.~ */
  IF ~~ THEN REPLY #59236 /* ~I seek the one you call "the Exile".  Irenicus has taken much from me.~ */ GOTO 3
  IF ~OR(4)
PartyHasItem("miscbl")
PartyHasItem("miscbm")
PartyHasItem("miscbn")
PartyHasItem("miscbo")~ THEN REPLY #59237 /* ~I seek a means of curing a loved one I lost in a battle with his sister, Bodhi.~ */ GOTO 3
  IF ~~ THEN REPLY #59238 /* ~I sought Irenicus for my own reasons, but now I seek to help you as well.~ */ GOTO 3
  IF ~~ THEN REPLY #59240 /* ~Again you call Irenicus "the Exile".  Why?  Elhan would not say, and I must know.~ */ GOTO 5
END

IF ~~ THEN BEGIN 3 // from: 2.2 2.1 2.0
  SAY #59239 /* ~It is our folly if we think his terror would be isolated. I apologize if he pained you, for we are partially to blame for each act of evil he survives to commit.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #59241 /* ~We will seek to make reparations when this matter is done, but the Exile is firmly in control at the moment.  We are at his mercy.~ */
  IF ~~ THEN REPLY #59244 /* ~Elhan was particularly vexing, demanding help while also refusing information.~ */ GOTO 7
  IF ~~ THEN REPLY #59245 /* ~I would help for the good of both of us, but I do not know what has triggered this.~ */ GOTO 6
  IF ~~ THEN REPLY #59246 /* ~You will continue to be so if I don't start getting some answers.  What caused this?~ */ GOTO 6
END

IF ~~ THEN BEGIN 5 // from: 2.3
  SAY #59242 /* ~Elhan is like many of us, and would prefer this incident solved without involving others.  Forgive him his hesitation, he only wishes for the best outcome.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0 4.2 4.1
  SAY #59243 /* ~I begin to feel it is a mistake to keep this amongst us exclusively.  The consequences have been far reaching and have proven especially difficult to dispel.~ */
  IF ~~ THEN REPLY #59247 /* ~Elhan was particularly vexing, demanding help while also refusing information.~ */ GOTO 7
  IF ~~ THEN REPLY #59248 /* ~I would help for the good of both of us, but I do not know what has triggered this.~ */ GOTO 7
  IF ~~ THEN REPLY #59249 /* ~This will continue until I get some satisfactory answers! What caused this!~ */ GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.2 6.1 6.0 4.0
  SAY #59250 /* ~I am not so concerned with the shame of our people over Irenicus and Bodhi. What good is our silence if the city is crushed because we would not seek help?~ */
  IF ~Race(Player1,ELF)~ THEN GOTO 9
  IF ~!Race(Player1,ELF)~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.1
  SAY #59251 /* ~You are not an elf.  It must be difficult to fathom why we are so hesitant to speak of this.  Hopefully you will come to understand.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 9 // from: 7.0
  SAY #59252 /* ~As an elf, perhaps you will come to understand our hesitation in speaking of this.  Hopefully it is a folly that will not be repeated again.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0 8.0
  SAY #59253 /* ~The Exiles were not always as you know them now.  They once had names that I would have been proud to speak, and were as worthy as any other of praise.~ */
  IF ~~ THEN REPLY #59255 /* ~Then they have fallen far from that lofty perch.  I see no trace of worth in them now.~ */ GOTO 11
  IF ~~ THEN REPLY #59256 /* ~So you say, but I have found both of them worthy of only hatred and loathing.~ */ GOTO 11
  IF ~~ THEN REPLY #59257 /* ~So you say, though I have had no experience with their good sides.~ */ GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.2 10.1 10.0
  SAY #59254 /* ~Certainly you are entitled to your misgivings. You would not be here if you were not driven by powerful emotions, and the Exile is good at provoking a reaction.~ */
  IF ~!IsValidForPartyDialogue("CERND")
!IsValidForPartyDialogue("KORGAN")
!IsValidForPartyDialogue("KELDORN")
!IsValidForPartyDialogue("EDWIN")~ THEN GOTO 12
  IF ~IsValidForPartyDialogue("CERND")~ THEN EXTERN ~CERNDJ~ 121
  IF ~IsValidForPartyDialogue("KORGAN")
!IsValidForPartyDialogue("CERND")~ THEN EXTERN ~KORGANJ~ 159
  IF ~IsValidForPartyDialogue("KELDORN")
!IsValidForPartyDialogue("CERND")
!IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~KELDORJ~ 219
  IF ~IsValidForPartyDialogue("EDWIN")
!IsValidForPartyDialogue("CERND")
!IsValidForPartyDialogue("KORGAN")
!IsValidForPartyDialogue("KELDORN")~ THEN EXTERN ~EDWINJ~ 130
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #59258 /* ~He has garnered the strongest of reactions from we, his own people, for he wronged us greater than any other. He is a criminal that knows no bounds.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #59259 /* ~Yes, he was elven as we are, but no longer. Queen Ellesime cast him out, for he had proven he was not elven at heart.~ */
  IF ~~ THEN REPLY #59260 /* ~That must have been some crime. What did he do?~ */ GOTO 14
  IF ~~ THEN REPLY #59261 /* ~And Bodhi? Was she involved in this too?~ */ GOTO 14
  IF ~~ THEN REPLY #59262 /* ~He seems powerful enough. What did he hope to accomplish?~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.2 13.1 13.0
  SAY #59263 /* ~She and He were well known in the elven court of Suldanessellar. He, at least, was a great asset to our kind and kin.~ */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #59264 /* ~He was the greatest of our mages, as skilled as any of elven blood could be without divine assistance. He even had the favor of the Queen. It was not enough.~ */
  IF ~!IsValidForPartyDialogue("ANOMEN")
!IsValidForPartyDialogue("KORGAN")~ THEN GOTO 16
  IF ~IsValidForPartyDialogue("ANOMEN")~ THEN EXTERN ~ANOMENJ~ 279
  IF ~!IsValidForPartyDialogue("ANOMEN")
IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~KORGANJ~ 161
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #59265 /* ~Of the two, the 'sister' was the insatiable one. She was not as regarded, but she held great influence over her 'brother,' and pulled him into her madness.~ */
  IF ~~ THEN REPLY #59267 /* ~How lovely. It's nice that those butchers keep so close.~ */ GOTO 17
  IF ~~ THEN REPLY #59268 /* ~Go on.~ */ GOTO 17
  IF ~~ THEN REPLY #59269 /* ~Is your rambling going to lead anywhere?~ */ GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.2 16.1 16.0
  SAY #59266 /* ~Together they sought more than was possible; they wished the power of the gods, and they were not concerned about the consequences.~ */
  IF ~~ THEN GOTO 18
END

IF ~~ THEN BEGIN 18 // from: 17.0
  SAY #59270 /* ~He of the Exiles performed a dark ritual, and committed a grave offense against the greatest symbol of our longevity: the Tree of Life.~ */
  IF ~~ THEN GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #59271 /* ~He sought to merge his essence with the divine tree, draining it and stealing its energy. He failed, but there was a price to pay for the rest of us.~ */
  IF ~~ THEN GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #59272 /* ~He disrupted the elven connection to land and nature. There was a great shock that ran through Suldanessellar, and many of our weaker citizens lay near death.~ */
  IF ~~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #59273 /* ~That he would endanger so many for he and his sister's selfish goals was one thing, but to threaten the very nature of what makes us who we are was unfathomable.~ */
  IF ~~ THEN REPLY #59274 /* ~Then why was he not killed outright? It would have saved a lot of trouble.~ */ GOTO 22
  IF ~~ THEN REPLY #59275 /* ~An unforgivable thing, I am sure. What came of it?~ */ GOTO 22
  IF ~~ THEN REPLY #59276 /* ~Yes, yes, I smell your outrage. Get on with your story.~ */ GOTO 22
END

IF ~~ THEN BEGIN 22 // from: 21.2 21.1 21.0
  SAY #59277 /* ~It fell to Ellesime to judge the crime, and she was harsh. Having forsaken everything elven, they would be outcast so they might learn how precious our ways are.~ */
  IF ~!IsValidForPartyDialogue("HAERDALIS")
!IsValidForPartyDialogue("KORGAN")
!IsValidForPartyDialogue("MAZZY")~ THEN GOTO 23
  IF ~IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~KORGANJ~ 160
  IF ~IsValidForPartyDialogue("HAERDALIS")
!IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~HAERDAJ~ 129
  IF ~IsValidForPartyDialogue("MAZZY")
!IsValidForPartyDialogue("HAERDALIS")
!IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~MAZZYJ~ 182
END

IF ~~ THEN BEGIN 23 // from: 22.0
  SAY #59278 /* ~Of spiritually high regard, Ellesime petitioned the gods and a divine curse was placed upon the Exiles. All their connection to the elven spirit was severed.~ */
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.0
  SAY #59279 /* ~Ellesime thought it a punishment worse than death. A life no longer than a human's, and their elven spirits banished from the paradise all elvenkind are entitled to.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #59280 /* ~The sister exposed herself to vampirism to try and counteract the divine curse, but gods are not routed so easily.  The brother did not risk the same.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #59281 /* ~A better man would have learned to appreciate what he had lost, perhaps learning humility and seek to make amends. He did not prove to be a 'better man.'~ */
  IF ~~ THEN REPLY #59282 /* ~You cut Irenicus and Bodhi loose and instead of reforming they plotted revenge. Typical.~ */ GOTO 27
  IF ~~ THEN REPLY #59283 /* ~Wow, what was your first clue, genius?~ */ GOTO 27
  IF ~~ THEN REPLY #59284 /* ~I should say not. I have experienced the hatred that drives Irenicus.~ */ GOTO 27
END

IF ~~ THEN BEGIN 27 // from: 26.2 26.1 26.0
  SAY #59285 /* ~We had hoped this would turn out better.  The Exile has found a way to restore himself, has made pacts with our most despised enemies, and has resumed his original plot.~ */
  IF ~~ THEN REPLY #59288 /* ~And this is where I come in.  He stole my divine soul through some sort of ritual.~ */ GOTO 28
  IF ~~ THEN REPLY #59289 /* ~Yeah, he restored himself alright!  By stealing my divine soul!~ */ GOTO 28
  IF ~~ THEN REPLY #59290 /* ~I seek him because of his restoration.  He has harmed me and those dear to me.~ */ GOTO 28
  IF ~~ THEN REPLY #59291 /* ~I will still kill him for my own reasons.  Irenicus has earned his death, just like Bodhi.~ */ GOTO 28
END

IF ~~ THEN BEGIN 28 // from: 27.3 27.2 27.1 27.0
  SAY #59286 /* ~I have no way to accurately measure the cost of our decisions on you.  Reparations will be made, if there is anyone left here to make them.~ */
  IF ~~ THEN GOTO 29
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #59287 /* ~I... I am still in shock that this happened.  So much of Suldanessellar's defenses were away, battling the Drow and their incursion at the temple.  We were left weak.~ */
  IF ~~ THEN GOTO 30
END

IF ~~ THEN BEGIN 30 // from: 29.0
  SAY #59292 /* ~One group of exiles helping another, both so full of their petty hatred and jealousy that they would stop at nothing to strike at our hearts.~ */
  IF ~~ THEN GOTO 31
END

IF ~~ THEN BEGIN 31 // from: 30.0
  SAY #59293 /* ~The Exile brought to the city magical constructs and demons, and a... a black dragon, which landed to the northwest.  I have been trying to fight, but there are too many.~ */
  IF ~~ THEN REPLY #59295 /* ~Elhan spoke of Ellesime, and how she might be able to help.~ */ GOTO 33
  IF ~~ THEN REPLY #59296 /* ~I am to find Ellesime. After that, Irenicus is mine to deal with.~ */ GOTO 33
  IF ~~ THEN REPLY #59297 /* ~Irenicus is the one I want.  The rest of your people are on their own.~ */ GOTO 33
END

IF ~~ THEN BEGIN 32 // from: 34.0
  SAY #59294 /* ~And I believe there is a way to do both at the same time, though it will not be easy.  No, we have seen to it that it will not be easy.~ */
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Imoen2")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ GOTO 35
  IF ~IsValidForPartyDialog("Keldorn")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~KELDORJ~ 211
  IF ~!IsValidForPartyDialog("Keldorn")
IsValidForPartyDialog("Aerie")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~AERIEJ~ 154
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
IsValidForPartyDialog("Cernd")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~CERNDJ~ 117
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
IsValidForPartyDialog("Edwin")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~EDWINJ~ 121
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
!IsValidForPartyDialog("Edwin")
IsValidForPartyDialog("Imoen2")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~IMOEN2J~ 28
END

IF ~~ THEN BEGIN 33 // from: 31.2 31.1 31.0
  SAY #59298 /* ~The Exile has seeded the streets with his minions, and taken Ellesime into the palace.  I have made an attempt to enter, but it is sealed tight.~ */
  IF ~~ THEN GOTO 34
END

IF ~~ THEN BEGIN 34 // from: 33.0
  SAY #59299 /* ~Whether you search for the Queen or seek the Exile for reasons of your own, you will have to get into the palace and also deal with the monsters in the streets.~ */
  IF ~~ THEN GOTO 32
END

IF ~~ THEN BEGIN 35 // from: 32.0
  SAY #59300 /* ~I obviously do not have the strength, myself, to complete the task.  I think perhaps you do.  If I tell you what is to be done, will you do it?~ */
  IF ~~ THEN REPLY #59301 /* ~I will.  How can the creatures be stopped?~ */ GOTO 41
  IF ~~ THEN REPLY #59302 /* ~If there is no other way, then fine.  Tell me what needs to be done.~ */ GOTO 41
  IF ~~ THEN REPLY #59303 /* ~There must be another way into the palace!  Or to get inside the gates!~ */ GOTO 36
  IF ~~ THEN REPLY #59304 /* ~I care nothing for Ellesime.  I am here to find Irenicus, so tell me how to get to him.~ */ GOTO 37
END

IF ~~ THEN BEGIN 36 // from: 47.1 35.2
  SAY #59305 /* ~There is no time to argue.  It is the only way to get in *and* rid the city of these creatures.  I am determined to save the elves from the Exile's beasts, stranger.~ */
  IF ~~ THEN REPLY #59306 /* ~Fine, then.  If there is no other way, then tell me what you need done.~ */ GOTO 41
  IF ~~ THEN REPLY #59307 /* ~Well, I care nothing for the elves of this city!  I am here to find Irenicus only!~ */ GOTO 37
  IF ~~ THEN REPLY #59308 /* ~Tell me of another way, priestess, or things are going to get very unpleasant!~ */ GOTO 38
  IF ~~ THEN REPLY #59309 /* ~I'll find my own way into the palace, then.~ */ GOTO 46
END

IF ~~ THEN BEGIN 37 // from: 36.1 35.3
  SAY #59310 /* ~Irenicus is within the palace... you must enter to find him.  And if you care nothing for my people than I care nothing about using you to aid them.  It is the only way.~ */
  IF ~~ THEN REPLY #59311 /* ~Fine, then.  If there is no other way, then tell me what you need done.~ */ GOTO 41
  IF ~~ THEN REPLY #59312 /* ~Tell me of another way, priestess, or things are going to get very unpleasant!~ */ GOTO 38
  IF ~~ THEN REPLY #59313 /* ~I'll find my own way into the palace, then.~ */ GOTO 46
END

IF ~~ THEN BEGIN 38 // from: 47.2 37.1 36.2
  SAY #59314 /* ~More unpleasant than my people killed?  Do not make me laugh.  I will gladly die to save my home if need be, and if you only add to the death may the Black Archer take your soul!~ */
  IF ~~ THEN GOTO 39
END

IF ~~ THEN BEGIN 39 // from: 38.0
  SAY #59315 /* ~If Elhan has admitted the likes of you to our torn city things must be more desperate than I thought!   Do you plan to help, or do you intend to add to the fire?~ */
  IF ~~ THEN REPLY #59316 /* ~You asked for it, sister... time for you to die!~ */ GOTO 40
  IF ~~ THEN REPLY #59317 /* ~Fine!  I will do what you need me to do, so long as it does not take too long!~ */ GOTO 41
  IF ~~ THEN REPLY #59318 /* ~I shall find my own way into the palace, then.~ */ GOTO 46
END

IF ~~ THEN BEGIN 40 // from: 39.0
  SAY #59319 /* ~If you are so much the fool, then the One and the Three curse you!  I spit upon your ignorant blood!~ */
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
!IsValidForPartyDialog("Keldorn")~ THEN DO ~Enemy()
ActionOverride("Aerie",LeaveParty())
ActionOverride("Aerie",Enemy())
ActionOverride("Cernd",LeaveParty())
ActionOverride("Cernd",Enemy())
ActionOverride("Keldorn",LeaveParty())
ActionOverride("Keldorn",Enemy())
ActionOverride("Mazzy",LeaveParty())
ActionOverride("Mazzy",Enemy())
ActionOverride("Jaheira",LeaveParty())
ActionOverride("Jaheira",Enemy())
ActionOverride("Valygar",LeaveParty())
ActionOverride("Valygar",Enemy())~ EXIT
  IF ~IsValidForPartyDialog("Aerie")~ THEN DO ~Enemy()~ EXTERN ~AERIEJ~ 155
  IF ~!IsValidForPartyDialog("Aerie")
IsValidForPartyDialog("Cernd")~ THEN DO ~Enemy()~ EXTERN ~CERNDJ~ 118
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
IsValidForPartyDialog("Keldorn")~ THEN DO ~Enemy()~ EXTERN ~KELDORJ~ 213
END

IF ~~ THEN BEGIN 41 // from: 47.0 39.1 37.0 36.0 35.1 35.0
  SAY #59320 /* ~The temple is dedicated to Rillifane Rallathil.  He can summon the spirit defenders of the forest to protect us... and has the power to break the seal on the palace.~ */
  IF ~~ THEN GOTO 42
END

IF ~~ THEN BEGIN 42 // from: 41.0
  SAY #59321 /* ~But the Leaflord must be awakened, his avatar summoned, in order for the spirits to come.  The Exile's creatures have desecrated the temple and stolen the artifacts I need.~ */
  IF ~~ THEN GOTO 43
END

IF ~~ THEN BEGIN 43 // from: 42.0
  SAY #59322 /* ~The artifacts are lost in the city, held by the Exile's minions, perhaps even the black dragon in the northwest. There are three: a talisman of Rillifane, a golden cup, and a moonblade.~ */
  IF ~~ THEN GOTO 44
END

IF ~~ THEN BEGIN 44 // from: 43.0
  SAY #59323 /* ~Go into the temple, which will most likely be guarded, and place the items on the statue in the center.  This will summon the avatar to our defense.~ */
  IF ~~ THEN REPLY #59324 /* ~This had better be worth the trouble.~ */ GOTO 45
  IF ~~ THEN REPLY #59325 /* ~Are you certain this is the solution?~ */ GOTO 45
END

IF ~~ THEN BEGIN 45 // from: 44.1 44.0
  SAY #59326 /* ~I believe so, stranger.  I cannot be sure, but only Rillifane has the power.  Go, please... the longer you wait the more elves will suffer.  Quickly!~ */
  IF ~~ THEN DO ~SetGlobal("DerminJob","GLOBAL",1)~ UNSOLVED_JOURNAL #23482 /* ~Getting Inside the Palace in Suldanessellar

Demin's plan is to summon the avatar of the elven god Rillifane.  He will awaken the forest spirit guardians to save the elves, and he has the power to break the seal on the palace.
Irenicus' creatures stole three relics from Rillifane's temple and I must return them. It was a cup, a talisman and a moonblade.  The more powerful monsters will have them, including, Demin suspects, Irenicus' black dragon in the northwest.  Once I gather the items I must enter Rillifane's temple and place the relics on his statue... that should summon the avatar.  I must move quickly before Irenicus completes whatever plan he has set in motion here.~ */ EXIT
END

IF ~~ THEN BEGIN 46 // from: 39.2 37.2 36.3
  SAY #59327 /* ~You may try, if you wish.  I shall remain here to regain my strength before I resume my search.  If you... change your mind, stranger, come speak to me again.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #23481 /* ~Getting Inside the Palace in Suldanessellar

I refused to hear Demin's plan, for I have no time to go about saving the elves.  There must be another way inside the palace, despite what she says!  Demin is too weak to go far, so she simply told me to return once I changed my mind.~ */ EXIT
END

IF ~Global("DerminJob","GLOBAL",0)
Global("ElvenAvatar","GLOBAL",0)
Global("TalkedToDemin","GLOBAL",1)
Dead("suadsaan")
Dead("surakraj")
Dead("suraksha")~ THEN BEGIN 47 // from:
  SAY #59328 /* ~Ah.  You have returned, I see.  Have you changed your mind, then, stranger?  Will you help me to save the elves of this city?~ [DEMIN09] */
  IF ~~ THEN REPLY #59331 /* ~I suppose I'll have to if I want to find a way into the palace.~ */ GOTO 41
  IF ~~ THEN REPLY #59332 /* ~There must be some other way into the palace.  I want you to tell me where it is.~ */ GOTO 36
  IF ~~ THEN REPLY #59333 /* ~You're going to tell me of another way in before things become very unpleasant.~ */ GOTO 38
  IF ~~ THEN REPLY #59334 /* ~No, you're still on your own.~ */ GOTO 48
END

IF ~~ THEN BEGIN 48 // from: 47.3
  SAY #59329 /* ~Then why did you return?  (sigh)  Do as you wish, but if you are not here to help the city then you may as well leave Suldanessellar now.~ */
  IF ~~ THEN EXIT
END

IF ~Global("DerminJob","GLOBAL",1)
Global("TalkedToDemin","GLOBAL",1)
Global("ElvenSpirits","GLOBAL",0)
Dead("suadsaan")
Dead("surakraj")
Dead("suraksha")~ THEN BEGIN 49 // from:
  SAY #59330 /* ~You have returned... but I do not sense that the avatar has been summoned.  Is there something you need, stranger?  You must move quickly!~ */
  IF ~~ THEN REPLY #59335 /* ~What do I have to do again?~ */ GOTO 50
  IF ~PartyHasItem("miscb1")
PartyHasItem("miscb2")
PartyHasItem("miscb3")~ THEN REPLY #59336 /* ~I just want to see if I have all the artifacts I need.~ */ GOTO 52
  IF ~OR(3)
!PartyHasItem("miscb1")
!PartyHasItem("miscb2")
!PartyHasItem("miscb3")~ THEN REPLY #59337 /* ~I just want to see if I have all the artifacts I need.~ */ GOTO 53
  IF ~~ THEN REPLY #59338 /* ~Is there no help that you can offer?~ */ GOTO 54
  IF ~~ THEN REPLY #59339 /* ~Alright, I'm going.~ */ GOTO 51
END

IF ~~ THEN BEGIN 50 // from: 49.0
  SAY #59340 /* ~Find the holy artifacts, the talisman, the golden cup, and the moonblade, and bring them to the temple.  Place them on the statue in the center of the room to summon the avatar.~ */
  IF ~~ THEN GOTO 51
END

IF ~~ THEN BEGIN 51 // from: 54.0 53.0 52.0 50.0 49.4
  SAY #59341 /* ~Please go quickly!  Rillifane's avatar must be summoned soon if Suldanessellar is to be saved!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 52 // from: 49.1
  SAY #59342 /* ~Let me see... the talisman, the cup...  yes!  Yes!  You have everything that is needed!  Now you must battle your way into the temple and place them on the statue!~ */
  IF ~~ THEN UNSOLVED_JOURNAL #11883 /* ~Getting Inside the Palace in Suldanessellar

Demin has confirmed that I have collected the necessary relics... I must now make my way to the temple and place them on Rillifane's statue.~ */ GOTO 51
END

IF ~~ THEN BEGIN 53 // from: 49.2
  SAY #59343 /* ~Let me see...  I do not see the artifacts amongst your possessions.  The creatures who raided the temple and took them should still be in the city.  Find them!~ */
  IF ~~ THEN GOTO 51
END

IF ~~ THEN BEGIN 54 // from: 49.3
  SAY #59344 /* ~I have nothing left to offer.  My spells are drained, and any holy items I had were in the temple.  If the people are to be aided, it must be you who is to do it.~ */
  IF ~~ THEN GOTO 51
END

IF ~GlobalGT("ElvenSpirits","GLOBAL",0)
Dead("suadsaan")
Dead("surakraj")
Dead("suraksha")~ THEN BEGIN 55 // from:
  SAY #59345 /* ~You have summoned Rillifane's avatar, the spirit defenders will deal with the Exile's creatures while the city is properly evacuated and the wounded dealt with.~ [DEMIN10] */
  IF ~~ THEN GOTO 56
END

IF ~~ THEN BEGIN 56 // from: 55.0
  SAY #59346 /* ~The gates to the palace are unsealed, now... you can deal with the Exile directly.  I do not know his plans, but I fear what he might do to both the Queen and the Tree of Life.~ */
  IF ~~ THEN GOTO 57
END

IF ~~ THEN BEGIN 57 // from: 56.0
  SAY #59347 /* ~If the Exile has done something to the Great Tree... corrupted it, perhaps, I don't know... only Queen Ellesime will have the power to stop him.~ */
  IF ~~ THEN GOTO 59
END

IF ~~ THEN BEGIN 58 // from: 59.0
  SAY #59348 /* ~I must leave you now, and help with the great many wounded. Thank you stranger, for all you have done... good luck. I pray that the Exile is not successful.~ */
  IF ~~ THEN DO ~EscapeArea()~ SOLVED_JOURNAL #15718 /* ~Getting Inside the Palace in Suldanessellar

Now that the guardians have been summoned, Demin has left to aid the wounded in the city.  She told me before she left that Irenicus plans to do something to the Tree of Life... and that only Ellesime may have the power to stop him. I will need to find the Stone Harp and Horn to get through the palace.~ */ EXIT
END

IF ~~ THEN BEGIN 59 // from: 57.0
  SAY #61286 /* ~You will need the Stone Harp and the Stone Horn to pass through the palace. they can be found within the Harpist's House and the House of the Horn respectively.~ */
  IF ~~ THEN GOTO 58
END
