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

BEGIN ~KAYL2~

IF ~~ THEN BEGIN 0 // from:
  SAY #8120 /* ~Excellent, Squire Anomen. The Prelate waits within. May Torm be with you on this day.~ */
  IF ~~ THEN EXTERN ~ANOMENJ~ 90
END

IF ~~ THEN BEGIN 1 // from:
  SAY #8125 /* ~Step inside the hall. I shall speak with you when you are finished. Your party may accompany you if you wish.~ */
  IF ~~ THEN EXTERN ~ANOMENJ~ 91
END

IF ~~ THEN BEGIN 2 // from: HPRELATE:10.0
  SAY #8178 /* ~Do as the Prelate suggests, Anomen. You have worn out your welcome and must no longer taint this place with your presence.~ */
  IF ~~ THEN EXTERN ~ANOMENJ~ 100
END

IF ~Global("AnomenIsKnight","GLOBAL",1)
Global("AfterKnight","AR0903",0)
InParty("Anomen")
See("Anomen")
!StateCheck("Anomen",STATE_SLEEPING)~ THEN BEGIN 3 // from:
  SAY #8395 /* ~Sir Anomen, I congratulate you. As your new superior I welcome you and honor your knighthood.~ [KAYLXX06] */
  IF ~~ THEN DO ~SetGlobal("AfterKNight","AR0903",1)~ EXTERN ~ANOMENJ~ 108
END

IF ~~ THEN BEGIN 4 // from:
  SAY #8398 /* ~Normally you would accompany me as my man at arms, but while you continue on a righteous path you may escort <CHARNAME>. Go well, Sir Anomen and Torm bless thee.~ */
  IF ~~ THEN EXTERN ~ANOMENJ~ 109
END

IF ~ReputationGT([PC],9)
Global("KaylFallenPaladinPlot","GLOBAL",0)
Global("Kayl1Done","GLOBAL",0)
~ THEN BEGIN 5 // from:
  SAY #31800 /* ~Greetings, <CHARNAME>. I have heard of you.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #31801 /* ~I would like to offer you the opportunity to help the Most Noble Order of the Radiant Heart.  Are you interested in hearing my proposal?~ [KAYLXX07] */
  IF ~~ THEN REPLY #31802 /* ~No, we have better things to do.~ */ GOTO 7
  IF ~~ THEN REPLY #31803 /* ~Please explain.~ */ GOTO 9
  IF ~~ THEN REPLY #31804 /* ~How much gold will you give us?~ */ GOTO 8
END

IF ~~ THEN BEGIN 7 // from: 26.0 13.1 11.0 8.1 6.0
  SAY #31805 /* ~That is a shame, truly, for we have no one else to turn to at this time.  If you change your mind, please come back and speak with me.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 6.2
  SAY #31806 /* ~Your reward would be a magical item of great value to the Order and to an adventurer such as yourself: Gloves of Healing.  Are you interested in hearing more?~ */
  IF ~~ THEN REPLY #31818 /* ~Of course, please go on.~ */ GOTO 9
  IF ~~ THEN REPLY #31819 /* ~I've heard enough and I'm not interested, good bye.~ */ GOTO 7
END

IF ~~ THEN BEGIN 9 // from: 8.0 6.1
  SAY #31807 /* ~The task of being a paladin is not easy. Many break under the demands of our path, and leave to pursue avenues of life more appropriate to their talents.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #31808 /* ~Sometimes they bend instead of break, twisting their paladinhood to serve their own purpose. These are hard to detect, but when found they are quickly cast out.~ */
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Anomen")
!IsValidForPartyDialog("Mazzy")~ THEN GOTO 25
  IF ~IsValidForPartyDialog("Keldorn")~ THEN EXTERN ~KELDORJ~ 130
  IF ~!IsValidForPartyDialog("Keldorn")
IsValidForPartyDialog("Anomen")~ THEN EXTERN ~ANOMENJ~ 200
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Anomen")
IsValidForPartyDialog("Mazzy")~ THEN EXTERN ~MAZZYJ~ 140
END

IF ~~ THEN BEGIN 11 // from: 27.0
  SAY #31809 /* ~The Fallen Paladins, as they're known, would recognize any of our Order, and some also fear conflict with former friends, so we need outside help in this matter.~ */
  IF ~~ THEN REPLY #31812 /* ~I've heard enough, I'm not interested.~ */ GOTO 7
  IF ~~ THEN REPLY #31813 /* ~What do you want us to do then?~ */ GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.1
  SAY #31814 /* ~The Fallen Paladins always need warriors to aid their illegal activities.  We want your party to ally with them, especially Anarg.  He's the key to them all.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #31815 /* ~If you consider these men a threat, then do what you think is necessary.   Gloves of Healing would be a suitable reward for the task, I think.  Do you accept?~ */
  IF ~~ THEN REPLY #31816 /* ~Yes I do.~ */ GOTO 14
  IF ~~ THEN REPLY #31817 /* ~No, my travels are taking me elsewhere.~ */ GOTO 7
END

IF ~~ THEN BEGIN 14 // from: 13.0
  SAY #31820 /* ~Excellent. Thanks to the Shadow Thieves, Anarg has kept their activities localized in the Bridge District. I suggest you search there. May Torm be with you.~ */
  IF ~!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Korgan")
!IsValidForPartyDialog("Keldorn")~ THEN DO ~SetGlobal("KaylFallenPaladinPlot","GLOBAL",1)
~ UNSOLVED_JOURNAL #34244 /* ~Seek out and investigate the Fallen Paladins.

Ryan Trawl of the Most Noble Order of the Radiant Heart has hired me to seek out and ally myself with a group called the Fallen Paladins.  They are reported to be in the Bridge District and led by a former knight named Anarg.  If I think the group is a threat, I am to do whatever is necessary, and then report back to Sir Ryan.~ */ EXIT
  IF ~IsValidForPartyDialog("Edwin")~ THEN DO ~SetGlobal("KaylFallenPaladinPlot","GLOBAL",1)~ UNSOLVED_JOURNAL #34244 /* ~Seek out and investigate the Fallen Paladins.

Ryan Trawl of the Most Noble Order of the Radiant Heart has hired me to seek out and ally myself with a group called the Fallen Paladins.  They are reported to be in the Bridge District and led by a former knight named Anarg.  If I think the group is a threat, I am to do whatever is necessary, and then report back to Sir Ryan.~ */ EXTERN ~EDWINJ~ 58
  IF ~!IsValidForPartyDialog("Edwin")
IsValidForPartyDialog("Korgan")~ THEN DO ~SetGlobal("KaylFallenPaladinPlot","GLOBAL",1)~ UNSOLVED_JOURNAL #34244 /* ~Seek out and investigate the Fallen Paladins.

Ryan Trawl of the Most Noble Order of the Radiant Heart has hired me to seek out and ally myself with a group called the Fallen Paladins.  They are reported to be in the Bridge District and led by a former knight named Anarg.  If I think the group is a threat, I am to do whatever is necessary, and then report back to Sir Ryan.~ */ EXTERN ~KORGANJ~ 84
  IF ~!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Korgan")
IsValidForPartyDialog("Keldorn")~ THEN DO ~SetGlobal("KaylFallenPaladinPlot","GLOBAL",1)~ UNSOLVED_JOURNAL #34244 /* ~Seek out and investigate the Fallen Paladins.

Ryan Trawl of the Most Noble Order of the Radiant Heart has hired me to seek out and ally myself with a group called the Fallen Paladins.  They are reported to be in the Bridge District and led by a former knight named Anarg.  If I think the group is a threat, I am to do whatever is necessary, and then report back to Sir Ryan.~ */ EXTERN ~KELDORJ~ 132
END

IF ~Global("KaylFallenPaladinPlot","GLOBAL",1)
!Dead("kaypala")
OR(2)
Global("ReynaldJob","GLOBAL",0)
Global("KaylAcceptCupMission","GLOBAL",2)
ReputationGT([PC],9)
Global("Kayl1Done","GLOBAL",0)~ THEN BEGIN 15 // from:
  SAY #31821 /* ~Have you completed your mission?~ */
  IF ~~ THEN REPLY #31822 /* ~No, not yet but we are working on it.~ */ GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #31823 /* ~Return when you are finished.~ */
  IF ~~ THEN EXIT
END

IF ~Dead("kaypala")
PartyHasItem("Misc6i")
ReputationGT([PC],9)
Global("Kayl1Done","GLOBAL",0)~ THEN BEGIN 17 // from:
  SAY #31824 /* ~By your grim expressions I think that you have done what I asked.  Is this so?~ */
  IF ~~ THEN REPLY #31825 /* ~Yes, the Fallen Paladins are destroyed.~ */ DO ~AddXPObject(Player1,17500)
AddXPObject(Player2,17500)
AddXPObject(Player3,17500)
AddXPObject(Player4,17500)
AddXPObject(Player5,17500)
AddXPObject(Player6,17500)
~ GOTO 18
  IF ~~ THEN REPLY #31826 /* ~We have done as you asked.~ */ DO ~AddXPObject(Player1,17500)
AddXPObject(Player2,17500)
AddXPObject(Player3,17500)
AddXPObject(Player4,17500)
AddXPObject(Player5,17500)
AddXPObject(Player6,17500)
~ GOTO 18
END

IF ~~ THEN BEGIN 18 // from: 17.1 17.0
  SAY #31828 /* ~Then you are due your just reward.  The Most Noble Order of the Radiant Heart gives you our fullest thanks.~ */
  IF ~~ THEN DO ~SetGlobal("Kayl1Done","GLOBAL",1)
EraseJournalEntry(34244)
EraseJournalEntry(34245)
EraseJournalEntry(34246)
ReputationInc(1)
TakePartyItem("misc6i")
GiveItemCreate("brac20",LastTalkedToBy,1,0,0)~ SOLVED_JOURNAL #47725 /* ~Seek out and investigate the Fallen Paladins.

I have killed the rogue paladin, Anarg, and dispersed the group of Fallen Paladins for Sir Ryan Trawl, the leader of the Most Noble Order of the Radiant Heart.  My good reputation has increased, along with a significant amount of Sir Ryan's goodwill.~ */ EXIT
END

IF ~Global("KaylFallenPaladinPlot","GLOBAL",1)
!Global("KaylAcceptCupMission","GLOBAL",2)
Global("ReynaldJob","GLOBAL",1)
ReputationGT([PC],9)
Global("Kayl1Done","GLOBAL",0)~ THEN BEGIN 19 // from:
  SAY #31831 /* ~You have returned earlier than I expected, what do you require?~ */
  IF ~~ THEN REPLY #31832 /* ~The Fallen Paladins have asked us for a cup of some value as a measure of our loyalty to them.~ */ GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #31836 /* ~Anarg's Cup?  I cannot possibly give you this, for he was stripped of it when he lost his paladin status.~ */
  IF ~~ THEN REPLY #31838 /* ~Then we cannot finish the mission you asked of us.~ */ GOTO 21
  IF ~~ THEN REPLY #31840 /* ~Give us the cup or we'll take it from you.~ */ GOTO 22
  IF ~~ THEN REPLY #36771 /* ~What's so important about this cup?~ */ GOTO 28
END

IF ~~ THEN BEGIN 21 // from: 30.1 30.0 22.0 20.0
  SAY #31841 /* ~Very well then, you shall have it.  Return it soon or you will not be given your reward.  It is very important that the cup remains in the hands of the Order.~ */
  IF ~~ THEN DO ~SetGlobal("KaylAcceptCupMission","GLOBAL",2)
CreateItem("misc6i",0,0,0)
GiveItem("misc6i", [PC])~ UNSOLVED_JOURNAL #34246 /* ~Seek out and investigate the Fallen Paladins.

Ryan Trawl has agreed to give me Anarg's cup, although he did so only reluctantly.  Once the mission is done, he expects the cup to be returned to the Order.~ */ EXIT
END

IF ~~ THEN BEGIN 22 // from: 20.1
  SAY #31844 /* ~Be careful who you speak to in that tone.  You are working for us, not the other way around.~ */
  IF ~~ THEN REPLY #31848 /* ~Without the cup, the Fallen Paladins will not trust us.~ */ GOTO 21
END

IF ~Dead("kaypala")
!PartyHasItem("MISC6I")
Global("Kayl1Done","GLOBAL",0)~ THEN BEGIN 23 // from:
  SAY #32056 /* ~My contacts say that Anarg is dead, but where is the cup?  As I said, the cup is very important.  Before I you receive your reward, I must have Anarg's Cup.~ */
  IF ~~ THEN EXIT
END

IF ~ReputationLT([PC],10)~ THEN BEGIN 24 // from:
  SAY #32060 /* ~I suggest you leave, <SIRMAAM>. Your reputation precedes you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 25 // from: MAZZYJ:140.0 KELDORJ:130.0 10.0
  SAY #36507 /* ~Recently one of our highest-ranking officers was implicated in smuggling slaves. His name is Anarg, and though he was once a friend, he was expelled from the Order.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #36513 /* ~We thought that the end of it, but Anarg took others when he left.  He is a charismatic man and some of the younger knights were swayed by his words.~ */
  IF ~~ THEN REPLY #36515 /* ~I don't like where this is going.  Good bye.~ */ GOTO 7
  IF ~~ THEN REPLY #36516 /* ~So he has stolen some of your members?~ */ GOTO 27
END

IF ~~ THEN BEGIN 27 // from: 26.1
  SAY #36518 /* ~We could tolerate their loss, but they masquerade as paladins, abusing our good name.  They extort, smuggle slaves, and spit on all that we honor.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 28 // from: 20.2
  SAY #36772 /* ~When a new paladin joins our Order he is given a cup.  It is a symbol of the unity between the Order and the paladins who serve the Order.~ */
  IF ~~ THEN GOTO 29
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #36773 /* ~Anarg wants to maintain a link to the Order using the cup, but I see that it is necessary for you to give it to him in order to gain his trust.~ */
  IF ~~ THEN GOTO 30
END

IF ~~ THEN BEGIN 30 // from: 29.0
  SAY #36774 /* ~Can I trust you to return it to me after your mission is completed?~ */
  IF ~~ THEN REPLY #36775 /* ~Yes, we will return it.~ */ GOTO 21
  IF ~~ THEN REPLY #61133 /* ~I shall do what I must to get the best possible result.~ */ GOTO 21
END

IF ~Global("Kayl1Done","GLOBAL",1)~ THEN BEGIN 31 // from:
  SAY #36777 /* ~Good day to you, <CHARNAME>.~ */
  IF ~GlobalGT("chapter","GLOBAL",3)~ THEN EXIT
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45838 /* ~A question: a friend has been imprisoned by the Cowled Wizards.  Do you know where they keep their prisoners?~ */ GOTO 36
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45839 /* ~What do you know of the war between the thieves' guilds here in the city?~ */ GOTO 39
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45842 /* ~Greetings.  I must be on my way.~ */ GOTO 42
END

IF ~False()~ THEN BEGIN 32 // from:
  SAY #36790 /* ~I heard of your service to the cause of goodness, but you will not be taking orders from me on this matter. Go to the Prelate, I will speak of other things later.~ */
  IF ~~ THEN EXIT
END

IF ~Global("PaladinOrder","GLOBAL",1)~ THEN BEGIN 33 // from:
  SAY #36791 /* ~Welcome to the ranks, <CHARNAME>. I am sure you will serve well. Speak with William Reirrac for your tasks and duties.~ */
  IF ~~ THEN EXIT
END

IF ~Global("PaladinOrder","GLOBAL",2)~ THEN BEGIN 34 // from:
  SAY #36792 /* ~That you would turn down such a great honor is baffling. Many work for years to be considered.~ */
  IF ~~ THEN EXIT
END

IF ~Global("PaladinOrder","GLOBAL",3)~ THEN BEGIN 35 // from:
  SAY #36793 /* ~I cannot imagine why you would throw away the honor and respect of your peers. You shall find no sanctuary here.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 36 // from: 31.1
  SAY #45870 /* ~I cannot say that I do. Even if the Order wished to find the location of their prison, the Cowled Wizards would not tell us. They fear little.~ */
  IF ~~ THEN GOTO 38
END

IF ~~ THEN BEGIN 37 // from:
  SAY #45871 /* ~~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 38 // from: 36.0
  SAY #45872 /* ~And I am afraid there is little that the Order... or even the Council... can truly do to say otherwise.  I hope that Tyr smiles on your friend and that he is safe, if he is truly guiltless.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 39 // from: 31.2
  SAY #45874 /* ~Little, but anything that curtails the influence of the Shadow Thieves is a boon. I would eject them from Athkatla the same as Waterdeep, had I the power.~ */
  IF ~~ THEN GOTO 40
END

IF ~~ THEN BEGIN 40 // from: 39.0
  SAY #45875 /* ~I am no fool, however. I know little of this other guild, and have no delusion that replacing one serpent with an unknown would be a better thing.~ */
  IF ~~ THEN GOTO 41
END

IF ~~ THEN BEGIN 41 // from: 40.0
  SAY #45876 /* ~In the matter of their war, I am content to have the Order watch and ensure that their struggle does not consume innocents in its progress.  And that is all.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 42 // from: 31.3
  SAY #45878 /* ~As you wish.  If you desire any service, <CHARNAME>, I would not hesitate to render it.~ */
  IF ~~ THEN EXIT
END
