// creator  : weidu.exe (version 23600)
// argument : FLAM4.DLG
// game     : .
// source   : ./override/FLAM4.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #1 /* Triggers after states #: 14 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #4667 /* ~Hold! I am a member of the Flaming Fist, and require that you identify yourselves.~ */
  IF ~~ THEN REPLY #4668 /* ~We're mercenaries in the service of Amn.~ */ GOTO 1
  IF ~~ THEN REPLY #4669 /* ~We don't have to answer your stinking questions!~ */ GOTO 2
  IF ~~ THEN REPLY #4670 /* ~We're adventurers.~ */ GOTO 3
  IF ~~ THEN REPLY #4671 /* ~We're bandits.~ */ GOTO 4
  IF ~~ THEN REPLY #4672 /* ~We're a rampaging horde of tarrasques. Krie! Krie!~ */ GOTO 5
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #4673 /* ~A little far from home, aren't you? You should know that the Flaming Fist patrols these regions, so why don't you turn yourselves around and head back home?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #4674 /* ~Not a very nice thing to say. I'll have to assume that you're members of the bandits.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 0.2
  SAY #4675 /* ~Adventurers, huh? Well you should keep a look out, there's been quite a few reports about bandits causing trouble 'round these parts. Also, I've been searching for a deserter. His name is Samuel, and he should be traveling with a woman. There is a bounty of 50 gold for his capture.~ */
  IF ~~ THEN GOTO 13
  IF ~  !PartyHasItem("MISC13")
~ THEN DO ~AddJournalEntry(27085,QUEST)
~ GOTO 11
END

IF ~~ THEN BEGIN 4 // from: 0.3
  SAY #4676 /* ~Well, now you're about to be dead bandits.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 0.4
  SAY #4677 /* ~Your sarcasm isn't appreciated, so just shut your mouth before it gets you into trouble.~ */
  IF ~~ THEN REPLY #4678 /* ~Why don't you shut your own mouth, you ugly prigger?!~ */ GOTO 6
  IF ~~ THEN REPLY #4679 /* ~Sorry, sir. I guess my mouth sometimes gets ahead of my brain.~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #4680 /* ~Not smart. I think it's time you got taught a lesson.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.1
  SAY #4681 /* ~Nice apology. Before we leave I'd better warn you: There are bandits that have been causing trouble along the Coast Way, you'd be best to avoid them. Also, I've been searching for a deserter by the name of Samuel. He's traveling with a woman, so if you see him, remember, there's a 50 gold reward for his capture.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 14 even though they appear after this state */
~  !PartyHasItem("MISC13")
~ THEN BEGIN 8 // from:
  SAY #5157 /* ~So we meet again. I'm sorry, but I don't have any time for talk.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 14 even though they appear after this state */
~  OR(3)
!InParty("jaheira")
!InMyArea("jaheira")
StateCheck("jaheira",CD_STATE_NOTVALID)
PartyHasItem("MISC13")
~ THEN BEGIN 9 // from:
  SAY #5160 /* ~So we meet again. Sorry, but I don't— Hey, who are you carrying there?~ */
  IF ~~ THEN REPLY #5168 /* ~It's one of our companions, he was wounded.~ */ GOTO 10
  IF ~~ THEN REPLY #5171 /* ~A hobgoblin we killed. We think he's a member of the Chill, so we're taking him back to Beregost for identification.~ */ GOTO 10
  IF ~~ THEN REPLY #5175 /* ~He's a merchant we found. His caravan was attacked by bandits, and he was badly wounded. He paid us to take him back to Beregost.~ */ GOTO 11
  IF ~~ THEN REPLY #5179 /* ~This is Samuel. We want to turn him in for the 50 gold.~ */ GOTO 12
  IF ~Global("X#KivanSamuel","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#KivanSamuel","GLOBAL",1)~ EXTERN ~KIVANJ~ 221
END

IF ~~ THEN BEGIN 10 // from: 16.0 13.1 13.0 9.1 9.0 KIVANJ:221.1 KIVANJ:221.0
  SAY #5183 /* ~Don't try to lie to me. You have Samuel there, don't you? Hand him over or we'll have to take him by force.~ */
  IF ~~ THEN REPLY #5196 /* ~Okay, we do have Samuel. Take him and give us our 50 gold.~ */ GOTO 12
  IF ~~ THEN REPLY #5199 /* ~You'll have to take him by force. Sorry.~ */ DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 16.2 13.2 9.2 3.1 KIVANJ:221.2
  SAY #5185 /* ~All right then, perhaps we'll meet again, goodbye.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 12 // from: 16.3 13.3 10.0 9.3 KIVANJ:221.3
  SAY #5191 /* ~Good job, here's your reward.~ */
  IF ~~ THEN DO ~EraseJournalEntry(27086)
EraseJournalEntry(27085)
AddJournalEntry(27087,QUEST_DONE)
TakePartyItem("MISC13")
GivePartyGold(50)
~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 14 16 even though they appear after this state */
~  PartyHasItem("MISC13")
~ THEN BEGIN 13 // from: 3.0
  SAY #5251 /* ~Actually, I just wanted to ask you one question. Who is it that you have with you?~ */
  IF ~~ THEN REPLY #5254 /* ~It's one of our companions, he was wounded.~ */ GOTO 10
  IF ~~ THEN REPLY #5257 /* ~A hobgoblin we killed. We think he's a member of the Chill, so we're taking him back to Beregost for identification.~ */ GOTO 10
  IF ~~ THEN REPLY #5259 /* ~He's a merchant we found. His caravan was attacked by bandits, and he was badly wounded. He paid us to take him back to Beregost.~ */ GOTO 11
  IF ~~ THEN REPLY #5261 /* ~This is Samuel. We want to turn him in for the 50 gold.~ */ GOTO 12
END

IF WEIGHT #0 ~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 14 // from:
  SAY #6935 /* ~I am a proud member of the Flaming Fist. Our headquarters is in Baldur's Gate, though we also operate in Beregost and the Friendly Arm Inn. We are quite concerned about the sudden rarity of iron. Many think that the nation of Amn is gearing up for war against our great city. If this were the case, I don't know how well we would do, lacking a resource as important as iron.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27088 /* ~Rising Tensions with Amn
I charmed a member of the Flaming Fist, and he told me that there were tensions between Baldur's Gate and the nation of Amn. He also said that the Flaming Fist is desperately in need of iron.~ */ EXIT
END

IF ~~ THEN BEGIN 15 // from:
  SAY #9011 /* ~You're not welcome here!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~  PartyHasItem("MISC13")
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN BEGIN 16 // from:
  SAY #45320 /* ~So, we meet again. Sorry, but I don't... hey, who are you carrying there?~ */
  IF ~~ THEN REPLY #5254 /* ~It's one of our companions, he was wounded.~ */ GOTO 10
  IF ~~ THEN REPLY #5257 /* ~A hobgoblin we killed. We think he's a member of the Chill, so we're taking him back to Beregost for identification.~ */ EXTERN ~BJAHEI~ 294
  IF ~~ THEN REPLY #5259 /* ~He's a merchant we found. His caravan was attacked by bandits, and he was badly wounded. He paid us to take him back to Beregost.~ */ GOTO 11
  IF ~~ THEN REPLY #45321 /* ~This is Samuel. We want to turn him in for 50 gold.~ */ GOTO 12
END
