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

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

IF WEIGHT #0 ~NumTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #498 /* ~All right, all right. What are you getting at?~ */
  IF ~~ THEN REPLY #509 /* ~I swear this job will land me in an asylum. And who might you be? You're certainly no regular customer of this felon.~ */ GOTO 6
  IF ~~ THEN REPLY #510 /* ~Well, <CHARNAME>, did this gnome try to sell you illegal merchandise?  Specifically 'Flashers' as he calls them?~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #499 /* ~Yes, of course. Mobile vegetable peddling versus heroism, the eternal question.~ */
  IF ~~ THEN REPLY #511 /* ~I am <CHARNAME>, an adventurer.~ */ GOTO 6
  IF ~InParty([0.0.0.0.0.FEMALE])
InParty([0.0.0.0.0.MALE])
~ THEN REPLY #512 /* ~None of your business, Trax.~ */ GOTO 2
  IF ~!InParty([0.0.0.0.0.FEMALE])
~ THEN REPLY #515 /* ~Yes, sir. He tried to sell me a flasher.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 4.1 1.1
  SAY #500 /* ~Sorry, gnome. I haven't the time to speak with you at present.~ */
  IF ~~ THEN DO ~ChangeAIScript("SHARTEL2",OVERRIDE)
ActionOverride(StrongestOfMale,Attack("Sharteel"))
Attack(StrongestOfMale)
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 4.2 1.2
  SAY #501 /* ~Hold gnome, in the name of the Amnian Revenue and Taxation Board.~ */
  IF ~~ THEN DO ~ChangeAIScript("SHARTEL2",OVERRIDE)
ActionOverride(StrongestOfMale,Attack("Sharteel"))
Attack(StrongestOfMale)
~ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 5 9 12 13 14 17 even though they appear after this state */
~Global("BeatSharteel","GLOBAL",3)
~ THEN BEGIN 4 // from:
  SAY #503 /* ~Jan Jansen, gnomish citizen of Amn, you have been charged with tax evasion and the illegal sale of illegal items in an illegal manner.~ */
  IF ~~ THEN REPLY #513 /* ~Don't I have the right to be silent?~ */ DO ~ChangeAIScript("SHARTEEL",OVERRIDE)
~ GOTO 6
  IF ~InParty([0.0.0.0.0.FEMALE])
~ THEN REPLY #514 /* ~I don't know what you're talking about. We were simply talking about the weather.~ */ GOTO 2
  IF ~!InParty([0.0.0.0.0.FEMALE])
~ THEN REPLY #516 /* ~Get lost, Trax. I'm not here to answer your petty questions.~ */ GOTO 3
END

IF WEIGHT #1 ~Global("BeatSharteel","GLOBAL",2)
~ THEN BEGIN 5 // from:
  SAY #505 /* ~Enough! You'll not sidetrack me with your cursed tales again. I'm smarter than you think!~ */
  IF ~~ THEN REPLY #517 /* ~I'm not here to answer your questions. I've done no wrong so leave me be.~ */ DO ~AddexperienceParty(300)
ChangeAIScript("SHARTEEL,OVERRIDE)
SetGlobal("BeatSharteel","GLOBAL",5)
EscapeArea()
~ GOTO 7
  IF ~~ THEN REPLY #518 /* ~Listen, now peasant, you will cooperate. I represent the law.~ */ DO ~ChangeAIScript("SHARTEEL",OVERRIDE)
~ GOTO 8
END

IF ~~ THEN BEGIN 6 // from: 4.0 1.0 0.0
  SAY #506 /* ~Shutup, you! Latrine duty beckons... that's better. We've been onto you for days, Jansen. We've caught you in the very act of selling your dangerous and illegal contraptions.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.0
  SAY #507 /* ~I'm not your friend, Jansen!~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.1
  SAY #508 /* ~Oh, that's it! Do you enjoy guarding used chamber pots?~ */
  IF ~~ THEN DO ~JoinParty()
~ EXIT
END

IF WEIGHT #2 ~False()
~ THEN BEGIN 9 // from:
  SAY #2147 /* ~Solve the riddle in the sewers.

The voice from the sewers has told me that the wards to get the magical sword must be broken in the proper order.  Also, it appears that if I make a mistake, I must start all over again from the beginning.~ */
  IF ~~ THEN EXTERN ~ANGELO~ 5
END

IF ~~ THEN BEGIN 10 // from:
  SAY #2148 /* ~Snow Troll~ */
  IF ~~ THEN JOURNAL #6538 /* ~Nalia Abducted By Isaea Roenall

I encountered Dirth, who was obviously the slaver that Barg told me he was.  The man started a fight foolishly, and I found on his body a transaction ledger that is quite incriminating.  I am not sure that this alone will be enough to sink Isaea, however.~ */ EXTERN ~ANGELO~ 6
END

IF ~~ THEN BEGIN 11 // from:
  SAY #6391 /* ~You should listen to your friend. I suspect that I might be your only hope for getting out of this with your honor restored and your head on your shoulders.~ */
  IF ~~ THEN DO ~ChangeAIScript("",OVERRIDE)
Enemy()
~ EXIT
END

IF WEIGHT #3 ~Global("BeatSharteel","GLOBAL",1)
~ THEN BEGIN 12 // from:
  SAY #13960 /* ~Don't they ever clean these dusty streets?  This is Athkatla, not some barbarian village!~ */
  IF ~~ THEN DO ~TakePartyGold(20)
ChangeAIScript("SHARTEEL",OVERRIDE)
SetGlobal("BeatSharteel","GLOBAL",3)
~ EXIT
END

IF WEIGHT #4 ~HPPercentLT(StrongestOf,50)
~ THEN BEGIN 13 // from:
  SAY #13961 /* ~I was told by a friend that Lehtinan has a pretty shady business set up at the Copper Coronet.  I wonder what he meant?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 ~false()~ THEN BEGIN 14 // from:
  SAY #13753 /* ~Within the murky depths of this machine you can see the lifeless remains of a strange creature consisting of a central orb and numerous eye-stalks. It has been dead for some time.~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~~ THEN BEGIN 15 // from:
  SAY #13754 /* ~This strange device~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from:
  SAY #13755 /* ~'Tis a sad thing that Guardian Herolde has gone missin'.  I heard tha' all they found was 'is helmet.  It doesn't seem like a priest of Helm would just wander off, does it?~ */
  IF ~~ THEN DO ~~ EXIT
END

IF WEIGHT #6 ~Global("Sharhit","GLOBAL",1)
~ THEN BEGIN 17 // from:
  SAY #10638 /* ~They are strange specimens, with an empire as mighty as the Drow.  We forged treaties, but a single thought can bring their collapse when dealing with the psionics.~ */
  IF ~~ THEN DO ~ChangeAIScript("",OVERRIDE)
Enemy()
~ EXIT
END
