// creator  : weidu.exe (version 23100)
// argument : _HURGAN.DLG
// game		 : .
// source	 : ./override/_HURGAN.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~_HURGAN~

IF ~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #84571 /* ~A merry band of heroes ye be! Have I got the adventure that'll make ye yearn for glory! I am Hurgan Stoneblade, presently residing in Citadel Adbar.~ */
  IF ~~ THEN REPLY #84572 /* ~Well met! What adventure do you speak of?~ */ GOTO 1
  IF ~~ THEN REPLY #84573 /* ~No offense, but we're not looking for a new adventure right now.~ */ GOTO 2
  IF ~~ THEN REPLY #84574 /* ~I've no desire to speak with you, dwarf.~ */ GOTO 3
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #84575 /* ~A glorious adventure indeed. Ye have heard of Durlag's Tower, mayhaps?~ */
  IF ~~ THEN REPLY #84576 /* ~I haven't come across the name before.~ */ GOTO 4
  IF ~~ THEN REPLY #84577 /* ~I've heard of it, yes. It's a haunted tower to the south of here, is it not?~ */ GOTO 5
  IF ~Global("X#AloraHurgan","GLOBAL",0)
InParty("alora")
InMyArea("alora")
!StateCheck("alora",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AloraHurgan","GLOBAL",1)~ EXTERN ~_ALORAJ~ 23
END

IF ~~ THEN BEGIN 2 // from: 21.1 13.1 9.0 7.2 0.1
  SAY #84578 /* ~Should ye become interested in the future, I may still be looking to hire you.~ */
  IF ~~ THEN DO ~SetGlobal("TalkToHurgan","GLOBAL",1)
~ UNSOLVED_JOURNAL #84579 /* ~Hurgan's offer

A dwarf named Hurgan Stoneblade has an employment opportunity for us if we wish to hear about it.  He is staying at the Ulgoth's Beard inn.~ */ EXIT
END

IF ~~ THEN BEGIN 3 // from: 4.2 0.2
  SAY #84580 /* ~The brashness of youth. Ye'll grow out of it right quick if ye have a brain.~ */
  IF ~~ THEN DO ~SetGlobal("TalkToHurgan","GLOBAL",1)
~ EXIT
END

IF ~~ THEN BEGIN 4 // from: 9.1 5.0 1.0
  SAY #84581 /* ~Durlag Trollkiller was a Dwarven hero of great renown. Single-handedly slew many a dragon, he did. Me granda' was a good friend of Durlag's. They adventured together until me granda's untimely death several centuries ago.~ */
  IF ~~ THEN REPLY #84582 /* ~Go on...~ */ GOTO 6
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
~ THEN REPLY #84583 /* ~Is there a point to your this story, old dwarf?~ */ GOTO 8
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #84584 /* ~Enough of your pointless rambling, dwarf!~ */ GOTO 3
  IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN REPLY #84585 /* ~Get to the point, if you please.~ */ GOTO 6
END

IF ~~ THEN BEGIN 5 // from: 1.1
  SAY #84586 /* ~It was haunted by me granda's friend for a time. He went mad ye see.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 6 // from: 8.0 4.3 4.0
  SAY #84587 /* ~Me granda' was slain by an evil demon but Durlag survived. Durlag kept 'Soultaker' that had been me granda's. He was going to send it to me mother but he was betrayed. A sad tale, that. After Durlag built the tower his family was replaced by doppelgangers. Durlag killed them all but was driven mad by the act. He entrapped his tower heavily and forgot about me granda's dagger.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #84588 /* ~When I heard the story as a youth, I went to retrieve the dagger meself but was driven back by Durlag's devious traps. If ye be interested, I wish to hire ye to retrieve me granda's dagger, 'Soultaker', me birthright. The tower has been penetrated somewhat by previous adventurers. I would think that the edge has been taken off of the danger. What say you?~ */
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #84589 /* ~Let us speak of compensation.~ */ GOTO 11
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #84590 /* ~Perhaps we should speak of compensation.~ */ GOTO 10
  IF ~~ THEN REPLY #84591 /* ~I'm not interested at this time.~ */ GOTO 2
  IF ~~ THEN REPLY #84592 /* ~I will find your dagger if I am able.~ */ GOTO 12
END

IF ~~ THEN BEGIN 8 // from: 4.1
  SAY #84593 /* ~Have patience, young one. If ye hold your tongue me point will become clear.~ */
  IF ~~ THEN GOTO 6
END

IF ~Global("TalkToHurgan","GLOBAL",1)
Global("Hurganquest","GLOBAL",0)
Global("Cult1","GLOBAL",0)
~ THEN BEGIN 9 // from:
  SAY #84594 /* ~Do ye wish to hear more about me proposal now?~ */
  IF ~~ THEN REPLY #84595 /* ~Sorry, I'm still not interested.~ */ GOTO 2
  IF ~~ THEN REPLY #84596 /* ~Yes, I'm interested.~ */ GOTO 4
END

IF ~~ THEN BEGIN 10 // from: 7.1
  SAY #84597 /* ~Of course. I have an enchanted hammer. 'Tis a powerful weapon in its own right. Should ye have no use for it then I reckon it'll bring an excellent price. What say ye?~ */
  IF ~~ THEN REPLY #84598 /* ~It is a fair price. We shall find your dagger.~ */ DO ~SetGlobal("Hurganhamm","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #84599 /* ~You will have to do better than that.~ */ GOTO 13
END

IF ~~ THEN BEGIN 11 // from: 7.0
  SAY #84600 /* ~2,000 gold pieces I can offer ye for yer services. What say ye?~ */
  IF ~~ THEN REPLY #84598 /* ~It is a fair price. We shall find your dagger.~ */ DO ~SetGlobal("Hurgangold","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #84599 /* ~You will have to do better than that.~ */ GOTO 21
END

IF ~~ THEN BEGIN 12 // from: 21.0 13.0 11.0 10.0 7.3
  SAY #84601 /* ~Good fortune to ye then. I shall await your return here.~ */
  IF ~~ THEN DO ~RevealAreaOnMap("FW0500")
SetGlobal("Hurganquest","GLOBAL",1)
EraseJournalEntry(84579)
~ UNSOLVED_JOURNAL #84602 /* ~Recovering 'Soultaker'

We have been asked by Hurgan Stoneblade to retrieve an enchanted dagger called 'Soultaker' from Durlag's Tower.  The dagger is a family heirloom that he wishes us to return to him in Ulgoth's Beard.  The tower is rumored to be heavily trapped.~ */ EXIT
END

IF ~~ THEN BEGIN 13 // from: 10.1
  SAY #84603 /* ~It is an excellent wage. Take it or leave it.~ */
  IF ~~ THEN REPLY #84604 /* ~We'll take it.~ */ DO ~SetGlobal("Hurganhamm","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #84605 /* ~Then we aren't interested.~ */ GOTO 2
END

IF ~Global("Hurganquest","GLOBAL",1)
Global("Cult1","GLOBAL",0)
~ THEN BEGIN 14 // from:
  SAY #84606 /* ~Hurry and retrieve me granda's dagger.~ */
  IF ~~ THEN EXIT
END

IF ~Global("Cult1","GLOBAL",1)
Global("Hurgandemon","GLOBAL",0)
~ THEN BEGIN 15 // from:
  SAY #84607 /* ~Something went wrong. What is it?~ */
  IF ~~ THEN REPLY #84608 /* ~We retrieved the dagger but some sort of religious fanatic stole it. I don't know why he did.~ */ GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #84609 /* ~It is as I feared. Listen to me, we haven't much time. The ones who stole the dagger from you are the same that released the demon that killed me granda. Me granda was killed by a tanar'ri, a nabassu to be precise. The one who stole it from you is a member of a cult that worships this beast as a god. Many centuries ago, when me granda adventured with Durlag, they fell foul of the tanar'ri, which had been released on our plane by the cult. Durlag and me granda defeated the tanar'ri, though granda was mortally wounded, and they entrapped the demon's essence in a dagger. Me da later found a way to destroy the dagger and the beast within, but tragedy befell Durlag before he could send the dagger to me clan.~ */
  IF ~~ THEN GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #84610 /* ~Ye must find the cult. Ye must retrieve the dagger that I might destroy the beast. If the cult manages to free the demon then it must be killed before it visits destruction upon our land. Go and get the dagger. Quickly!~ */
  IF ~~ THEN DO ~SetGlobal("Hurgandemon","GLOBAL",1)
~ UNSOLVED_JOURNAL #84611 /* ~Recovering 'Soultaker'

Hurgan hadn't told us everything when he sent us to retrieve the dagger.  It appears that the dagger contains the soul of an evil demon that killed Hurgan's grandfather.  The people that ambushed us are members of the cult that worships the beast.  Hurgan believes that they wish to bring the demon back to life within their house in Ulgoth's Beard.  Hurgan has asked us to stop them.~ */ EXIT
END

IF ~Global("Hurgandemon","GLOBAL",1)
!Dead("tanar")
~ THEN BEGIN 18 // from:
  SAY #84612 /* ~Ye must hurry. The cult will begin their ritual as soon as they are able.~ */
  IF ~~ THEN EXIT
END

IF ~Dead("tanar")
~ THEN BEGIN 19 // from:
  SAY #84613 /* ~Is the deed done?~ */
  IF ~Global("Hurganhamm","GLOBAL",1)
~ THEN REPLY #84614 /* ~We killed the tanar'ri.  We have come for our reward.~ */ GOTO 22
  IF ~Global("Hurgangold","GLOBAL",1)
~ THEN REPLY #84615 /* ~The tanar'ri is dead.  We have come for our reward.~ */ GOTO 20
  IF ~~ THEN REPLY #84616 /* ~The Tanar'ri is dead.  We need no reward for the task, as it was something that needed to be done.~ */ GOTO 23
END

IF ~~ THEN BEGIN 20 // from: 19.1
  SAY #84617 /* ~I misjudged the cult's power. I never believed them capable of freeing the tanar'ri. Ye have destroyed it for now. Eventually it will be able to return to this plane. Rest easy my friends. Ye did all that ye could do. Ye saved the Sword Coast from a demon. Here is your reward. Farewell.~ */
  IF ~~ THEN REPLY #84618 /* ~Farewell, Hurgan.~ */ DO ~GiveGoldForce(2000)
EraseJournalEntry(84579)
EraseJournalEntry(84602)
EraseJournalEntry(84611)
EraseJournalEntry(83437)
EraseJournalEntry(83443)
EscapeArea()
~ SOLVED_JOURNAL #88925 /* ~Recovering 'Soultaker'

I have overcome the strange cult of the tanar'ri, and have slain the demon itself.  His business in Ulgoth's Beard concluded, Hurgan departed.~ */ EXIT
END

IF ~~ THEN BEGIN 21 // from: 11.1
  SAY #84619 /* ~The price is fair for the danger involved. Take it or leave it.~ */
  IF ~~ THEN REPLY #84620 /* ~It will have to do. I'll take it.~ */ DO ~SetGlobal("Hurgold","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #84621 /* ~In that case, I'm not interested.~ */ GOTO 2
END

IF ~~ THEN BEGIN 22 // from: 19.0
  SAY #84622 /* ~I have misjudged the cult's power. I never believed them capable of freeing the tanar'ri. Ye have destroyed it for now. Eventually it will be able to return to this plane. Rest easy my friends. Ye did all that ye could do. Ye saved the Sword Coast from a demon. Here is your reward. Farewell.~ */
  IF ~~ THEN REPLY #84618 /* ~Farewell, Hurgan.~ */ DO ~GiveItem("_HAMM04",LastTalkedToBy)
EraseJournalEntry(84579)
EraseJournalEntry(84602)
EraseJournalEntry(84611)
EraseJournalEntry(83437)
EraseJournalEntry(83443)
EscapeArea()
~ SOLVED_JOURNAL #88925 /* ~Recovering 'Soultaker'

I have overcome the strange cult of the tanar'ri, and have slain the demon itself.  His business in Ulgoth's Beard concluded, Hurgan departed.~ */ EXIT
END

IF ~~ THEN BEGIN 23 // from: 19.2
  SAY #84626 /* ~I have misjudged the cult's power. I never believed them capable of freeing the tanar'ri. Ye have destroyed it for now. Eventually it will be able to return to this plane. Rest easy my friends. Ye did all that ye could do. Ye saved the Sword Coast from a demon.  Farewell.~ */
  IF ~~ THEN DO ~EraseJournalEntry(84579)
EraseJournalEntry(84602)
EraseJournalEntry(84611)
EraseJournalEntry(83437)
EraseJournalEntry(83443)
EscapeArea()
~ SOLVED_JOURNAL #88925 /* ~Recovering 'Soultaker'

I have overcome the strange cult of the tanar'ri, and have slain the demon itself.  His business in Ulgoth's Beard concluded, Hurgan departed.~ */ EXIT
END
