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

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

IF WEIGHT #6 /* Triggers after states #: 4 5 8 9 12 13 even though they appear after this state */
~  PartyHasItem("MISC12")
~ THEN BEGIN 0 // from:
  SAY #107 /* ~An interesting piece o' material you got there. Ankheg, if I'm not mistaken. Been a while since I seen the like, but if I remember correctly, it makes a fine set of armor. If properly treated it's comparable to full plate with half the weight! If you're willing to part with your shells I'll give you 500 gold for the lot of them. No more can I offer with business as slow as it is. Iron shortage hurting us all.~ */
  IF ~  Global("MakeArmor","GLOBAL",0)
~ THEN REPLY #192 /* ~I'm not interested in selling it just now, though it would be to you if I do.~ */ GOTO 6
  IF ~~ THEN REPLY #15267 /* ~Could you show us what you have for sale?~ */ DO ~StartStore("Taerum",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #193 /* ~You have just bought yourself some ankheg, sir! A pleasure doing business with you.~ */ GOTO 1
  IF ~~ THEN REPLY #194 /* ~Hardly a fair price for the trouble I went through to get it. Double your offer, and consider it done.~ */ GOTO 2
  IF ~  GlobalGT("MakeArmor","GLOBAL",0)
~ THEN REPLY #15268 /* ~Nothing at the moment.~ */ EXIT
END

IF ~~ THEN BEGIN 1 // from: 12.0 8.0 4.1 2.0 0.2
  SAY #180 /* ~Ah, this will make a fine suit of plate for a governor or better. Nobility like exotic materials and don't care much about the price. Probably close to 20,000 gold for a tenday's work when I'm finished. I may survive this iron shortage after all.~ */
  IF ~~ THEN DO ~TakePartyItem("MISC12")
DestroyItem("MISC12")
GiveGoldForce(500)
EraseJournalEntry(27450)
EraseJournalEntry(27451)
EraseJournalEntry(27452)
~ SOLVED_JOURNAL #27452 /* ~A Small Fortune!
One lousy ankheg shell for 500 gold? I can't believe everyone isn't out hunting those giant bug monsters.~ */ EXIT
END

IF ~~ THEN BEGIN 2 // from: 4.2 0.3
  SAY #181 /* ~Whoa! Iron is not so scarce as to make me that desperate! 500 gold or nothing, and you can take it or leave it!~ */
  IF ~~ THEN REPLY #195 /* ~I suppose I will take it.~ */ GOTO 1
  IF ~~ THEN REPLY #196 /* ~Well, I'll just have to leave it then.~ */ GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.1
  SAY #182 /* ~Suit yourself, but whatever you do with it, I'd do it quick. If not properly dried and cured it will rot in less than a tenday. Be no use to anyone beyond that.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27450 /* ~An Offer from Taerom
Taerom "Thunderhammer" of Beregost will pay me 500 gold for every ankheg shell that I find.~ */ EXIT
END

IF WEIGHT #1 /* Triggers after states #: 13 even though they appear after this state */
~  GlobalTimerNotExpired("Taerom","GLOBAL")
PartyHasItem("MISC12")
~ THEN BEGIN 4 // from:
  SAY #183 /* ~Hello again! Still have that ankheg shell I see. Have you reconsidered my offer for it? 500 gold is fair.~ */
  IF ~  Global("MakeArmor","GLOBAL",0)
~ THEN REPLY #197 /* ~I'm not interested in selling it just now, though it would be to you if I do.~ */ GOTO 6
  IF ~~ THEN REPLY #198 /* ~You have just bought yourself some ankheg, sir! A pleasure doing business with you.~ */ GOTO 1
  IF ~~ THEN REPLY #199 /* ~Hardly a fair price for the trouble I went through to get it. Double your offer, and consider it done.~ */ GOTO 2
END

IF WEIGHT #2 /* Triggers after states #: 13 even though they appear after this state */
~  GlobalTimerExpired("Taerom","GLOBAL")
PartyHasItem("MISC12")
Global("MakeArmor","GLOBAL",0)
~ THEN BEGIN 5 // from:
  SAY #184 /* ~It's you again. I am afraid I'm no longer interested in the ankheg shell ye possess. I can tell by the sight of it that it's begun to rot. You'll not get 1 gold for it now, let alone 500. What a shame.~ */
  IF ~~ THEN DO ~SetGlobal("MakeArmor","GLOBAL",2)
~ EXIT
END

IF ~~ THEN BEGIN 6 // from: 4.0 0.0
  SAY #185 /* ~A shame it is. It could bring quite a bit once finished. How about this? For 4,000 gold I'll make it into plate for you instead. It's half my normal rate for working on an exotic, but, as I mentioned, business is slow.~ */
  IF ~~ THEN REPLY #200 /* ~Though your offer is generous, it is more than I can afford right now.~ */ GOTO 11
  IF ~  PartyGoldGT(3999)
~ THEN REPLY #201 /* ~A fair price for the workmanship of Taerom Thunderhammer. 4,000 gold it is.~ */ GOTO 7
  IF ~~ THEN REPLY #202 /* ~4,000 gold is ridiculous! It would be cheaper to make it from the gold itself!~ */ DO ~SetGlobal("TaeromRidiculous","GLOBAL",1)
~ GOTO 10
END

IF ~~ THEN BEGIN 7 // from: 12.1 6.1
  SAY #186 /* ~Good on you. Now it will take me a while to finish, but you will soon have the finest armor in Beregost, if not the entire Sword Coast. Come back in three days, and I'll have it ready for you.~ */
  IF ~~ THEN REPLY #26786 /* ~Very well. I shall return in a few days.~ */ DO ~TakePartyGold(4000)
TakePartyItem("MISC12")
DestroyItem("MISC12")
SetGlobal("MakeArmor","GLOBAL",1)
SetGlobalTimer("Taerom2","GLOBAL",THREE_DAYS)
~ UNSOLVED_JOURNAL #32158 /* ~A New Suit of Armor
In three days, Taerom "Thunderhammer" of Beregost should have my new ankheg-shell plate mail ready for me. I will look ferocious in it!~ */ EXIT
  IF ~  PartyGoldGT(5999)
~ THEN REPLY #26787 /* ~On second thought, I am desperately in need of the armor now. I happen to get stabbed a lot. How about I give you 6,000 gp to have it done tomorrow?~ */ DO ~TakePartyGold(6000)
TakePartyItem("MISC12")
DestroyItem("MISC12")
SetGlobal("MakeArmor","GLOBAL",1)
SetGlobalTimer("Taerom2","GLOBAL",ONE_DAY)
~ GOTO 15
END

IF WEIGHT #3 /* Triggers after states #: 13 even though they appear after this state */
~  !GlobalTimerExpired("Taerom2","GLOBAL")
Global("MakeArmor","GLOBAL",1)
~ THEN BEGIN 8 // from:
  SAY #187 /* ~It's not ready yet. Perhaps another day or two. Be patient; quality takes time.~ */
  IF ~  PartyHasItem("MISC12")
~ THEN REPLY #26788 /* ~I'd like to sell you more ankheg shells.~ */ UNSOLVED_JOURNAL #27451 /* ~A New Suit of Armor
In just a day, Taerom "Thunderhammer" of Beregost should have my new ankheg-shell plate mail ready for me. I will look ferocious in it!~ */ GOTO 1
  IF ~~ THEN REPLY #15267 /* ~Could you show us what you have for sale?~ */ DO ~StartStore("Taerum",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15268 /* ~Nothing at the moment.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 13 even though they appear after this state */
~  GlobalTimerExpired("Taerom2","GLOBAL")
Global("MakeArmor","GLOBAL",1)
~ THEN BEGIN 9 // from:
  SAY #188 /* ~Ah, you have returned. And here be what I promised you. Beautiful isn't it? A finer set of armor I have not made for some time. Wear it well.~ */
  IF ~~ THEN DO ~GiveItemCreate("PLAT06",LastTalkedToBy(Myself),1,0,0)
DestroyItem("MISC12")
SetGlobal("MakeArmor","GLOBAL",2)
EraseJournalEntry(27450)
EraseJournalEntry(27451)
EraseJournalEntry(27453)
EraseJournalEntry(32158)
~ SOLVED_JOURNAL #27454 /* ~A New Suit of Armor
Taerom "Thunderhammer" of Beregost has crafted a fine suit of plate mail out of my ankheg shell. It was expensive but well worth it!~ */ EXIT
END

IF ~~ THEN BEGIN 10 // from: 6.2
  SAY #189 /* ~And gold would be cut like cheese in battle, if you catch my meaning! Bah! Come back with the gold or don't come back! I'll not suffer lip such as this in my own smithy!~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27453 /* ~An Offer from Taerom
For 4,000 gold, Taerom "Thunderhammer" can make me a new suit of plate mail from that ankheg shell I found. Also, he says there's a 5,000 gold bounty on a madman named Bassilus. Coincidence? I think not.~ */ EXIT
END

IF ~~ THEN BEGIN 11 // from: 12.2 6.0
  SAY #190 /* ~If it be gold you're short of, you may want to try for the bounty on the cleric Bassilus. I hear it already nears 5,000, so you would have change to spare. Be quick about it though. That shell will rot in a tenday if not cured.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27453 /* ~An Offer from Taerom
For 4,000 gold, Taerom "Thunderhammer" can make me a new suit of plate mail from that ankheg shell I found. Also, he says there's a 5,000 gold bounty on a madman named Bassilus. Coincidence? I think not.~ */ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 13 even though they appear after this state */
~  !GlobalTimerExpired("Taerom","GLOBAL")
Global("TaeromRidiculous","GLOBAL",1)
PartyHasItem("MISC12")
Global("MakeArmor","GLOBAL",0)
~ THEN BEGIN 12 // from:
  SAY #191 /* ~Back again, are you? Well, which will it be? Sell me the shell for 500, or do I make you armor for 4,000?~ */
  IF ~~ THEN REPLY #203 /* ~I'll sell it to you. I'm sick of carrying it around.~ */ GOTO 1
  IF ~  PartyGoldGT(3999)
~ THEN REPLY #204 /* ~Here's your 4,000. Make me a suit of armor to be proud of.~ */ GOTO 7
  IF ~~ THEN REPLY #205 /* ~I'm not interested in either.~ */ GOTO 11
END

IF WEIGHT #0 ~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 13 // from:
  SAY #6413 /* ~Well, I don't have much in the way of rumors. I assume you must know about the iron shortage, but then you'd have to live under a rock not to notice. Other than that, there's not much I could tell you.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 ~  True()
~ THEN BEGIN 14 // from:
  SAY #15266 /* ~Hello there. Is there anything I can do for you on this fair day?~ */
  IF ~~ THEN REPLY #15267 /* ~Could you show us what you have for sale?~ */ DO ~StartStore("Taerum",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15268 /* ~Nothing at the moment.~ */ EXIT
END

IF ~~ THEN BEGIN 15 // from: 7.1
  SAY #26789 /* ~As ye wish.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27451 /* ~A New Suit of Armor
In just a day, Taerom "Thunderhammer" of Beregost should have my new ankheg-shell plate mail ready for me. I will look ferocious in it!~ */ EXIT
END
