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

BEGIN ~_BELDIN~

IF ~  Global("X#KivanBeldin","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #77369 /* ~They're coming... The yipping demons, they're everywhere! Save me!~ */
  IF ~~ THEN REPLY #77370 /* ~Don't be foolish; I've never heard of a yipping demon.~ */ GOTO 1
  IF ~~ THEN REPLY #77371 /* ~Never fear; we shall protect you from any harm!~ */ GOTO 1
  IF ~~ THEN REPLY #77372 /* ~Demons?!?~ */ GOTO 1
  IF ~~ THEN REPLY #77373 /* ~Please, just calm down. Everything's going to be okay.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.3 0.2 0.1 0.0
  SAY #77374 /* ~But I... There they are! There they...~ */
  IF ~~ THEN DO ~CreateCreature("_OBOLDAB",[2227.2390],0)
CreateCreature("_OBOLDAB",[2227.2390],0)
CreateCreature("_OBOLDAB",[2227.2390],0)
CreateCreature("_OBOLDAB",[2227.2390],0)
EscapeArea()
~ EXIT
  IF ~  InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
Global("X#KivanBeldin","GLOBAL",0)
~ THEN EXTERN ~_KIVANJ~ 235
END

IF ~  Global("X#KivanBeldin","GLOBAL",1)
~ THEN BEGIN 2 // from:
  SAY #98891 /* ~Th-thank you, adventurers. I... I have found this gem when mining... was saving it for my lady, but... you gave me my life back, and I have nothing else to pay you for your bravery...~ */
  IF ~~ THEN REPLY #98892 /* ~Then it is for your lady, my friend. Now go, before more of the 'demons' come.~ */ DO ~SetGlobal("X#KivanBeldin","GLOBAL",2)
~ EXTERN ~_KIVANJ~ 201
  IF ~~ THEN REPLY #98893 /* ~But your life is a gift enough for her. Thank you for the gem.~ */ DO ~SetGlobal("X#KivanBeldin","GLOBAL",3)
GiveItemCreate("_MISC18",Player1,1,0,0)
ActionOverride("beldin",EscapeArea())
~ EXIT
  IF ~~ THEN REPLY #98894 /* ~Are you still here, coward? Get out of my sight, before I kill you myself. Heh, scared of kobolds!~ */ DO ~SetGlobal("X#KivanBeldin","GLOBAL",3)
ActionOverride("beldin",EscapeArea())
~ EXIT
END

IF ~~ THEN BEGIN 3 // from:
  SAY #98896 /* ~I will, Master Elf. I'll tell the guards and Master Emerson himself how brave you are. Hope you'll kill all the monsters down below quickly - a man has to earn his living.~ */
  IF ~~ THEN DO ~ReputationInc(1)
ActionOverride("beldin",EscapeArea())
~ EXIT
END
