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

BEGIN ~_AVARICE~

IF ~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from: 3.0
  SAY #83719 /* ~I am the warrior's curse
I steal his future
I mar his past
The more he has, the less it seems
He becomes a slave
Of glittering things~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #83721 /* ~Yet I hunger... Feed me that which glitters beyond all else.~ */
  IF ~~ THEN DO ~SetGlobal("Avarice","GLOBAL",1)
~ UNSOLVED_JOURNAL #83720 /* ~The four warders

A strange apparition appeared to me.  This is what it had to say:

I am the warrior's curse
I steal his future
I mar his past
The more he has, the less it seems
He becomes a slave
Of glittering things
Yet I hunger... Feed me that which glitters beyond all else.

I must pass these four warders to descend to the lower level.  I assume that one of them will have the wardstone required to operate this lift that they are guarding.  What glittering thing could this warder wish from me?  Gold?  A gem?  I must solve this riddle in order to pass.~ */ EXIT
END

IF ~PartyHasItem("_MISC1J")
~ THEN BEGIN 2 // from:
  SAY #83722 /* ~You have completed this riddle. I am AVARICE. I will bring doom upon you in this cursed place.~ */
  IF ~~ THEN DO ~TakePartyItem("_MISC1J")
SetGlobal("Avarice","GLOBAL",2)
AddexperienceParty(2000)
DestroySelf()
~ EXIT
  IF ~Global("X#XANAvarice2","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#XANAvarice2","GLOBAL",1)~ EXTERN ~_XANJ~ 111
END

IF ~Global("Avarice","GLOBAL",1)
!PartyHasItem("_MISC1J")
~ THEN BEGIN 3 // from:
  SAY #83724 /* ~You do not yet have what I require.~ */
  IF ~~ THEN GOTO 0
END

IF ~~ THEN BEGIN 4 // from:
  SAY #98464 /* ~You have found it.~ */
  IF ~~ THEN DO ~TakePartyItem("_MISC1J")
SetGlobal("Avarice","GLOBAL",2)
AddexperienceParty(2000)
DestroySelf()
~ EXIT
END
