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

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

IF WEIGHT #7 /* Triggers after states #: 3 11 12 14 15 16 26 even though they appear after this state */
~True()
~ THEN BEGIN 0 // from:
  SAY #31306 /* ~'Allo there, what can I do for you this fine day? Have you need of a trinket or two, or do you need directions?~ */
  IF ~~ THEN REPLY #31337 /* ~What have you to offer?~ */ GOTO 1
  IF ~Global("VillageSaved","GLOBAL",0)~ THEN REPLY #31338 /* ~What is of interest around here?~ */ GOTO 2
  IF ~~ THEN REPLY #61000 /* ~No, I don't need anything.~ */ GOTO 25
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #31313 /* ~Let's just have a look and see if anything strikes your fancy.~ */
  IF ~~ THEN DO ~StartStore("tanally1",LastTalkedToBy())~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #31381 /* ~We've a little intrigue happening, though nothing a traveling company armed as you are would be interested in. Well, there have been a few people go missing.~ */
  IF ~~ THEN GOTO 23
END

IF WEIGHT #1 /* Triggers after states #: 26 even though they appear after this state */
~PartyHasItem("BOOK59")
Global("TalkedToTanally1","GLOBAL",0)~ THEN BEGIN 3 // from:
  SAY #31382 /* ~You have made an... interesting selection. You know, I used to peddle books in Athkatla under another name. Perhaps you were a customer? Call me by the name I used before and perhaps I will have a discount for you.~ */
  IF ~~ THEN REPLY #31386 /* ~We have a mutual friend. A tanner in Athkatla that works in... exotic leathers.~ */ GOTO 7
  IF ~~ THEN REPLY #31387 /* ~Your business is over! I know of your relationship with the tanner in Athkatla!~ */ GOTO 8
  IF ~~ THEN REPLY #31383 /* ~Carbin Shale was your name.~ */ GOTO 5
  IF ~~ THEN REPLY #31384 /* ~Darbin Eole was your name.~ */ GOTO 5
  IF ~~ THEN REPLY #31385 /* ~Darcin Cole was your name.~ */ GOTO 9
  IF ~~ THEN REPLY #31523 /* ~Vellin Dahn was your name.~ */ GOTO 5
  IF ~~ THEN REPLY #31524 /* ~Darvin Daln was your name.~ */ GOTO 5
  IF ~~ THEN REPLY #31525 /* ~Havin Cole was your name.~ */ GOTO 5
  IF ~~ THEN REPLY #31526 /* ~Darlin Cole was your name.~ */ GOTO 5
  IF ~~ THEN REPLY #31527 /* ~Gavin MacLeod was your name.~ */ GOTO 6
  IF ~~ THEN REPLY #31528 /* ~I'm sorry? What are you talking about?~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.10
  SAY #31529 /* ~Nothing, nothing at all. This wasn't meant for you then. Good day to you.~ */
  IF ~~ THEN DO ~TakePartyItem("BOOK59")
EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 3.8 3.7 3.6 3.5 3.3 3.2
  SAY #31530 /* ~No, no I don't think you are who I should be speaking to. Something is definitely wrong here. I'll just take this back and you can be on your way. Good day.~ */
  IF ~~ THEN DO ~TakePartyItem("BOOK59")
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 6 // from: 3.9
  SAY #31531 /* ~No, no, that wouldn't be it. Do stop wasting my time, will you?~ */
  IF ~~ THEN DO ~TakePartyItem("BOOK59")
EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 3.0
  SAY #31532 /* ~I don't know what you are talking about. Good day.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 18.0 12.2 9.1 3.1
  SAY #31533 /* ~What? Who are you? No matter. You'll be dealt with soon enough if you are crossing the Rune.~ */
  IF ~~ THEN DO ~DialogueInterrupt(FALSE)
RunAwayFrom(LastTalkedToBy,100)
EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 3.4
  SAY #31534 /* ~Indeed. Indeed it was. As I said in the letter, I am sorry for these simple games. Merely a ruse to throw off the foolish guards of Athkatla. I trust you have the armor almost complete?~ */
  IF ~~ THEN REPLY #53754 /* ~Yes, yes I do. It is not quite done yet though.~ */ GOTO 10
  IF ~~ THEN REPLY #53755 /* ~You monster, you would deal with someone that makes armor from skin?!~ */ GOTO 8
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #31538 /* ~Of course. I will add the final touches, but I do need the most important ingredient first. Your workmanship is unparalleled, but it needs... something special.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToTanally1","GLOBAL",1)
~ GOTO 18
END

IF WEIGHT #2 /* Triggers after states #: 26 even though they appear after this state */
~Global("TalkedToTanally1","GLOBAL",1)
!PartyHasItem("MISC8H")
~ THEN BEGIN 11 // from:
  SAY #31540 /* ~I have told you what I need. Your leather skin armor will remain unfinished until I have the blood of a silver dragon and the armor itself. Get the blood, then we will talk.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 26 even though they appear after this state */
~Global("TalkedToTanally1","GLOBAL",1)
PartyHasItem("MISC8H")
PartyHasItem("LEAT22")
~ THEN BEGIN 12 // from:
  SAY #31543 /* ~Well then, I trust you have the blood and the unfinished armor? You do fine work, but it requires my special touch to finish it off.~ */
  IF ~~ THEN REPLY #53769 /* ~It was quite a fight, but I prevailed. Here is both the blood and the armor.~ */ GOTO 13
  IF ~~ THEN REPLY #53770 /* ~Yes, yes, just finish the damn suit.~ */ GOTO 13
  IF ~~ THEN REPLY #53771 /* ~I cannot believe I have done this. You are a monster to have asked for such things!~ */ GOTO 8
END

IF ~~ THEN BEGIN 13 // from: 21.0 12.1 12.0
  SAY #31544 /* ~I shall take these ingredients and produce the finest and darkest of armors. You will serve well within its embrace. Return in four days and you shall have it.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToTanally1","GLOBAL",2)
SetGlobalTimer("Tanally1Done","GLOBAL",FOUR_DAYS)
TakePartyItem("Leat22")
TakePartyItem("Misc8h")
DestroyItem("Leat22")
DestroyItem("Misc8h")~ UNSOLVED_JOURNAL #23545 /* ~Finish the leather armor begun by Rejiek Hidesman

I have given the unfinished hide and the silver dragon's blood to Darcin Cole.  He told me to return in four days to collect the finished armor.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 26 even though they appear after this state */
~Global("TalkedToTanally1","GLOBAL",1)
PartyHasItem("MISC8H")
!PartyHasItem("LEAT22")
~ THEN BEGIN 14 // from: 21.1
  SAY #31545 /* ~I smell the scent of dragon blood, but I do not see the unfinished skin armor. Do not delay, bring both the blood and armor to me and I will make a suit of legend.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 26 even though they appear after this state */
~Global("TalkedToTanally1","GLOBAL",2)
GlobalTimerNotExpired("Tanally1Done","GLOBAL")
~ THEN BEGIN 15 // from:
  SAY #31546 /* ~Fine work takes time. You must give me the full four days before your armor is done. Leave me.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 /* Triggers after states #: 26 even though they appear after this state */
~Global("TalkedToTanally1","GLOBAL",2)
GlobalTimerExpired("Tanally1Done","GLOBAL")
~ THEN BEGIN 16 // from:
  SAY #31547 /* ~I have completed the task, and your armor is done. Beautiful it is. Here, examine it in your own hands.~ */
  IF ~~ THEN DO ~GiveItemCreate("Leat21",LastTalkedToBy,0,0,0)
~ GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #31548 /* ~Nice, is it not? I draw your attention to the stitching, the stitching that you did not do. You are not my tanner contact. He is dead.~ */
  IF ~~ THEN GOTO 22
END

IF ~~ THEN BEGIN 18 // from: 10.0
  SAY #53757 /* ~The skins were exquisite, but now there must be blood. You know what I need. Bring me the blood of a dragon. A silver dragon.~ */
  IF ~~ THEN REPLY #53759 /* ~You are a fiend! Silver dragons are good and true! To kill one would be heinous.~ */ GOTO 8
  IF ~~ THEN REPLY #53760 /* ~Certainly... ah, any idea where I might find one?~ */ GOTO 19
  IF ~~ THEN REPLY #53761 /* ~Consider it done.~ */ GOTO 20
  IF ~PartyHasItem("MISC8H")
~ THEN REPLY #53762 /* ~I already have the blood.~ */ GOTO 21
END

IF ~~ THEN BEGIN 19 // from: 18.1
  SAY #53764 /* ~None whatsoever. You are the artist; you find one.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #23562 /* ~Finish the leather armor begun by Rejiek Hidesman

I found the man mentioned in the letter I found at Rejiek's home and correctly named him as 'Darcin Cole'.  He thinks I am Rejiek, and will finish the skin armor if I bring him the blood of a silver dragon... wherever one might be.~ */ EXIT
END

IF ~~ THEN BEGIN 20 // from: 18.2
  SAY #53765 /* ~Good, good. I will await you here. Bring me the blood and the armor and I will make you a suit fit for the darkest of kings.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #23562 /* ~Finish the leather armor begun by Rejiek Hidesman

I found the man mentioned in the letter I found at Rejiek's home and correctly named him as 'Darcin Cole'.  He thinks I am Rejiek, and will finish the skin armor if I bring him the blood of a silver dragon... wherever one might be.~ */ EXIT
END

IF ~~ THEN BEGIN 21 // from: 18.3
  SAY #53766 /* ~Well now, how enterprising of you. I am impressed. Let us see if you have everything you need then.~ */
  IF ~PartyHasItem("MISC8H")
PartyHasItem("LEAT22")
~ THEN REPLY #53767 /* ~I have both the blood and the armor.~ */ GOTO 13
  IF ~PartyHasItem("MISC8H")
!PartyHasItem("LEAT22")
~ THEN REPLY #53768 /* ~I have the blood, but not the armor.~ */ GOTO 14
END

IF ~~ THEN BEGIN 22 // from: 17.0
  SAY #53772 /* ~I have some associates that wish to speak with you. Well, not so much speak. More like kill.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToTanally1","GLOBAL",3)
EraseJournalEntry(23545)
EraseJournalEntry(23562)
CreateCreatureObject("TANWIZ02",Myself,0,0,0)
CreateCreatureObject("TANWIZ03",Myself,0,0,0)
CreateCreatureObject("TANWIZ04",Myself,0,0,0)
Enemy()
EscapeArea()~ SOLVED_JOURNAL #7084 /* ~Finish the leather armor begun by Rejiek Hidesman

Darcin Cole finished the dark leather armor begun by Rejiek Hidesman, but then attacked me because he no longer thought I was the murderous tanner.  He summoned wizards similar to the one I encountered in Rejiek's basement.~ */ EXIT
END

IF ~~ THEN BEGIN 23 // from: 2.0
  SAY #53780 /* ~The most disturbing loss was the ranger Merella. She disappeared after searching for the first person to go missing, some peasant.~ */
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.0
  SAY #53781 /* ~Her cabin was in the southwest, though I don't know what you would find there. Don't much care, really.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 25 // from: 0.2
  SAY #61001 /* ~As you wish, my <LADYLORD>.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("Attacked","LOCALS",1)~ THEN BEGIN 26 // from:
  SAY #61202 /* ~Who...?  You dare?!  Fool, you have crossed the Rune, and you shall pay the price for your interference, whatever the cause!~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToTanally1","GLOBAL",3)
EraseJournalEntry(23545)
EraseJournalEntry(23562)
CreateCreatureObject("TANWIZ02",Myself,0,0,0)
CreateCreatureObject("TANWIZ03",Myself,0,0,0)
CreateCreatureObject("TANWIZ04",Myself,0,0,0)
Enemy()
EscapeArea()~ EXIT
END
