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

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

IF WEIGHT #0 ~NumTimesTalkedTo(0)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 0 // from:
  SAY #39977 /* ~Greetings to you... your grace.  I... ah... understand from Mistress Nalia that you are to be the new proprietor of the keep and the surrounding farmlands, yes?~ [KPDOMO02] */
  IF ~~ THEN REPLY #39978 /* ~Yes, that's right.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #39979 /* ~Very well then, I am the Major Domo of the castle, or at least, I served as such under Lord de'Arnise.  I am certainly willing to serve you in the same capacity.~ */
  IF ~IsValidForPartyDialog("Nalia")
~ THEN EXTERN ~NALIAJ~ 178
  IF ~!IsValidForPartyDialog("Nalia")
~ THEN EXTERN ~NALIA~ 69
END

IF ~~ THEN BEGIN 2 // from: NALIAJ:178.0 NALIA:69.0
  SAY #39982 /* ~As the Lady says, I suppose. I run day-to-day operations in the keep, handling servants and any minor problems that occur with the farmers or others on your land.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #39983 /* ~I also ensure that taxes are collected and kept in the coffers here. If you wish to change taxes from how they were under Lord de'Arnise, just tell me.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #39984 /* ~A large amount of the coin will go into rebuilding the keep's depleted force of men-at-arms, and into maintaining the keep and its staff.~ */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #39985 /* ~But I estimate you will still gather, say, five hundred gold pieces per week.  If you wish to access that, you have but to come to me.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #39986 /* ~As for the major decisions, well, I suggest you return at least every couple of weeks.  If there is anything critical, a runner will find you, if they can.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #39987 /* ~There is... nothing that requires immediate attention. The servants will be cleaning up, and I am sure funeral arrangements have yet to be made for Lord de'Arnise.~ */
  IF ~~ THEN DO ~SetGlobalTimer("KPTaxTime","GLOBAL",SEVEN_DAYS)
SetGlobalTimer("KPPlotTime","GLOBAL",SEVEN_DAYS)
SetGlobal("KeepPlot","GLOBAL",1)
~ GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #39988 /* ~Have you... any questions, then?~ */
  IF ~~ THEN REPLY #39989 /* ~Is there no money in the coffers right now?~ */ GOTO 9
  IF ~GlobalLT("KPRevolt","GLOBAL",10)
~ THEN REPLY #39990 /* ~I would like to raise extra taxes... I am in need of coin right now.~ */ GOTO 11
  IF ~~ THEN REPLY #39991 /* ~So... the keep is all mine, then?~ */ GOTO 14
  IF ~~ THEN REPLY #39992 /* ~How big is this land, anyway?~ */ GOTO 15
  IF ~~ THEN REPLY #39993 /* ~No, I don't have any questions.~ */ GOTO 17
END

IF ~~ THEN BEGIN 9 // from: 16.0 14.0 8.0
  SAY #39994 /* ~Hmm... the trolls took a lot from the keep, as far as I can tell. Unless you found some of these things while you were, ah, recovering the keep, there is nothing.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #39995 /* ~But if you wait a week or so, the crops in the farmlands will start making profit. As I said, 500 gold is the average that Lord de'Arnise gathered through taxes.~ */
  IF ~GlobalLT("KPRevolt","GLOBAL",10)
~ THEN REPLY #39996 /* ~I would like to raise extra taxes... I am in need of coin right now.~ */ GOTO 11
  IF ~~ THEN REPLY #39997 /* ~So... the keep is all mine, then?~ */ GOTO 14
  IF ~~ THEN REPLY #39998 /* ~How big is this land, anyway?~ */ GOTO 15
  IF ~~ THEN REPLY #39999 /* ~I'll be on my way, then.~ */ GOTO 17
END

IF ~~ THEN BEGIN 11 // from: 16.1 14.1 10.0 8.1
  SAY #40000 /* ~If... if you wish, I can certainly arrange for a levy to be applied.  The men can gather the funds quickly and have the coin, here... but, ah...~ */
  IF ~IsValidForPartyDialog("Nalia")~ THEN EXTERN ~NALIAJ~ 179
  IF ~!IsValidForPartyDialog("Nalia")~ THEN GOTO 13
END

IF ~~ THEN BEGIN 12 // from: NALIAJ:179.0
  SAY #40002 /* ~Er, yes... that.  The people will... do as you say, of course, my <PRO_LADYLORD>, but they cannot afford much.  Are you... sure you wish to do this?~ */
  IF ~~ THEN REPLY #40004 /* ~Yes, of course.~ */ GOTO 30
  IF ~~ THEN REPLY #40005 /* ~No, I suppose not.~ */ GOTO 31
END

IF ~~ THEN BEGIN 13 // from: 11.1
  SAY #40003 /* ~... the people have just recovered from invasion. They will do as you say, my <PRO_LADYLORD>, but they can't afford much.  Are you... sure about this?~ */
  IF ~~ THEN REPLY #40006 /* ~Yes, of course.~ */ GOTO 30
  IF ~~ THEN REPLY #40007 /* ~No, I suppose not.~ */ GOTO 31
END

IF ~~ THEN BEGIN 14 // from: 16.2 10.1 8.2
  SAY #40008 /* ~Yes, my <PRO_LADYLORD>, all yours, as Mistress Nalia stated. A few servants remain, and some new ones have been hired. You are free to explore, as you will.~ */
  IF ~~ THEN REPLY #40009 /* ~Is there no money in the coffers right now?~ */ GOTO 9
  IF ~GlobalLT("KPRevolt","GLOBAL",10)
~ THEN REPLY #40010 /* ~I would like to raise extra taxes... I am in need of coin right now.~ */ GOTO 11
  IF ~~ THEN REPLY #40011 /* ~How big is this land, anyway?~ */ GOTO 15
  IF ~~ THEN REPLY #40012 /* ~I'll be on my way, then.~ */ GOTO 17
END

IF ~~ THEN BEGIN 15 // from: 14.2 10.2 8.3
  SAY #40013 /* ~Well, I am sure you have seen the keep itself. You will also lord over a large area of surrounding land. There are no settlements, per se, but there is rich farmland.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #40014 /* ~Lord de'Arnise always got on well with his people, as did most of his forebears. It is peaceful here... usually.  You should have little problems, I would think.~ */
  IF ~~ THEN REPLY #40015 /* ~Is there no money in the coffers right now?~ */ GOTO 9
  IF ~GlobalLT("KPRevolt","GLOBAL",10)
~ THEN REPLY #40016 /* ~I would like to raise extra taxes... I am in need of coin right now.~ */ GOTO 11
  IF ~~ THEN REPLY #40017 /* ~So... the keep is all mine, then?~ */ GOTO 14
  IF ~~ THEN REPLY #40018 /* ~I'll be on my way, then.~ */ GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.3 14.3 10.3 8.4
  SAY #40019 /* ~As you say, <PRO_LADYLORD> <CHARNAME>.  I am sure you can find your bedroom if you wish to stay the night, and arrangements can be made for your friends.~ */
  IF ~OR(4)
InParty("Nalia")
Dead("Nalia")
StateCheck("Nalia",STATE_SLEEPING)
!See("Nalia")
!Dead("Delcia")
!StateCheck("Delcia",STATE_SLEEPING)
See("Delcia")
~ THEN UNSOLVED_JOURNAL #3030 /* ~Ruling the de'Arnise Keep and Lands

Nalia has asked me to caretake her family's lands so that the Roenalls do not have the opportunity to take it from her whether she likes it or not.  Her father's major domo will assist me, running the day-to-day activities of the keep and collecting the taxes for me when I visit.  The major domo estimates that after the keep's maintenance is paid and money for the new garrison is deducted, I should make about 500 gp per week... which I can collect whenever I like.  I can also raise taxes, but I must be careful of angering the people.

I will also be needed to return every now and again in order to make decisions that the major domo cannot make, himself.  The whole thing seems simple enough, really.~ */ GOTO 19
  IF ~!Dead("Nalia")
!InParty("Nalia")
!StateCheck("Nalia",STATE_SLEEPING)
See("Nalia")
~ THEN UNSOLVED_JOURNAL #3030 /* ~Ruling the de'Arnise Keep and Lands

Nalia has asked me to caretake her family's lands so that the Roenalls do not have the opportunity to take it from her whether she likes it or not.  Her father's major domo will assist me, running the day-to-day activities of the keep and collecting the taxes for me when I visit.  The major domo estimates that after the keep's maintenance is paid and money for the new garrison is deducted, I should make about 500 gp per week... which I can collect whenever I like.  I can also raise taxes, but I must be careful of angering the people.

I will also be needed to return every now and again in order to make decisions that the major domo cannot make, himself.  The whole thing seems simple enough, really.~ */ GOTO 18
  IF ~OR(4)
InParty("Nalia")
Dead("Nalia")
StateCheck("Nalia",STATE_SLEEPING)
!See("Nalia")
OR(3)
Dead("Delcia")
StateCheck("Delcia",STATE_SLEEPING)
!See("Delcia")
~ THEN UNSOLVED_JOURNAL #3030 /* ~Ruling the de'Arnise Keep and Lands

Nalia has asked me to caretake her family's lands so that the Roenalls do not have the opportunity to take it from her whether she likes it or not.  Her father's major domo will assist me, running the day-to-day activities of the keep and collecting the taxes for me when I visit.  The major domo estimates that after the keep's maintenance is paid and money for the new garrison is deducted, I should make about 500 gp per week... which I can collect whenever I like.  I can also raise taxes, but I must be careful of angering the people.

I will also be needed to return every now and again in order to make decisions that the major domo cannot make, himself.  The whole thing seems simple enough, really.~ */ GOTO 20
END

IF ~~ THEN BEGIN 18 // from: 17.1
  SAY #40020 /* ~Lady Nalia, of course, shall remain here in her old quarters.  If you wish to speak to her, I am sure you will be able to find her there.~ */
  IF ~!Dead("Delcia")
!StateCheck("Delcia",STATE_SLEEPING)
See("Delcia")
~ THEN GOTO 19
  IF ~OR(3)
Dead("Delcia")
StateCheck("Delcia",STATE_SLEEPING)
!See("Delcia")
~ THEN GOTO 20
END

IF ~~ THEN BEGIN 19 // from: 18.0 17.0
  SAY #40021 /* ~And... and Lady Delcia... ah...~ */
  IF ~~ THEN EXTERN ~DELCIA~ 27
END

IF ~~ THEN BEGIN 20 // from: NALIAJ:181.0 NALIA:80.0 18.1 17.2
  SAY #40022 /* ~If you need anything else of me, then, my <PRO_LADYLORD>, do not hesitate.  I can usually be found here in the audience chamber.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~OR(2)
!InPartySlot(LastTalkedToBy,0)
Name("Nalia",LastTalkedToBy)
~ THEN BEGIN 21 // from:
  SAY #40091 /* ~Ehh... I'm afraid I have very little to say to you.  I trust that you're enjoying your time at the keep?~ [KPDOMO07] */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~Name("Nalia",LastTalkedToBy)
~ THEN BEGIN 22 // from:
  SAY #40092 /* ~Good day, Miss Nalia.  All is going well with your... ah... adventuring?  I must say that you remind me of your father very much, as of late.~ [KPDOMO08] */
  IF ~~ THEN EXIT
END

IF WEIGHT #16 /* Triggers after states #: 43 55 61 68 73 77 78 85 89 98 103 113 117 even though they appear after this state */
~InPartySlot(LastTalkedToBy,0)
!Global("KeepPlot","GLOBAL",10)
!Global("KeepPlot","GLOBAL",15)
!Global("KeepPlot","GLOBAL",20)
~ THEN BEGIN 23 // from:
  SAY #40093 /* ~Greetings, your grace.  Is there something that I can do for you?~ [KPDOMO09] */
  IF ~~ THEN REPLY #40094 /* ~Is there nobody here to see me?~ */ GOTO 24
  IF ~~ THEN REPLY #40095 /* ~I would like to access whatever has been collected through the taxes.~ */ GOTO 26
  IF ~GlobalLT("KPRevolt","GLOBAL",10)
~ THEN REPLY #40097 /* ~I need coins, quickly... I would like to raise some taxes.~ */ GOTO 28
  IF ~GlobalLT("KPRevolt","GLOBAL",10)~ THEN REPLY #40096 /* ~How are things going around here?~ */ GOTO 33
  IF ~~ THEN REPLY #40098 /* ~No, nothing at the moment.~ */ GOTO 42
END

IF ~~ THEN BEGIN 24 // from: 25.0 23.0
  SAY #40100 /* ~No, my <PRO_LADYLORD>. I have dealt with a few issues of justice and land matters... minor things, truly, but no one is currently requesting an audience with you.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 91.0 83.0 62.0 56.0 46.0 41.0 40.0 39.0 38.0 37.0 36.0 35.0 34.0 32.0 31.0 30.0 27.0 26.0 24.0
  SAY #40101 /* ~Is there anything else that you might need from me?~ */
  IF ~~ THEN REPLY #40102 /* ~I would like to know if anyone is here to see me.~ */ GOTO 24
  IF ~~ THEN REPLY #40103 /* ~I would like to access whatever has been collected through the taxes.~ */ GOTO 26
  IF ~GlobalLT("KPRevolt","GLOBAL",10)
~ THEN REPLY #40105 /* ~I need coins, quickly... I would like to raise some taxes.~ */ GOTO 28
  IF ~GlobalLT("KPRevolt","GLOBAL",10)~ THEN REPLY #40106 /* ~Tell me how things fare.~ */ GOTO 33
  IF ~~ THEN REPLY #40107 /* ~No, nothing at the moment.~ */ GOTO 42
END

IF ~~ THEN BEGIN 26 // from: 25.1 23.1
  SAY #40108 /* ~Yes, of course. I have stored all taxes collected so far in the library cabinet on the second floor, my <PRO_LADYLORD>.  That is generally where I store it.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 27 // from:
  SAY #40109 /* ~Mm, I am afraid that there is nothing at the moment, my <PRO_LADYLORD>.  You will have to wait 'til the end of the week, unless you desire a special levy, that is.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 28 // from: 25.2 23.2
  SAY #40110 /* ~I... can certainly do this, my <PRO_LADYLORD>. You must be careful, however. Your citizenry will do as you command, but they have very little to give.~ */
  IF ~IsValidForPartyDialog("Nalia")
GlobalGT("KPRevolt","GLOBAL",2)
GlobalLT("KPRevolt","GLOBAL",5)
~ THEN EXTERN ~NALIAJ~ 183
  IF ~IsValidForPartyDialog("Nalia")
GlobalGT("KPRevolt","GLOBAL",4)
GlobalLT("KPRevolt","GLOBAL",7)~ THEN EXTERN ~NALIAJ~ 184
  IF ~IsValidForPartyDialog("Nalia")
GlobalGT("KPRevolt","GLOBAL",6)~ THEN EXTERN ~NALIAJ~ 185
  IF ~OR(2)
!IsValidForPartyDialog("Nalia")
GlobalLT("KPRevolt","GLOBAL",3)
~ THEN GOTO 29
END

IF ~~ THEN BEGIN 29 // from: NALIAJ:185.0 NALIAJ:184.0 NALIAJ:183.0 28.3
  SAY #40115 /* ~Are you sure... you wish me to do this?~ */
  IF ~~ THEN REPLY #40128 /* ~Yes, of course.~ */ GOTO 30
  IF ~~ THEN REPLY #40129 /* ~No, I suppose not.~ */ GOTO 31
END

IF ~~ THEN BEGIN 30 // from: 29.0 13.0 12.0
  SAY #40130 /* ~As you wish, then.  I will direct the men-at-arms to collect the extra levy, which will be completed right away.~ */
  IF ~~ THEN DO ~GiveGoldForce(1000)
IncrementGlobal("KPRevolt","GLOBAL",1)
~ GOTO 25
END

IF ~~ THEN BEGIN 31 // from: 29.1 13.1 12.1
  SAY #40137 /* ~I am... relieved to hear that, my <PRO_LADYLORD>. The Roenalls would bleed the land dry, and I know that is what the people most feared of them.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 32 // from:
  SAY #40138 /* ~I shall do so, my <PRO_LADYLORD>.  Word shall be sent out to your men-at-arms right away to stop the collection.~ */
  IF ~~ THEN DO ~IncrementGlobal("KPRevolt","GLOBAL",-1)
~ GOTO 25
END

IF ~~ THEN BEGIN 33 // from: 25.3 23.3
  SAY #40139 /* ~Not much has changed. I have kept the same forms that Lord de'Arnise wished, arranged minor matters of justice, but... that is merely here at the keep.~ */
  IF ~GlobalLT("KPRevolt","GLOBAL",-2)
~ THEN GOTO 34
  IF ~GlobalLT("KPRevolt","GLOBAL",0)
GlobalGT("KPRevolt","GLOBAL",-3)
~ THEN GOTO 35
  IF ~Global("KPRevolt","GLOBAL",0)
~ THEN GOTO 36
  IF ~GlobalLT("KPRevolt","GLOBAL",3)
GlobalGT("KPRevolt","GLOBAL",0)
~ THEN GOTO 37
  IF ~GlobalLT("KPRevolt","GLOBAL",5)
GlobalGT("KPRevolt","GLOBAL",2)
~ THEN GOTO 38
  IF ~GlobalLT("KPRevolt","GLOBAL",7)
GlobalGT("KPRevolt","GLOBAL",4)
~ THEN GOTO 39
  IF ~GlobalLT("KPRevolt","GLOBAL",9)
GlobalGT("KPRevolt","GLOBAL",6)
~ THEN GOTO 40
  IF ~GlobalGT("KPRevolt","GLOBAL",8)
~ THEN GOTO 41
END

IF ~~ THEN BEGIN 34 // from: 33.0
  SAY #40140 /* ~As for the farmers and such, they are overjoyed. You are as fair as Lord de'Arnise, if not more so. They are recovered from invasion, and look forward to your rule.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 35 // from: 33.1
  SAY #40141 /* ~As for the farmers and such, they are pleased with your rulership so far. They are still trying to fully recover from the trolls... but things go well, overall.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 36 // from: 33.2
  SAY #40142 /* ~As for the people of your land... they do well enough.  Much has yet to be done to recover from the troll invasion, which I am sure you will eventually see.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 37 // from: 33.3
  SAY #40143 /* ~The farmers and such, however, are a bit angered by your policies. 'Tis nothing, my <PRO_LADYLORD>.  They mourn Lord de'Arnise, but will get over their hostility soon enough.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 38 // from: 33.4
  SAY #40144 /* ~The people of your land, on the other hand, are a little restless. They expect a fair <PRO_LADYLORD>, and are not very pleased. But... I do not have to tell you such things...~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 39 // from: 33.5
  SAY #40145 /* ~As for the people on the land, there have been some protestations over taxes, and I have dealt with various disruptions. But it is not... of overt concern, my <PRO_LADYLORD>.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 40 // from: 33.6
  SAY #40146 /* ~As for the land, the people are very angry. An assassin was found hiding in the keep, and several mobs of farmers have been turned from the gates. You must be... most careful.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 41 // from: 33.7
  SAY #40147 /* ~As for the people... there is revolt in the air. It will take very little to set things aflame. They... will march on the keep if this continues, my <PRO_LADYLORD>...~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 42 // from: 25.4 23.4
  SAY #40148 /* ~As you wish, my <PRO_LADYLORD>.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",1)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 43 // from:
  SAY #40191 /* ~Greetings, your grace.  I actually have a rather angry merchant by the name of Tolmas Bendelia that has been demanding to see you.~ [KPDOMO09] */
  IF ~~ THEN GOTO 44
END

IF ~~ THEN BEGIN 44 // from: 43.0
  SAY #40192 /* ~It may have something to do with his caravan being waylaid by bandits passing through the region, but he refuses to speak to anyone but your <PRO_LADYLORD>ship.~ */
  IF ~~ THEN GOTO 45
END

IF ~~ THEN BEGIN 45 // from: 44.0
  SAY #40193 /* ~He is an influential merchant in this area; I believe he owns the deed to more than one local farmhold.  Will you grant this man an audience, my <PRO_LADYLORD>?~ */
  IF ~~ THEN REPLY #40195 /* ~Certainly.  Show him in.~ */ GOTO 47
  IF ~~ THEN REPLY #40196 /* ~No, I have no time for this... send him away.~ */ GOTO 46
END

IF ~~ THEN BEGIN 46 // from: 45.1
  SAY #40197 /* ~As you wish, my <PRO_LADYLORD>... although I have no doubt that the merchant will be very displeased.  But if you think it wise, I will have him sent away.~ */
  IF ~~ THEN DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
SetGlobalTimer("KPPlotTime","GLOBAL",SEVEN_DAYS)
SetGlobal("KeepPlot","GLOBAL",2)
~ GOTO 25
END

IF ~~ THEN BEGIN 47 // from: 45.0
  SAY #40200 /* ~Excellent, my <PRO_LADYLORD>.  I shall send for him immediately.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32b")
~ EXIT
END

IF ~~ THEN BEGIN 48 // from: KPMERC01:0.0
  SAY #40205 /* ~I suggest you calm yourself, Mister Bendelia... and perhaps start by explaining to <PRO_LADYLORD> <CHARNAME> exactly what sort of outrage you are referring to.~ */
  IF ~~ THEN EXTERN ~KPMERC01~ 1
END

IF ~~ THEN BEGIN 49 // from: KPMERC01:4.0
  SAY #40253 /* ~Hmm... as I said, he cannot be easily ignored. Many will be upset if their farms are foreclosed, and the bandits will have to be dealt with sooner or later.~ */
  IF ~~ THEN GOTO 50
END

IF ~~ THEN BEGIN 50 // from: 49.0
  SAY #40254 /* ~We do not have the strength yet to face them; our patrols simply have too few men.  Obviously the bandits have noticed. We would need mercenaries, my <PRO_LADYLORD>.~ */
  IF ~~ THEN GOTO 51
END

IF ~~ THEN BEGIN 51 // from: 50.0
  SAY #40255 /* ~I know a few reliable mercenary companies we could acquire for 500 gold. That would handle this problem. Mm... we could go as low as 250, but that would take longer.~ */
  IF ~~ THEN EXTERN ~KPMERC01~ 5
END

IF ~~ THEN BEGIN 52 // from: KPMERC01:18.0
  SAY #40310 /* ~Very well, my <PRO_LADYLORD>.  We shall do as you command.  And what do you wish done regarding the bandits?~ */
  IF ~PartyGoldGT(499)
~ THEN REPLY #40311 /* ~Spend the five hundred to hire the mercenaries.  Deal with them quickly.~ */ DO ~AddExperienceParty(15500)
ActionOverride("TOLMAS",TakePartyGold(500))
IncrementGlobal("KPRevolt","GLOBAL",-1)
~ GOTO 53
  IF ~PartyGoldGT(249)
~ THEN REPLY #40312 /* ~Spend two hundred-fifty.  It may take some time, but that should be enough.~ */ DO ~AddExperienceParty(11500)
ActionOverride("TOLMAS",TakePartyGold(250))
~ GOTO 53
  IF ~~ THEN REPLY #40313 /* ~Nothing, yet.  Once we build our forces enough, we can deal with them, then.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
~ GOTO 53
END

IF ~~ THEN BEGIN 53 // from: 52.2 52.1 52.0
  SAY #40314 /* ~As you wish, and I shall send out invitations to some of the area's merchant guilds... perhaps we can find another who will sell supplies to the people soon.~ */
  IF ~~ THEN GOTO 54
END

IF ~~ THEN BEGIN 54 // from: 53.0
  SAY #40315 /* ~Take him away, guards, as the <PRO_LADYLORD> commands.~ */
  IF ~~ THEN EXTERN ~KPMERC01~ 19
END

IF WEIGHT #4 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",2)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 55 // from:
  SAY #40317 /* ~Greetings, your grace.  There is a matter that Captain Cernick wishes to take up with you, which is of a delicate nature.  Do you wish to see him?~ [KPDOMO09] */
  IF ~~ THEN REPLY #40318 /* ~Yes, show him in.~ */ GOTO 57
  IF ~~ THEN REPLY #40319 /* ~No, I don't have time to see him.~ */ GOTO 56
END

IF ~~ THEN BEGIN 56 // from: 55.1
  SAY #40320 /* ~If that is your wish, my <PRO_LADYLORD>, then I shall tell Captain Cernick to deal with the situation as he sees fit.~ */
  IF ~~ THEN DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
SetGlobalTimer("KPPlotTime","GLOBAL",FOUR_DAYS)
SetGlobal("KeepPlot","GLOBAL",3)
~ GOTO 25
END

IF ~~ THEN BEGIN 57 // from: 55.0
  SAY #40321 /* ~As you say, my <PRO_LADYLORD>.  I will send for him immediately.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32c")
~ EXIT
END

IF ~~ THEN BEGIN 58 // from: KPCAPT02:10.0
  SAY #40326 /* ~He is your subject, my <PRO_LADYLORD>, so yours is the right to decide punishment, but you are also... being watched carefully by those who oppose your rule, however.~ */
  IF ~~ THEN REPLY #40327 /* ~I think the matter of justice is clear.  I cannot allow thefts in the keep.  Execute him immediately.~ */ GOTO 59
  IF ~~ THEN REPLY #40328 /* ~I cannot permit a servant of the keep to steal.  Expel him from the guards... send him back to his farm.~ */ GOTO 60
  IF ~~ THEN REPLY #40330 /* ~What is your opinion, Cernick?  Has this ever happened before?~ */ EXTERN ~KPCAPT02~ 15
  IF ~~ THEN REPLY #40329 /* ~I would like to hear Lastin's side of the story, first.~ */ EXTERN ~KPGRD01~ 2
END

IF ~~ THEN BEGIN 59 // from: KPGRD01:10.0 KPGRD01:9.0 KPGRD01:5.0 58.0 KPCAPT02:15.0
  SAY #40331 /* ~As you wish, my <PRO_LADYLORD>.  Justice will be done.  You heard <PRO_HIMHER>, Captain?~ */
  IF ~~ THEN DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
~ EXTERN ~KPCAPT02~ 11
END

IF ~~ THEN BEGIN 60 // from: KPGRD01:10.1 KPGRD01:9.1 KPGRD01:5.1 58.1 KPCAPT02:15.1
  SAY #40335 /* ~As you wish, my <PRO_LADYLORD>.  He shall be removed from the ranks of the keep's guard immediately.  You heard, Captain?~ */
  IF ~~ THEN EXTERN ~KPCAPT02~ 13
END

IF WEIGHT #5 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",3)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 61 // from:
  SAY #40376 /* ~Greetings, your grace..  There is a... man... who has been waiting for some time for an audience with you.  Shall I admit him or send him away?~ [KPDOMO09] */
  IF ~~ THEN REPLY #40377 /* ~I will see him.~ */ GOTO 64
  IF ~~ THEN REPLY #40378 /* ~What does he want?~ */ GOTO 63
  IF ~~ THEN REPLY #40379 /* ~Send him away, I don't have time to see anyone.~ */ GOTO 62
END

IF ~~ THEN BEGIN 62 // from: 63.1 61.2
  SAY #40380 /* ~I shall do so immediately, my <PRO_LADYLORD>.  I apologize for the disturbance.~ */
  IF ~~ THEN DO ~SetGlobalTimer("KPPlotTime","GLOBAL",SEVEN_DAYS)
SetGlobal("KeepPlot","GLOBAL",4)
~ GOTO 25
END

IF ~~ THEN BEGIN 63 // from: 61.1
  SAY #40381 /* ~I am... unsure, my <PRO_LADYLORD>.  He claims to be a cleric of Tempus, but comes across as rather the burly and uncouth sort.  He says he will only speak to you...~ */
  IF ~~ THEN REPLY #40382 /* ~Show him in, then.~ */ GOTO 64
  IF ~~ THEN REPLY #40383 /* ~Send him away, then.~ */ GOTO 62
END

IF ~~ THEN BEGIN 64 // from: 63.0 61.0
  SAY #40384 /* ~As you wish, my <PRO_LADYLORD>.  I shall have him brought in immediately.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32d")
~ EXIT
END

IF ~~ THEN BEGIN 65 // from: KPCHAP01:4.2 KELDORJ:97.1
  SAY #40392 /* ~This... cleric. Now that I know his name, I recall a word or two about him. I understand he was ejected from his last parish in a village to the south, in Tethyr...~ */
  IF ~~ THEN EXTERN ~KPCHAP01~ 5
END

IF ~~ THEN BEGIN 66 // from: KPCHAP01:6.0
  SAY #40395 /* ~Well... if you accept him, the family chapel in the lower level is unacceptable, but... the small chapel on the floor above us would serve. It is up to you.~ */
  IF ~~ THEN REPLY #40396 /* ~Very well.  Put him up in the chapel and let us see how it goes.~ */ DO ~AddExperienceParty(15500)
IncrementGlobal("KPRevolt","GLOBAL",-1)
~ EXTERN ~KPCHAP01~ 7
  IF ~~ THEN REPLY #40397 /* ~I'm not about to take a stranger into the keep... especially a questionable one.~ */ DO ~AddExperienceParty(11500)~ EXTERN ~KPCHAP01~ 9
  IF ~~ THEN REPLY #40398 /* ~Begone, cleric.  You must think me a fool to offer you safe harbor, here.~ */ EXTERN ~KPCHAP01~ 10
END

IF ~~ THEN BEGIN 67 // from: KPCHAP01:7.0
  SAY #40400 /* ~I... will show you, then, to...~ */
  IF ~~ THEN EXTERN ~KPCHAP01~ 8
END

IF WEIGHT #6 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",4)
InPartySlot(LastTalkedToBy,0)
GlobalTimerNotExpired("KeepImportant","GLOBAL")
~ THEN BEGIN 68 // from:
  SAY #40422 /* ~It is good you have come, <PRO_LADYLORD>!  Lord Farthington Roenall himself has arrived to speak with you. He has been... agitated... by the wait, and does not seem pleased.~ */
  IF ~~ THEN GOTO 69
END

IF ~~ THEN BEGIN 69 // from: 68.0
  SAY #40423 /* ~I do not know what he wants... he demanded to see you and no one else.  I... I hope there will be no violence!  Shall I... show him in, my <PRO_LADYLORD>?~ */
  IF ~~ THEN REPLY #40424 /* ~Of course, let's see what he has to say.~ */ GOTO 71
  IF ~~ THEN REPLY #40425 /* ~I've no need to see him.  Send him away.~ */ GOTO 70
END

IF ~~ THEN BEGIN 70 // from: 69.1
  SAY #40426 /* ~Wh-what?  Are... are you sure, my <PRO_LADYLORD>?  Lord Roenall will be... most offended!~ */
  IF ~~ THEN REPLY #40427 /* ~Awww... that's too bad, isn't it?~ */ GOTO 72
  IF ~~ THEN REPLY #40428 /* ~I don't care.  Do it anyway.~ */ GOTO 72
  IF ~~ THEN REPLY #40429 /* ~(sigh)  Very well... show him in.~ */ GOTO 71
END

IF ~~ THEN BEGIN 71 // from: 70.2 69.0
  SAY #40430 /* ~I shall get him and his small entourage right away...~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32e")
~ EXIT
END

IF ~~ THEN BEGIN 72 // from: 70.1 70.0
  SAY #40431 /* ~I... I see.  I shall send word to him right away, then.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32e2")
~ EXIT
END

IF WEIGHT #7 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",4)
InPartySlot(LastTalkedToBy,0)
GlobalTimerExpired("KeepImportant","GLOBAL")
~ THEN BEGIN 73 // from:
  SAY #40432 /* ~Your grace! You return!  I... I am sorry, but you are too late to speak to Lord Roenall. He was furious at having to wait, he left in quite the huff.~ [KPDOMO10] */
  IF ~~ THEN GOTO 74
END

IF ~~ THEN BEGIN 74 // from: 73.0
  SAY #40433 /* ~But he did... leave word with me. He does not recognize your claim to the keep... or Mistress Nalia's ability to give it. He said he would return... with an army.~ */
  IF ~~ THEN GOTO 75
END

IF ~~ THEN BEGIN 75 // from: 77.0 74.0
  SAY #40434 /* ~Captain Cernick said he would do all he could to build your forces, but there is little else that can be done. Lord Roenall may be bluffing, but I am... not sure.~ */
  IF ~~ THEN GOTO 76
END

IF ~~ THEN BEGIN 76 // from: 75.0
  SAY #40435 /* ~At any rate, Captain Cernick has sent scouts to the borders of your land. We will know immediately if Lord Roenall moves... I will send word if it comes to that.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 ~Global("KeepPlot","GLOBAL",16)
~ THEN BEGIN 77 // from:
  SAY #40439 /* ~Your grace! You return! I... I had thought it would come to this.  I have already taken the liberty of speaking to Captain Cernick, my <PRO_LADYLORD>...~ [KPDOMO10] */
  IF ~~ THEN DO ~SetGlobal("KeepPlot","GLOBAL",5)
~ GOTO 75
END

IF WEIGHT #9 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",5)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 78 // from:
  SAY #40455 /* ~Greetings, your grace.  We have a small problem here at the keep, one that I doubt that you would be aware of at all.~ [KPDOMO09] */
  IF ~~ THEN GOTO 79
END

IF ~~ THEN BEGIN 79 // from: 78.0
  SAY #40456 /* ~I am unsure if you have met Chanelle... she has been a maid here most of her life. She was an orphan, and the de'Arnise family took her in as a servant when she was young.~ */
  IF ~~ THEN GOTO 80
END

IF ~~ THEN BEGIN 80 // from: 79.0
  SAY #40457 /* ~As <PRO_LADYLORD> of the keep, you are technically her guardian. Ordinarily that would not be a problem, but there are two men who desire her hand in marriage.~ */
  IF ~~ THEN GOTO 81
END

IF ~~ THEN BEGIN 81 // from: 80.0
  SAY #40459 /* ~It is... up to you, my <PRO_LADYLORD>, to give her away and decide which of the men has your blessing for the marriage.~ */
  IF ~~ THEN GOTO 82
END

IF ~~ THEN BEGIN 82 // from: 81.0
  SAY #40461 /* ~Shall I bring them in to see you, my <PRO_LADYLORD>?  If you refuse, then... no one shall be permitted to marry Chanelle.  And I am sure that is not what she wants.~ */
  IF ~~ THEN REPLY #40462 /* ~Certainly.  Bring them all in.~ */ GOTO 84
  IF ~~ THEN REPLY #40463 /* ~Well, that's too bad, then.  I've got no time to see them.~ */ GOTO 83
END

IF ~~ THEN BEGIN 83 // from: 82.1
  SAY #40464 /* ~As... as you wish, my <PRO_LADYLORD>.  I shall send Chanelle the unfortunate news.~ */
  IF ~~ THEN DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
SetGlobalTimer("KPPlotTime","GLOBAL",FOUR_DAYS)
SetGlobal("KeepPlot","GLOBAL",6)
~ GOTO 25
END

IF ~~ THEN BEGIN 84 // from: 82.0
  SAY #40465 /* ~I shall send for them immediately, my <PRO_LADYLORD>.  It should just be a moment.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32g")
~ EXIT
END

IF WEIGHT #10 ~Global("KeepPlot","GLOBAL",20)
~ THEN BEGIN 85 // from:
  SAY #40466 /* ~(sigh)  This, of course, is Chanelle... one of the maids in the keep, your grace.~ */
  IF ~~ THEN DO ~SetGlobal("KeepPlot","GLOBAL",6)
~ EXTERN ~KPMAID01~ 6
END

IF ~~ THEN BEGIN 86 // from: KPMAID01:6.0
  SAY #40468 /* ~Perhaps you could explain to the <PRO_LADYLORD> exactly in your own words what the problem is.~ */
  IF ~~ THEN EXTERN ~KPMAID01~ 7
END

IF ~~ THEN BEGIN 87 // from: KPMAID01:9.0
  SAY #40477 /* ~Hmm.  That was his promise, I believe... and by tradition it is the correct one.  It is up to you, my <PRO_LADYLORD>, whether or not you wish to give a dowry.~ */
  IF ~~ THEN EXTERN ~KPRANG02~ 3
END

IF ~~ THEN BEGIN 88 // from: KPRANG01:3.0
  SAY #40483 /* ~Enough!  <PRO_LADYLORD> <CHARNAME> will decide the issue.~ */
  IF ~~ THEN REPLY #40484 /* ~Malvolio would obviously provide a better future for her... better than she has here, at least.  He is the better choice.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
~ EXTERN ~KPRANG02~ 4
  IF ~~ THEN REPLY #40485 /* ~I'll not stand in the way of Chanelle's heart.  She may marry Jessup, if that is her wish.~ */ DO ~AddExperienceParty(15500)~ EXTERN ~KPMAID01~ 13
  IF ~~ THEN REPLY #40486 /* ~I rather think both of them to be entirely unsuitable.  You may marry neither of them, Chanelle.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
~ EXTERN ~KPMAID01~ 17
END

IF WEIGHT #11 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",6)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 89 // from:
  SAY #40514 /* ~Greetings, your grace. There is... there is a couple of people who arrived recently, asking for an audience with you.  A man and a woman, well-dressed.~ [KPDOMO09] */
  IF ~~ THEN GOTO 90
END

IF ~~ THEN BEGIN 90 // from: 89.0
  SAY #40515 /* ~They have not stated their business, however, preferring to speak to you.  Shall I... grant them an audience, my <PRO_LADYLORD>?  Or shall I just send them away?~ */
  IF ~~ THEN REPLY #40516 /* ~Bring them in.  Let's see what they want, at least.~ */ GOTO 92
  IF ~~ THEN REPLY #40517 /* ~Just send them away.  I have no time for strangers.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
~ GOTO 91
END

IF ~~ THEN BEGIN 91 // from: 90.1
  SAY #40521 /* ~Most excellent, my <PRO_LADYLORD>.  I shall do so immediately.~ */
  IF ~~ THEN DO ~SetGlobalTimer("KPPlotTime","GLOBAL",FOUR_DAYS)
SetGlobal("KeepPlot","GLOBAL",7)
~ GOTO 25
END

IF ~~ THEN BEGIN 92 // from: 90.0
  SAY #40523 /* ~Hm.  Very well, my <PRO_LADYLORD>.  I shall have them brought in.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32h")
~ EXIT
END

IF ~~ THEN BEGIN 93 // from: KPLEND01:2.0
  SAY #40531 /* ~Preposterous!  There is no such debt!  I would know of it!~ */
  IF ~~ THEN EXTERN ~KPLEND01~ 3
END

IF ~~ THEN BEGIN 94 // from: KPLEND02:2.0
  SAY #40534 /* ~What?!  Let me see that!~ */
  IF ~~ THEN GOTO 95
END

IF ~~ THEN BEGIN 95 // from: 94.0
  SAY #40535 /* ~... Hmmmn...~ */
  IF ~~ THEN GOTO 97
END

IF ~~ THEN BEGIN 96 // from: 97.0
  SAY #40536 /* ~Lord de'Arnise's seal was lost during the troll invasion, along with other things. These people could have gotten hold of it, and used it to forge these documents...~ */
  IF ~~ THEN EXTERN ~KPLEND02~ 3
END

IF ~~ THEN BEGIN 97 // from: 95.0
  SAY #40537 /* ~It is Lord de'Arnise's signature all right, my <PRO_LADYLORD>.  The wax has been pressed with his seal. But there is no way to determine precisely when this was done.~ */
  IF ~~ THEN GOTO 96
END

IF WEIGHT #12 ~Global("KeepPlot","GLOBAL",10)
~ THEN BEGIN 98 // from:
  SAY #40565 /* ~Well... now that those two are dealt with there is the matter of their threat. If there are locals who owe them money, they will be angry if they are forced to pay immediately.~ */
  IF ~~ THEN DO ~SetGlobal("KeepPlot","GLOBAL",7)
~ GOTO 99
END

IF ~~ THEN BEGIN 99 // from: 98.0
  SAY #40566 /* ~Is there anything you might wish to do about that, my <PRO_LADYLORD>?~ */
  IF ~~ THEN REPLY #40567 /* ~If people borrowed from those crooks, then they are responsible.  Let them find their own way out.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",1)
~ GOTO 100
  IF ~PartyGoldGT(499)
~ THEN REPLY #40568 /* ~Give them 500 gold... I'm willing to help out and pay half, but they will have to come up with the rest themselves.~ */ DO ~AddExperienceParty(11500)
TakePartyGold(500)
~ GOTO 101
  IF ~PartyGoldGT(999)
~ THEN REPLY #40569 /* ~I will pay the full 1,000. I won't have people being hurt because some crooks tried to take advantage of me.~ */ DO ~AddExperienceParty(15500)
TakePartyGold(1000)
IncrementGlobal("KPRevolt","GLOBAL",-1)
~ GOTO 102
END

IF ~~ THEN BEGIN 100 // from: 99.0
  SAY #40570 /* ~Yes.  I suppose you are correct, my <PRO_LADYLORD>.  At least those criminals will not gain from their deed.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 101 // from: 99.1
  SAY #40571 /* ~I do not know if they have 500 gold amongst them, but you are certainly being more than fair.  I will make the arrangements immediately, my <PRO_LADYLORD>.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 102 // from: 99.2
  SAY #40572 /* ~You are more than generous... Very sensible of you, my <PRO_LADYLORD>, not to invite further blackmail.  I will make the arrangements immediately.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #13 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",7)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 103 // from:
  SAY #40578 /* ~Your grace! You have arrived! It is terrible, is it not? Did you see the destruction of the flood from the road? There are many put out from their farms...~ */
  IF ~~ THEN GOTO 104
END

IF ~~ THEN BEGIN 104 // from: 103.0
  SAY #40579 /* ~'Twas the old dikes, my <PRO_LADYLORD>. Lord de'Arnise was planning on building new ones to replace them, but it was always a project for the next year, it seems.~ */
  IF ~~ THEN GOTO 105
END

IF ~~ THEN BEGIN 105 // from: 104.0
  SAY #40580 /* ~And now it has caught up to us. There are many locals who have demanded to speak with you... so many are upset! I have limited their number to but a few...~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32j")
~ EXIT
END

IF ~~ THEN BEGIN 106 // from: KPFARM03:1.0
  SAY #40588 /* ~Calm down, everyone!  <PRO_LADYLORD> <CHARNAME> shall do as <PRO_HESHE> feels is best, and there is no altering that!  Please... just remain calm...~ */
  IF ~~ THEN GOTO 107
END

IF ~~ THEN BEGIN 107 // from: 106.0
  SAY #40589 /* ~Now, my <PRO_LADYLORD>, I've determined the cost for damages and rebuilding the dike. You will need to choose what, if anything, will be done right now.~ */
  IF ~~ THEN GOTO 108
END

IF ~~ THEN BEGIN 108 // from: 107.0
  SAY #40590 /* ~The damage to the land is costly. It is too bad we do not have access to Lord de'Arnise's coffers, because the cost to rebuild is over... er... 5,000 gold...~ */
  IF ~PartyGoldGT(4999)
~ THEN REPLY #40591 /* ~If that is what it takes to rebuild, I will pay the full amount.  5,000 gold it is.~ */ DO ~AddExperienceParty(15500)
ActionOverride("kpfarm01",TakePartyGold(5000))
~ EXTERN ~KPFARM01~ 2
  IF ~PartyGoldGT(999)
~ THEN REPLY #40592 /* ~I can only pay for a portion of the rebuilding cost, not the full amount.~ */ DO ~AddExperienceParty(4500)~ GOTO 112
  IF ~~ THEN REPLY #40593 /* ~The people will have to be responsible for the rebuilding of their own farmholds.  I feel for them, but I can do nothing.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",5)
~ EXTERN ~KPFARM01~ 6
END

IF ~~ THEN BEGIN 109 // from: KPFARM04:1.0
  SAY #40597 /* ~The dikes are... almost as costly, hence the reason Lord de'Arnise kept putting them off.  2,000 gold to rebuild them, my <PRO_LADYLORD>... a harsh expense, I know...~ */
  IF ~PartyGoldGT(1999)
~ THEN REPLY #40598 /* ~If it will prevent future problems, then it should be done.  Spend the 2,000 gp and rebuild the dikes.~ */ DO ~ActionOverride("kpfarm01",TakePartyGold(2000))
IncrementGlobal("KPRevolt","GLOBAL",-1)
~ GOTO 110
  IF ~~ THEN REPLY #40599 /* ~It cannot be done at the moment, but it will soon.  For now, we must concentrate on rebuilding the farmholds.~ */ GOTO 111
END

IF ~~ THEN BEGIN 110 // from: 109.0
  SAY #40601 /* ~Very good, my <PRO_LADYLORD>... I will see that reconstruction begins immediately on the new dikes.~ */
  IF ~GlobalLT("KPRevolt","GLOBAL",0)~ THEN EXTERN ~KPFARM02~ 3
  IF ~GlobalGT("KPRevolt","GLOBAL",0)
GlobalLT("KPRevolt","GLOBAL",5)~ THEN EXTERN ~KPFARM03~ 2
  IF ~GlobalGT("KPRevolt","GLOBAL",4)
GlobalLT("KPRevolt","GLOBAL",10)~ THEN EXTERN ~KPFARM01~ 4
  IF ~GlobalGT("KPRevolt","GLOBAL",9)~ THEN EXTERN ~KPFARM01~ 5
END

IF ~~ THEN BEGIN 111 // from: 109.1
  SAY #40602 /* ~As... you wish, my <PRO_LADYLORD>. It can wait another year if necessary, but I do not think it good to wait longer than that. Lord de'Arnise already put it off too long.~ */
  IF ~GlobalLT("KPRevolt","GLOBAL",0)~ THEN EXTERN ~KPFARM02~ 3
  IF ~GlobalGT("KPRevolt","GLOBAL",0)
GlobalLT("KPRevolt","GLOBAL",5)~ THEN EXTERN ~KPFARM03~ 2
  IF ~GlobalGT("KPRevolt","GLOBAL",4)
GlobalLT("KPRevolt","GLOBAL",10)~ THEN EXTERN ~KPFARM01~ 4
  IF ~GlobalGT("KPRevolt","GLOBAL",9)~ THEN EXTERN ~KPFARM01~ 5
END

IF ~~ THEN BEGIN 112 // from: 108.1
  SAY #40618 /* ~And how much of the five thousand do you wish to give to them, my <PRO_LADYLORD>?~ */
  IF ~PartyGoldGT(4999)~ THEN REPLY #40619 /* ~Actually, give them the full five thousand gold pieces.  I've changed my mind.~ */ DO ~AddExperienceParty(8500)
ActionOverride("kpfarm01",TakePartyGold(5000))~ EXTERN ~KPFARM01~ 2
  IF ~PartyGoldGT(3999)~ THEN REPLY #40620 /* ~Give them 4,000 gp.  It is all I can afford.~ */ DO ~AddExperienceParty(6500)
ActionOverride("kpfarm01",TakePartyGold(4000))
IncrementGlobal("KPRevolt","GLOBAL",1)~ EXTERN ~KPFARM03~ 6
  IF ~PartyGoldGT(2999)~ THEN REPLY #40621 /* ~Give them 3,000 gp.  It is all I can afford.~ */ DO ~AddExperienceParty(4500)
ActionOverride("kpfarm01",TakePartyGold(3000))
IncrementGlobal("KPRevolt","GLOBAL",2)~ EXTERN ~KPFARM03~ 6
  IF ~PartyGoldGT(1999)~ THEN REPLY #40622 /* ~Give them 2,000 gp.  They will have to come up with the rest, themselves.~ */ DO ~AddExperienceParty(2500)
ActionOverride("kpfarm01",TakePartyGold(2000))
IncrementGlobal("KPRevolt","GLOBAL",3)~ EXTERN ~KPFARM01~ 8
  IF ~PartyGoldGT(999)~ THEN REPLY #40623 /* ~Give them 1,000 gp.  They will have to come up with the rest, themselves.~ */ DO ~ActionOverride("kpfarm01",TakePartyGold(1000))
IncrementGlobal("KPRevolt","GLOBAL",4)~ EXTERN ~KPFARM01~ 8
  IF ~~ THEN REPLY #40625 /* ~Actually, I don't think I can give them anything.  They will have to make do on their own.~ */ DO ~IncrementGlobal("KPRevolt","GLOBAL",5)~ EXTERN ~KPFARM01~ 6
END

IF WEIGHT #14 ~GlobalTimerExpired("KPPlotTime","GLOBAL")
Global("KeepPlot","GLOBAL",8)
InPartySlot(LastTalkedToBy,0)
~ THEN BEGIN 113 // from:
  SAY #40646 /* ~Your grace! You return!  Thank goodness that you have arrived here when you did!  The forces of Lord Roenall are almost upon us!~ [KPDOMO10] */
  IF ~~ THEN GOTO 114
END

IF ~~ THEN BEGIN 114 // from: 113.0
  SAY #40647 /* ~I... I did not truly believe that Lord Roenall would actually attack. Captain Cernick spotted their forces and has moved to engage... or at least to slow them...~ */
  IF ~~ THEN GOTO 115
END

IF ~~ THEN BEGIN 115 // from: 114.0
  SAY #40648 /* ~Our forces are fewer, and they are all newly recruited... we cannot hope to win! Oh, they will be on us in no time... Lord Roenall will take this keep by force!~ */
  IF ~IsValidForPartyDialog("Nalia")~ THEN EXTERN ~NALIAJ~ 198
  IF ~!IsValidForPartyDialog("Nalia")~ THEN GOTO 116
END

IF ~~ THEN BEGIN 116 // from: NALIAJ:198.0 115.1
  SAY #40652 /* ~I've only received word from the front line about two hours ago... Captain Cernick says that the battle --~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("Cut32k")
~ EXIT
END

IF WEIGHT #15 ~Global("KeepPlot","GLOBAL",13)
Dead("kproen01")
~ THEN BEGIN 117 // from:
  SAY #40678 /* ~The forces of Lord Roenall have been routed, thanks to your efforts, your grace.  Once again, the keep and surrounding lands have been saved by your hand.~ [KPDOMO11] */
  IF ~~ THEN GOTO 118
END

IF ~~ THEN BEGIN 118 // from: 117.0
  SAY #40679 /* ~We all wish to express our gratitude... and let you know that we would desire nothing more than for you to remain our ruling <PRO_LADYLORD> for as long as you desire to.~ */
  IF ~!Dead("Nalia")
!InParty("Nalia")~ THEN GOTO 120
  IF ~!Dead("Nalia")
InParty("Nalia")~ THEN EXTERN ~NALIAJ~ 199
  IF ~Dead("Nalia")~ THEN GOTO 119
END

IF ~~ THEN BEGIN 119 // from: NALIAJ:199.0 120.0 118.2
  SAY #40680 /* ~We hail you, <PRO_LADYLORD> <CHARNAME>... we hail you and bow before your presence.  We accept you as our sovereign now and forever more...~ */
  IF ~~ THEN DO ~EraseJournalEntry(3030)
EraseJournalEntry(3031)
EraseJournalEntry(3032)
EraseJournalEntry(3033)
AddExperienceParty(50000)
SetGlobal("KeepPlot","GLOBAL",14)
~ SOLVED_JOURNAL #3036 /* ~Ruling the de'Arnise Keep and Lands

The Roenalls have finally been defeated.  And with Lord Farthington dead, I doubt they will be returning anytime soon.  My claim as the legitimate ruler of the castle has been strengthened... and hopefully things will be peaceful in the de'Arnise keep from now on.~ */ EXIT
END

IF ~~ THEN BEGIN 120 // from: 118.0
  SAY #40681 /* ~Mistress Nalia informed us that all she wishes is to remain in this keep... but that without your aid, she would have nothing to rule, at any rate.~ */
  IF ~~ THEN GOTO 119
END
