BEGIN "WxJon"

IF ~NumTimesTalkedTo(0)~ THEN BEGIN Intro
SAY ~Well, hello.  I'm glad you're awake.  I've heard about you.  You're <CHARNAME>, and you've got some nasty people interested in you.  Very nasty.  I might be able to help watch your back, <SIRMAAM>.~ [WxJonG01]
IF ~~ THEN REPLY ~Well, that sounds like a good idea.~
DO ~SetGlobal("WxJonJoined","GLOBAL",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Er, no, I don't like the look of you.~ EXIT
IF ~~ THEN REPLY ~I'd Like to know more of you before I trust you.~ GOTO Intro2
END

IF ~~ THEN BEGIN Intro2
SAY ~What's to say?  I am half-elven, and have been wandering from my home this past while, trying to help where I can.  Rescuing damsels in distress, testing my skills against traps and locks, fighting off Orcs and Kobolds, casting the odd cantrip for farmers' crops.  Nothing like what I hear you've been up to.~
IF ~~ THEN REPLY ~Are you saying you have skill at Arms, Spells and Lockpicking?  Quite versatile - and useful.  yes, come along then.~
 DO ~SetGlobal("WxJonJoined","GLOBAL",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~How trite, another Half-elven jack-of-all-trades - and master of none!  No, I don't need a half-baked wizard, a semi-skilled fighter, or a lousy thief.  Thanks, but no thanks.~ EXIT
END

IF ~NumTimesTalkedToGT(0)~ THEN BEGIN UnJoined
SAY ~Hello again <CHARNAME>.  Have you decided you could use my help now?~
IF ~~ THEN REPLY ~No, I just came to taunt you with how successful we've been.~ EXIT
IF ~~ THEN REPLY ~Yes. I'think you'd be a worthy addition to my cause.~
 DO ~SetGlobal("WxJonJoined","GLOBAL",1)
JoinParty()~ EXIT
END

BEGIN "WxJonJ"

IF ~PartyHasItemIdentified("_SW1H06")
!HasItem("SW1H06",Myself)
Global("AskedForGoodSword","LOCALS",1)~ THEN BEGIN AskedForGoodSword
SAY ~That's quite a blade, Vascona.  It has a long history.  I could certainly use that.~
IF ~~ THEN REPLY ~It's my decision who uses what here.  You'll use it when I say you do.~ DO ~IncrementGlobal("Satisfaction","LOCALS",-5)
SetGlobal("AskedForGoodSword","LOCALS",2)~ EXIT
IF ~~ THEN REPLY ~That's good idea.  Definately, use it!~ DO ~IncrementGlobal("Satisfaction","LOCALS",5)
TakePartyItemNum("_SW1H06",1)
SetGlobal("AskedForGoodSword","LOCALS",3)~ EXIT
IF ~~ THEN REPLY ~I'll consider that.  There might be better uses for it in my strategy.~ DO ~SetGlobal("AskedForGoodSword","LOCALS",2)~ EXIT
END

IF ~PartyHasItemIdentified("_SW1H06")
!HasItem("SW1H06",Myself)
Global("AskedForGoodSword","LOCALS",3)~ THEN BEGIN GetGoodSwordBack
SAY ~<CHARNAME> did say I could use that.  Could I have it back now?~
IF ~~ THEN REPLY ~Give him it back, now that you're done with it.~ DO ~IncrementGlobal("Satisfaction","LOCALS",1)
TakePartyItemNum("_SW1H06",1)~ EXIT
IF ~~ THEN REPLY ~No, I think they should keep it, Jonathan.~ DO ~IncrementGlobal("Satisfaction","LOCALS",-2)
SetGlobal("AskedForGoodSword","LOCALS",2)~ EXIT
END

BEGIN "WxJonP"

IF ~Global("WxJonJoined","GLOBAL",1)
Global("WxJonKicked","LOCALS",0)~ THEN BEGIN KickJonOut
SAY ~So <CHARNAME>, I've done my job for now?~
IF ~~ THEN REPLY ~No, just checking that you were still here.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~Exactly.  Stick around, I might be back later.~ DO ~SetGlobal("WxJonKicked","LOCALS",1)~ EXIT
IF ~~ THEN REPLY ~Yeah, you have been singularly useless.  I hope I never see you again~ DO ~SetGlobal("WxJonKicked","LOCALS",2)
EscapeArea()~ EXIT
END

IF ~Global("WxJonKicked","LOCALS",1)~ THEN BEGIN BackForJon
SAY ~Ah well, it is good to see you again <CHARNAME>.  Is there more that I can do for you?~
IF ~~ THEN REPLY ~Yes, I need your skills again.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~No, just checking on how you are doing.~ GOTO Back2
END

IF ~~ THEN BEGIN Back2
SAY ~Well, I have been fine.  Thank you.~
END

