BEGIN ~XAVIA~

IF 
~NumberOfTimesTalkedTo(0)
Global("SpokeToXavia","GLOBAL",0)
!Dead("mulgore")
~ THEN BEGIN 0
  SAY ~Wait a moment! You... you're <CHARNAME>, are you not? Thou art making quite a stir along the Sword Coast! Ever since hearing about your exploits, I've just had this... 'sharp' desire... to finally meet you.~
  IF ~~ THEN DO ~SetGlobal("SpokeToXavia","GLOBAL",1)
~ EXTERN ~MULGORE~ 1
END

IF ~~ THEN BEGIN 1
  SAY ~Quiet, fool! I'm speaking to <HIMHER>, not you! Just drink your bloody mead and let me be the mouthpiece!~ 
  IF ~~ THEN REPLY ~And just who exactly are you, lady?~ GOTO 5
  IF ~~ THEN REPLY ~Look, I don't have time to talk with the likes of you! Now be off ye little girl! And take ye smelly orc with ye, before he creates a debt your arse can't cash!~ GOTO 2
  IF ~~ THEN REPLY ~Listen, while I would love to sit over a frothy mug of ale and recant my recent adventures to ye, alas I fear I do not have the time right now.~ GOTO 101
  IF ~~ THEN REPLY ~Let me guess, are you another assassin sent by the Iron Throne to dispatch me? It'll take more than a little girl with a dagger and her smelly half orc companion to take the likes of us out!~ EXTERN ~MULGORE~ 7
END

IF ~~ THEN BEGIN 2
  SAY ~How dare you insult me! For that comment, I shall drive this dagger deep into your black heart! Mulgore, let's get 'em!~
  IF ~~ THEN DO ~ChangeEnemyAlly(Myself,EVILCUTOFF) Enemy() Attack(NearestEnemyOf(Myself))~ EXTERN ~MULGORE~ 4
END

IF ~~ THEN BEGIN 3
  SAY ~DAMN YOU MULGORE! I... I appologize for my companions... RUDE behavior. As you can see, he's not a very sociable indivudual. That's why I do all the talking.~
  IF ~~ THEN REPLY ~Well met then, Xavia. I am <CHARNAME> of Candlekeep, and these are my traveling companions: <PLAYER2>, <PLAYER3>, <PLAYER4>, <PLAYER5> and last but not least <PLAYER6>.  So now that we have the formal introductions out of the way, tell me what is it you want from us?~ GOTO 4
  IF ~~ THEN REPLY ~Ho there stranger! Keep thy distance from me! I don't trust the looks of ye one bit! You look like a petty thief to me, and I don't like the way your orcish lackey is staring at me over there.~ GOTO 2
END

IF ~~ THEN BEGIN 4
  SAY ~Straight to business... I like that. I'll get straight to the... 'point'. Mulgore and I are on the run from a group of rogues I once proudly hailed membership to, a group called the Shadow Thieves.  Have ye ever heard of 'em, <CHARNAME>?~
  IF ~~ THEN REPLY ~Aye, I have.~ GOTO 6
  IF ~~ THEN REPLY ~No, I haven't.~ GOTO 11 
END

IF ~~ THEN BEGIN 5
  SAY ~Please, allow me to introduce myself. I am Xavia of Athkathla, and over there is my bodyguard and faithful companion, Mulgore of Luruar. Put that mug down and say hello, Mulgy.~
  IF ~~ THEN EXTERN ~MULGORE~ 2
END

IF ~~ THEN BEGIN 6
  SAY ~Good. Then you can understand why we're on the move!~
  IF ~~ THEN EXTERN ~MULGORE~ 5
END

IF ~~ THEN BEGIN 7
  SAY ~You and I both, Mulgore dear.~
  IF ~~ THEN EXTERN ~XAVIA~ 8
END

IF ~~ THEN BEGIN 8
  SAY ~That stormy night at the Coronet, we devised a plan. We would kill the chief assassin, Kane would step up to assume his position, he would give higher profile 'assignments', and with time I would eventually be chosen as Kane's lieutenant!~
  IF ~~ THEN EXTERN ~XAVIA~ 9
END

IF ~~ THEN BEGIN 9
  SAY ~But it didn't turn out that way. That little bastard Monte snitched on us! They killed Kane... gutted him like a fish they did, and then hung him by his own entrails in the guild's assassin training complex, so he can be the example for anyone who would attempt THAT stunt again.  Then... they came me.~
  IF ~~ THEN EXTERN ~MULGORE~ 3
END

IF ~~ THEN BEGIN 10
  SAY ~Aye, we were lucky, Mulgore! By Tymora's will, we were able to escape Athkathla alive! So we hastily gathered what gear we could, and quickly started traveling north.  We were resting for a few days from our travels at the Friendly Arm Inn, when they found us. Mulgore was able to dispatch them... but it was in a loud and bloody fashion. We had to quickly escape before getting arrested.~ 
  IF ~~ THEN EXTERN ~XAVIA~ 14
END

IF ~~ THEN BEGIN 11
  SAY ~Then I shall explain it to you. We Shadow Thieves are an ultra-secret guild of thieves, spies and assassins who, how shall I say politely... offers our services to the highest bidder and our underground network spans the legnth of the Sword Coast... from Luskan to Calimport.~
  IF ~~ THEN EXTERN ~XAVIA~ 12
END

IF ~~ THEN BEGIN 12
  SAY ~I worked for the guild as one of their assassins. They would use me when they wanted a quick, clean kill that left no evidence of foul play. I'm highly trained in the arts of stealth and silence, as well as a gifted poison maker.~
  IF ~~ THEN EXTERN ~XAVIA~ 13
END

IF ~~ THEN BEGIN 13
  SAY ~As enjoyable as my job was, I thought my talents were being under utilized. One night, I arranged a secret meeting at the Copper Coronet between myself, my friend Kane who was a respected assassin and a WORTHLESS lout named Monte, who was my apprentice at the time.~
  IF ~~ THEN EXTERN ~MULGORE~ 10
END

IF ~~ THEN BEGIN 14
  SAY ~We sought the big city of Baldur's Gate for sanctuary. It would take the Shadow Thieves days, if not weeks to pinpoint or where-abouts there. We tried hiring ourselves on as 'adventurers', offering our services of brute force and stealh tactics to the highest bidder, but it would seem the prejudices towards orc kind are still strong this far north, so nobody would hire us on.~
  IF ~~ THEN EXTERN ~MULGORE~ 6
END

IF ~~ THEN BEGIN 15
  SAY ~After a few days of searching the Gate for traveling compainions with no luck, we thought our next best shot for survival would be to head even further north, either Daggerford... or even to Waterdeep, where we KNOW the Shadow Thieves won't follow us to. Along the way we stopped to rest here in Ulgoth's Beard, and were just about to hit the road again, until we met... you, that is.~
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16
  SAY ~So <CHARNAME>, would an adventuring party such as yours have a need for ones such as us?~
  IF ~~ THEN REPLY ~We have important tasks ahead of us.  My party is full, and we're not interested right now.~ GOTO 17
  IF ~~ THEN REPLY ~Bah! We'll not waste our time with the likes of ye or ye smelly orcish companion! Off with ye... and if assassins and rogues be after your hide, then they would be after MINE as well!~ GOTO 2
  IF ~~ THEN REPLY ~You sound dangerous... but it may be worth our while to have you with us.  Fall in line if you wish, but be advised Xavia, everybody carries their weight in this group.~ GOTO 18
END

IF ~~ THEN BEGIN 17
  SAY ~I see. Well perhaps some other time, then?~ 
  IF ~~ THEN EXTERN ~MULGORE~ 8
END

IF ~~ THEN BEGIN 18 
  SAY ~I assure you, <CHARNAME>, our performance will not dissapoint!~ 
  IF ~~ THEN EXTERN ~MULGORE~ 9
END

IF ~~ THEN BEGIN 19
  SAY ~Do watch that toungue of yours when speaking to me! I'll not tolerate such arrogance again!~ 
  IF ~~ THEN GOTO 20
END

IF ~~ THEN BEGIN 20
  SAY ~*Ahem* Please, let us not quarrel with each other, not now. I can understand why one such as yourself would be a bit wary of strangers, but I assure you <CHARNAME>, this is something you would like to hear. I have an business proposition for you that you simply cannot refuse.~
  IF ~~ THEN REPLY ~Go on then, we're listening.~ GOTO 5
  IF ~~ THEN REPLY ~Bugger off, ye filthy trollop! Nothing you say could possibly interest me, so save yer breath for someone who gives a damn!~ GOTO 2
END

IF ~Global("SpokeToXavia","GLOBAL",1)~ THEN BEGIN 100
  SAY ~Ah, <CHARNAME> has returned! So, have ye re-thought my offer?~
  IF ~~ THEN REPLY ~Very well... ye may travel with us. But you better not bring the wrath of the Shadow Thieves down upon us!~ GOTO 18
  IF ~~ THEN REPLY ~Not right now, mayhaps some other time.~ GOTO 101
END

IF ~~ THEN BEGIN 101
  SAY ~Bah! We waste our time here! Come Mulgore, let's get out of here!~
  IF ~~ THEN EXTERN ~MULGORE~ 11
END


BEGIN ~XAVIAP~

IF ~Dead("mulgore")
Global("KickedOut","LOCALS",1)
~ THEN BEGIN 0
  SAY ~So, the infamous <CHARNAME> returns to me! Do you need my 'services' again?~
  IF ~~ THEN REPLY ~Aye, that I do.  ~ DO ~~ GOTO 6
  IF ~~ THEN REPLY ~I have no need for you in my group at this time.~ DO ~~ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 0.0
  SAY ~It shall be a pleasure killing for you again!~
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 1.1 0.1
  SAY ~Fine, have it your way.~ 
  IF ~~ THEN DO ~ActionOverride("mulgore",SetGlobal("KickedOut","LOCALS",1))
ActionOverride("mulgore",SetDialogue("MULGOREP"))
ActionOverride("mulgore",LeaveParty())
~ EXIT
END

IF ~!Dead("mulgore")
Global("KickedOut","LOCALS",1)
~ THEN BEGIN 1
  SAY ~Ho ho! Look who it is, Mulgore!  <CHARNAME>, what brings you back to us?  Do you need our services once again?~
  IF ~~ THEN REPLY ~Aye, that I do.~ DO ~~ GOTO 8
  IF ~~ THEN REPLY ~I have no need for you in my group at this time.~ DO ~~ GOTO 7
END

IF ~~ THEN BEGIN 8
  SAY ~It shall be a pleasure killing for you again!  Let's go, Mulgore dear.~
  IF ~~ THEN DO ~ActionOverride("mulgore",SetGlobal("KickedOut","LOCALS",0))
ActionOverride("mulgore",JoinParty())
SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~HappinessLT(Myself,-290)
!InParty("mulgore")
~ THEN BEGIN 2 // from:
  SAY ~I'll not stand by and risk my neck for a bunch of goody goody do-goers!  Best of luck, <CHARNAME>, you'll need it!~
  IF ~~ THEN DO ~LeaveParty()
EscapeArea()
~ EXIT
END

IF ~HappinessLT(Myself,-290)
InParty("mulgore")
~ THEN BEGIN 3
  SAY ~I'll not stand by and risk my neck for a bunch of goody goody do-goers!  Best of luck, <CHARNAME>, you'll need it!  Come Mulgore! Let's get out of here!~
  IF ~~ THEN DO ~ActionOverride("mulgore",LeaveParty())
ActionOverride("mulgore",EscapeArea())
LeaveParty()
EscapeArea()
~ EXIT
END

IF ~Global("KickedOut","LOCALS",0)!InParty("mulgore")~  THEN BEGIN 4
  SAY ~Very well, I shall go my own way, you shall go on yours.~
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END

IF ~Global("KickedOut","LOCALS",0) InParty("mulgore")~ THEN BEGIN 5
  SAY ~Very well, you go your own way, and we shall go on ours.~
  IF ~~ THEN DO ~ActionOverride("mulgore",SetDialogue("MULGOREP"))
ActionOverride("mulgore",SetGlobal("KickedOut","LOCALS",1))
ActionOverride("mulgore",LeaveParty())
SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END