// creator  : weidu.exe (version 23600)
// argument : BELDIN.DLG
// game     : .
// source   : ./override/BELDIN.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~BELDIN~

IF ~  Global("X#KivanBeldin","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #17170 /* ~They're coming— The yipping demons, they're everywhere! Save me!~ */
  IF ~~ THEN REPLY #17171 /* ~Don't be foolish, I've never heard of a yipping demon.~ */ GOTO 1
  IF ~~ THEN REPLY #17172 /* ~Never fear, we shall protect you from any harm!~ */ GOTO 1
  IF ~~ THEN REPLY #17173 /* ~Demons?!~ */ GOTO 1
  IF ~~ THEN REPLY #17174 /* ~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 #17176 /* ~But I— There they are! There they—~ */
  IF ~~ THEN DO ~CreateCreature("KOBOLDAB",[2227.2390],S)
CreateCreature("KOBOLDAB",[2227.2390],S)
CreateCreature("KOBOLDAB",[2227.2390],S)
CreateCreature("KOBOLDAB",[2227.2390],S)
EraseJournalEntry(31445)
AddJournalEntry(31445,QUEST_DONE)
AddJournalEntry(31446,QUEST)
EscapeArea()
~ EXIT
  IF ~  InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
Global("X#KivanBeldin","GLOBAL",0)
~ THEN EXTERN ~KIVANJ~ 240
END

IF ~  Global("X#KivanBeldin","GLOBAL",1)
~ THEN BEGIN 2 // from:
  SAY #45538 /* ~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 #45539 /* ~Then it is for your lady, my friend. Now go, before more of the 'demons' come.~ */ DO ~SetGlobal("X#KivanBeldin","GLOBAL",2)
~ EXTERN ~KIVANJ~ 206
  IF ~~ THEN REPLY #45540 /* ~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 #45541 /* ~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 #45543 /* ~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
