// creator  : weidu.exe (version 23600)
// argument : PHEIRKAS.DLG
// game     : .
// source   : ./DATA/DIALOG.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #0 ~  NumberOfTimesTalkedTo(0)
!InParty([0.0.0.THIEF])
~ THEN BEGIN 0 // from:
  SAY #15107 /* ~Hmm, I prefer not to work with amateurs.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~  NumberOfTimesTalkedTo(0)
InParty([0.0.0.THIEF])
~ THEN BEGIN 1 // from:
  SAY #15108 /* ~There's a fat man by the name of Algernon staying at Feldepost's Inn in Beregost. He keeps a cloak with him in his room and I need you to get your larcenous hands on it and bring it back to me. I assure you that your reward will be handsome. Try not to kill him, just filch it off his person.~ */
  IF ~~ THEN JOURNAL #15742 /* ~Pheirkas, a dwarven fighter in Baldur's Gate, has asked me to undertake what I can only call a covert mission. Staying at Feldepost's Inn in Beregost is the apparently obese Algernon. Kept on his person is a cloak that Pheirkas is interested in, shall we say, acquiring... The risk is great but the reward, I'm sure, is handsome. Pheirkas can be found in the northwest section of the city.~ */ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 3 4 5 even though they appear after this state */
~  Global("HelpPheirkas","GLOBAL",0)
~ THEN BEGIN 2 // from:
  SAY #15109 /* ~Do you have Algernon's cloak with you?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~  ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
PartyHasItem("CLCK08")
~ THEN BEGIN 3 // from:
  SAY #15110 /* ~Ah, thank you so much. Here is 150 gold pieces for your efforts.~ */
  IF ~~ THEN DO ~SetGlobal("HelpPheirkas","GLOBAL",1)
TakePartyItem("CLCK08")
GivePartyGold(150)
~ EXIT
END

IF WEIGHT #3 ~  ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
PartyHasItem("CLCK08")
~ THEN BEGIN 4 // from:
  SAY #15111 /* ~Oh, I do like your handiwork. Here is 200 gold pieces for the trouble.~ */
  IF ~~ THEN DO ~SetGlobal("HelpPheirkas","GLOBAL",1)
TakePartyItem("CLCK08")
GivePartyGold(200)
~ EXIT
END

IF WEIGHT #4 ~  False()
~ THEN BEGIN 5 // from:
  SAY #15112 /* ~Damn, I was hoping you were more the passive-aggressive type.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 ~  True()
~ THEN BEGIN 6 // from:
  SAY #15113 /* ~How do you like my new cloak?~ */
  IF ~~ THEN EXIT
END
