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

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

IF WEIGHT #3 /* Triggers after states #: 9 11 12 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #7712 /* ~Hey there, what can I do for ya?~ */
  IF ~  ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #7722 /* ~We've been investigating some of the weird goings-on of Baldur's Gate, and we thought that the Harbor Master must know a great deal, what with the comings and goings of the merchant ships.~ */ GOTO 1
  IF ~~ THEN REPLY #7723 /* ~We wanted to charter a ship.~ */ GOTO 6
  IF ~~ THEN REPLY #7724 /* ~We're sorry to have bothered you.~ */ GOTO 5
  IF ~  ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #7725 /* ~We've been investigating some of the weird goings-on of Baldur's Gate, and we thought that the Harbor Master must know a great deal, what with the comings and goings of the merchant ships.~ */ GOTO 4
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #7713 /* ~Ya. As the Harbor Master, I'm privy to a lot of what's going on. What's it that ya want ta know?~ */
  IF ~~ THEN REPLY #7726 /* ~Tell us what you know about the iron shortage.~ */ GOTO 2
  IF ~~ THEN REPLY #7727 /* ~Do you know much about the Iron Throne?~ */ GOTO 3
  IF ~~ THEN REPLY #7728 /* ~Tell us whatever you might think is interesting.~ */ GOTO 4
  IF ~~ THEN REPLY #7729 /* ~Actually, we have to get going.~ */ GOTO 5
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #7714 /* ~The iron shortage, eh? Well, there's not much to tell. With the Nashkel mines basically shut down, and bandits making it impossible to ship overland, iron's become rare. Recently though, the Iron Throne's been shipping in iron through their merchant fleet. It's really strange, 'cause their main competitors aren't doing the same. They're just lettin' the Throne hog the whole market.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27136 /* ~Investigating the Iron Throne
According to the Harbor Master, the Iron Throne has been shipping iron into the city via its merchant fleet.~ */ EXIT
  IF ~Global("X#GarHar","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarHar","GLOBAL",1)~ EXTERN ~GARRIJ~ 68
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #7715 /* ~The Iron Throne's been making some major moves in the city. They've been making inroads in all sorts of markets, though the most noticeable would be iron. Their competitors just sit there and take it. It's really weird.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 1.2 0.3
  SAY #7716 /* ~I'm not here to entertain people. I'm gonna have to ask ya to leave so I can get some work done now.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 1.3 0.2
  SAY #7717 /* ~Nice talkin' to ya guys.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from: 0.1
  SAY #7718 /* ~Ya wanna charter a ship, do ya? Well where is it that ya wanna go?~ */
  IF ~~ THEN REPLY #7730 /* ~Waterdeep would be a fine destination.~ */ GOTO 7
  IF ~~ THEN REPLY #7731 /* ~I've always wanted to see Calimport.~ */ GOTO 8
  IF ~~ THEN REPLY #7732 /* ~The Moonshae Isles.~ */ GOTO 8
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #7719 /* ~Usually there's a ship going to Waterdeep every couple days, but with all the troubles in the Sea of Swords, travel's kinda dropped off. It'll be a couple weeks 'fore something comes in.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 6.2 6.1
  SAY #7720 /* ~No ships headed there at the moment. If one comes in, I'll tell the captain someone's interested.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 /* Triggers after states #: 12 even though they appear after this state */
~  PartyHasItem("MISC55")
~ THEN BEGIN 9 // from:
  SAY #7721 /* ~By the Bitch Queen's breath! That's Duke Eltan ya have with you. He's looking in a bad way. Leave him here with me; I'll make sure he's all right. You're the people who've been working fer Scar and Eltan against the Iron Throne. Well, I'm sure you have much to do, so you should a get a move on it. Don't worry about Eltan, I'll keep good care of him. I've got to get him to a safe place, so good luck.~ */
  IF ~  !Global("TalkedToPang","GLOBAL",1)
~ THEN DO ~EraseJournalEntry(27137)
EraseJournalEntry(27138)
EraseJournalEntry(27139)
EraseJournalEntry(27140)
EraseJournalEntry(27141)
EraseJournalEntry(27142)
EraseJournalEntry(27143)
EraseJournalEntry(27144)
EraseJournalEntry(26963)
EraseJournalEntry(27145)
EraseJournalEntry(26959)
EraseJournalEntry(26984)
EraseJournalEntry(31466)
AddJournalEntry(31466,QUEST_DONE)
AddJournalEntry(31467,QUEST)
SetGlobal("EltanMove","GLOBAL",1)
SetGlobal("BroughtEltan","GLOBAL",1)
TakePartyItem("MISC55")
ActionOverride("Eltan2",SetNumTimesTalkedTo(100))
AddexperienceParty(2500)
EscapeArea()
~ SOLVED_JOURNAL #27146 /* ~Duke Eltan's Illness
I took the defenseless Duke Eltan to the Harbor Master, who promised to keep him safe.~ */ EXIT
  IF ~  Global("TalkedToPang","GLOBAL",1)
~ THEN DO ~EraseJournalEntry(27137)
EraseJournalEntry(27138)
EraseJournalEntry(27139)
EraseJournalEntry(27140)
EraseJournalEntry(27141)
EraseJournalEntry(27142)
EraseJournalEntry(27143)
EraseJournalEntry(27144)
EraseJournalEntry(26963)
EraseJournalEntry(27145)
EraseJournalEntry(26959)
EraseJournalEntry(26984)
EraseJournalEntry(31466)
AddJournalEntry(31466,QUEST_DONE)
SetGlobal("EltanMove","GLOBAL",1)
SetGlobal("BroughtEltan","GLOBAL",1)
TakePartyItem("MISC55")
ActionOverride("Eltan2",SetNumTimesTalkedTo(100))
AddexperienceParty(2500)
EscapeArea()
~ SOLVED_JOURNAL #27146 /* ~Duke Eltan's Illness
I took the defenseless Duke Eltan to the Harbor Master, who promised to keep him safe.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 11 12 even though they appear after this state */
~  Global("BroughtEltan","GLOBAL",0)
~ THEN BEGIN 10 // from:
  SAY #7733 /* ~I'm really busy now, so I'm gonna have to ask ya ta come back some time later.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 12 even though they appear after this state */
~  Global("BroughtEltan","GLOBAL",1)
~ THEN BEGIN 11 // from:
  SAY #7734 /* ~You guys shouldn't be hanging 'round here. Ya might bring attention to Duke Eltan.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 12 // from:
  SAY #7735 /* ~Well friend, ya might be interested ta know that there's been quite a few Iron Throne ships coming to dock these past few weeks. They've been stockpiling something, and if I guess right, that something is iron.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27147 /* ~Investigating the Iron Throne
When we charmed the Harbor Master, he told us that there were quite a few Iron Throne merchant ships coming into port these past few weeks. He thinks that the ships were carrying iron.~ */ EXIT
END

IF ~~ THEN BEGIN 13 // from:
  SAY #9266 /* ~You've made no friends here! Get off my docks!~ */
  IF ~~ THEN EXIT
END
