// creator  : weidu.exe (version 23100)
// argument : _KAGAIN.DLG
// game		 : .
// source	 : ./override/_KAGAIN.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #1 /* Triggers after states #: 11 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #87404 /* ~Greetings, I'm Kagain, what can I do for you?~ */
  IF ~~ THEN REPLY #87405 /* ~Ummmm, What kind of shop is this anyhow?~ */ DO ~SetGlobal("KagainCaravan","GLOBAL",20)
~ GOTO 1
  IF ~~ THEN REPLY #87406 /* ~Sorry, wrong shop.~ */ DO ~SetGlobal("KagainCaravan","GLOBAL",20)
~ EXIT
END

IF ~~ THEN BEGIN 1 // from: 12.1 0.0
  SAY #87407 /* ~I run an escort business.  I hire mercenaries to escort caravans on route from Amn to Baldur's Gate.  Right now I'm lookin' for some strong sword arms, and I'm willing to pay high.  It seems that one of the caravans under my protection never arrived at Baldur's Gate, and I need ta know what happened.  You look like a strong group of warriors; interested in a job?~ */
  IF ~~ THEN REPLY #87408 /* ~Sorry, we don't have the time.~ */ GOTO 8
  IF ~~ THEN REPLY #87409 /* ~Sure, we always need more money, tell us more.~ */ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.1
  SAY #87410 /* ~That's good.  I've been having a lot of problems with bandit activity lately, but they've always only taken the cargo and let the caravan go afterward.  I've been catching flak from the family of some of the passengers of this caravan, after all it was the job of my mercenaries to make sure everyone got safely to Baldur's Gate.  Normally I wouldn't give one damn about some stupid whiner, but one of the passengers was the son of Entar Silvershield, and in this part of the world, his word is law.  So, do you want the job or not?~ */
  IF ~~ THEN REPLY #87411 /* ~Ahhhh, on second thought, not really.~ */ GOTO 8
  IF ~ReactionGT(LastTalkedToBy(Myself),NEUTRAL_UPPER)
~ THEN REPLY #87412 /* ~Sure, as soon as you tell us how much we'll be paid.~ */ GOTO 3
  IF ~ReactionLT(LastTalkedToBy(Myself),FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy(Myself),HOSTILE_UPPER)
~ THEN REPLY #87412 /* ~Sure, as soon as you tell us how much we'll be paid.~ */ GOTO 4
  IF ~ReactionLT(LastTalkedToBy(Myself),NEUTRAL_LOWER)
~ THEN REPLY #87412 /* ~Sure, as soon as you tell us how much we'll be paid.~ */ GOTO 5
  IF ~  Global("X#CaravanBanditEncounter","GLOBAL",2)
~ THEN REPLY #101253 /* ~Well, there sure is trouble on the roads. I have seen some myself.~ */ GOTO 17
END

IF ~~ THEN BEGIN 3 // from: 2.1
  SAY #87413 /* ~I'll pay each of you 30 gold per head, plus a share of any booty, if there's no one left alive to claim it.~ */
  IF ~~ THEN REPLY #80611 /* ~Sounds good to us.~ */ GOTO 7
  IF ~~ THEN REPLY #87414 /* ~Too cheap for us.~ */ GOTO 6
END

IF ~~ THEN BEGIN 4 // from: 2.2
  SAY #87415 /* ~I'll pay 15 gold per head, as well as equal opportunity to loot any of the dead bodies the bandits may have left behind.~ */
  IF ~~ THEN REPLY #37921 /* ~Sure.~ */ GOTO 7
  IF ~~ THEN REPLY #87416 /* ~Shut up and stop trying to rip us off, we're out of here.  God, I hate salesmen...~ */ GOTO 6
END

IF ~~ THEN BEGIN 5 // from: 2.3
  SAY #87417 /* ~I'll give each of you a share of whatever booty we take off the bodies of those poor caravan passengers.~ */
  IF ~~ THEN REPLY #87418 /* ~Great!~ */ GOTO 7
  IF ~~ THEN REPLY #87419 /* ~What do you take us for, stupid?~ */ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.1 4.1 3.1
  SAY #87420 /* ~Well that's fine, I can always find myself some more reasonable warriors.~ */
  IF ~~ THEN REPLY #87421 /* ~Hey! We changed our minds, we'll take your offer.~ */ GOTO 7
  IF ~~ THEN REPLY #87422 /* ~Bye, you greed-mongering shrimp.~ */ EXIT
END

IF ~~ THEN BEGIN 7 // from: 6.0 5.0 4.0 3.0
  SAY #87423 /* ~Hey, I'm glad you guys have some sense in your heads.  I have an underling who can take care of business here while I'm gone, so let's get a move on.~ */
  IF ~~ THEN DO ~SetGlobal("KagainCaravan","GLOBAL",20)
SetGlobal("X#KagainCaravan","GLOBAL",1)
SetGlobalTimer("Kagain","GLOBAL",EIGHT_DAYS)
JoinParty()
~ UNSOLVED_JOURNAL #87424 /* ~Kagain's quest

We've joined up with Kagain, a dwarf who wants to find a missing noble.  The missing noble is the son of Entar Silvershield, and so he's really desperate to find the kid.~ */ EXIT
  IF ~Global("X#SharKagainJoin","GLOBAL",0)
InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("KagainCaravan","GLOBAL",20)
SetGlobal("X#KagainCaravan","GLOBAL",1)
SetGlobal("X#SharKagainJoin","GLOBAL",1)~ EXTERN ~_SHARTJ~ 86
  IF ~  Global("X#CaravanBanditEncounter","GLOBAL",2)
~ THEN GOTO 18
END

IF ~~ THEN BEGIN 8 // from: 2.0 1.0
  SAY #87425 /* ~Well if you're not here for a job, and you don't need an escort, why don't you get the hell out of my face?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #87426 /* ~Well, look what I found; this is the body of Silvershield's son.  Guess I'm in a lot of trouble now.  With him dead, I'll be a wanted dwarf.  From what I've gathered so far, all of you are after them damnable bandits.  Well, since my reputation is now mud how 'bout I help you gain revenge on those scum bags.~ */
  IF ~~ THEN REPLY #87110 /* ~We don't want you around any more, so hit the road.~ */ SOLVED_JOURNAL #87111 /* ~Entar's son

Entar Silvershield's son was killed.~ */ GOTO 10
  IF ~~ THEN REPLY #87112 /* ~Sure, we could use your skills.~ */ DO ~JoinParty()
~ SOLVED_JOURNAL #87111 /* ~Entar's son

Entar Silvershield's son was killed.~ */ EXIT
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #87113 /* ~Stupid chumps, your loss.~ */
  IF ~~ THEN DO ~LeaveParty()
~ EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 11 // from:
  SAY #87108 /* ~I don't have friends, so I don't get why you've suddenly come into my life.  Well friends, if I had something to tell ya, I would, but I don't.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~True()
~ THEN BEGIN 12 // from:
  SAY #87427 /* ~Get outta my store!  You're not wanted here, unless of course you've changed your mind about my previous offer.~ */
  IF ~~ THEN REPLY #87428 /* ~Nope, we're just looking about the store, seeing if you have anything interesting to sell, which it seems, you don't.~ */ EXIT
  IF ~~ THEN REPLY #87429 /* ~Okay, we'll take up your offer, we need another warrior in our party anyhow.~ */ GOTO 1
END

IF ~~ THEN BEGIN 13 // from:
  SAY #87106 /* ~Heh, my reputation's probably calmed down by now, anyway. See ya around, ya lumps.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from:
  SAY #87107 /* ~You've got hardy hides, folk. If you ever need a little more dwarven muscle around, you've got it.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from:
  SAY #99803 /* ~Lass, listen here - if we both lay down, I'd be taller than ye. Bed and battlefield are two places where tall and short makes no difference. Skill does.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Kagain","GLOBAL",EIGHT_DAYS)
JoinParty()
~ UNSOLVED_JOURNAL #87424 /* ~Kagain's quest

We've joined up with Kagain, a dwarf who wants to find a missing noble.  The missing noble is the son of Entar Silvershield, and so he's really desperate to find the kid.~ */ EXIT
  IF ~  InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN GOTO 16
  IF ~  InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN EXTERN ~_SHARTJ~ 87
END

IF ~~ THEN BEGIN 16 // from: 15.1
  SAY #99805 /* ~You got spirit, for a human!~ */
  IF ~~ THEN DO ~SetGlobalTimer("Kagain","GLOBAL",EIGHT_DAYS)
JoinParty()
~ UNSOLVED_JOURNAL #87424 /* ~Kagain's quest

We've joined up with Kagain, a dwarf who wants to find a missing noble.  The missing noble is the son of Entar Silvershield, and so he's really desperate to find the kid.~ */ EXIT
END

IF ~~ THEN BEGIN 17 // from: 2.4
  SAY #101272 /* ~Never is enough hirelings around t' do the job proper. D'ya have any experience?~ */
  IF ~~ THEN REPLY #101273 /* ~We battled a bandit group that had just killed everyone in a caravan up North. Any chance this pin was from one of yours?~ */ GOTO 19
  IF ~~ THEN REPLY #101274 /* ~You don't get out from behind the counter much, do you. Hey, is this from one of your caravans? Took it off a bunch of bodies up north.~ */ GOTO 19
  IF ~~ THEN REPLY #101275 /* ~Some. We did see a slain caravan up north, and fought off the bandits, but we were too late. Is this from one of yours?~ */ GOTO 19
END

IF ~~ THEN BEGIN 18 // from: 7.2
  SAY #87423 /* ~Hey, I'm glad you guys have some sense in your heads.  I have an underling who can take care of business here while I'm gone, so let's get a move on.~ */
  IF ~~ THEN REPLY #101276 /* ~Well there sure is trouble on the roads. We battled a bandit group that had just killed everyone in a caravan up North. Any chance this pin was from one of yours?~ */ GOTO 19
  IF ~~ THEN REPLY #101274 /* ~You don't get out from behind the counter much, do you. Hey, is this from one of your caravans? Took it off a bunch of bodies up north.~ */ GOTO 19
  IF ~~ THEN REPLY #101277 /* ~Y'know, I just remembered... we saw a slain caravan up north, and fought off the bandits. Is this from one of yours?~ */ GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.2 18.1 18.0 17.2 17.1 17.0
  SAY #101278 /* ~Well, this is Silvershield's son's marker. Dead, y'say? That was one of my caravans. Guess I'm in a lot of trouble now. With him dead, I'll be a wanted dwarf. Well, since my reputation is now mud, how 'bout I help you gain revenge on those scum bags? P'rhaps you can put in a word for me with the Silvershields. Whadda ya say?~ */
  IF ~~ THEN REPLY #101279 /* ~We don't want you around, so hit the road.~ */ DO ~EraseJournalEntry(101280)
EraseJournalEntry(101281)
SetGlobal("X#KagainCaravan","GLOBAL",5)
~ JOURNAL #101282 /* ~Kagain's Quest

Entar Silvershield's son was killed. I did not trust Kagain, so we parted ways, but I might take the pin back to his family, when we get to Baldurs Gate.~ */ GOTO 21
  IF ~~ THEN REPLY #87112 /* ~Sure, we could use your skills.~ */ DO ~EraseJournalEntry(101282)
EraseJournalEntry(101281)
SetGlobal("X#KagainCaravan","GLOBAL",5)
~ JOURNAL #101280 /* ~Kagain's Quest

Entar Silvershield's son was killed. We might take the pin back to his family, when we get to Baldurs Gate.~ */ GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.1
  SAY #101283 /* ~Now 'bout that hiring thing I promised. Here, have some gold, but I expect my share of the booty from ya. I am poor now.~ */
  IF ~~ THEN DO ~GiveGoldForce(50)
SetGlobal("X#KagainCaravan","GLOBAL",5)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 21 // from: 19.0
  SAY #87113 /* ~Stupid chumps, your loss.~ */
  IF ~~ THEN DO ~SetGlobal("X#KagainCaravan","GLOBAL",5)
EscapeArea()
~ EXIT
END
