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

BEGIN ~_JOIA~

IF ~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #78494 /* ~Hey there, you're new here, aren't you? Could I trouble you a moment?~ */
  IF ~~ THEN REPLY #78495 /* ~Tell me what do you need, but make it quick!~ */ GOTO 1
  IF ~~ THEN REPLY #78496 /* ~Leave me be.~ */ GOTO 2
  IF ~~ THEN REPLY #78497 /* ~Certainly, m'lady. Speak your mind.~ */ GOTO 3
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #78498 /* ~Yeah, I think you'll do fine. I need someone to go club some heads for me. I was ambushed by a band o' Hobgoblins within sight of this Inn's walls. Robbed me blind, they did, and I want to return the favor. I don't care about most of my things, but I want to get my ring back. My father gave it to me, you understand?~ */
  IF ~~ THEN REPLY #78499 /* ~I ain't got the time for this.~ */ GOTO 2
  IF ~~ THEN REPLY #26711 /* ~I will do as you ask.~ */ GOTO 4
  IF ~~ THEN REPLY #78500 /* ~What is in it for me?~ */ GOTO 5
  IF ~Global("X#ImoenJoia1","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#ImoenJoia1","GLOBAL",1)~ EXTERN ~_IMOEN2~ 139
END

IF ~~ THEN BEGIN 2 // from: 5.1 3.1 1.0 0.1 _IMOEN2:140.1 _IMOEN2:139.0
  SAY #78501 /* ~As you will. I'll find help elsewhere.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 0.2
  SAY #78502 /* ~Such manners! Well, I need a gruff hand for this task, so keep your "please and thank you" garbage for the nobles. I was robbed blind by some hobgoblins within sight of this very Inn's walls, and I need you to return the favor. They took my ring, and that's all I want back. Will you do it?~ */
  IF ~~ THEN REPLY #33657 /* ~I will help you.~ */ GOTO 4
  IF ~~ THEN REPLY #43228 /* ~I have no time to help you.~ */ GOTO 2
  IF ~~ THEN REPLY #78503 /* ~What is in this for me?~ */ GOTO 5
  IF ~Global("X#ImoenJoia2","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#ImoenJoia2","GLOBAL",1)~ EXTERN ~_IMOEN2~ 140
END

IF ~~ THEN BEGIN 4 // from: 5.0 3.0 1.1 _IMOEN2:140.0 _IMOEN2:139.1
  SAY #78504 /* ~I thank you. The creatures were just north of the Inn. I swear I could almost see them from the upper rooms. Bring my ring back here when you get it. You'll know it when you see it. It's a flamedance ring, and very striking.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #78505 /* ~Joia's flamedance ring

I am to return a ring to Joia in the Friendly Arm Inn. It is a flamedance ring, and was stolen by some hobgoblins just north of the inn.~ */ EXIT
  IF ~Global("X#GarJoi","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarJoi","GLOBAL",1)~ EXTERN ~_GARRIJ~ 81
END

IF ~~ THEN BEGIN 5 // from: 3.2 1.2 _IMOEN2:140.2 _IMOEN2:139.2
  SAY #78506 /* ~Hmm? Nothing. I have no gold to give you. I was just robbed, remember? You'll be doing it out of the goodness of your heart.~ */
  IF ~~ THEN REPLY #78507 /* ~I will do this for you.~ */ GOTO 4
  IF ~~ THEN REPLY #78508 /* ~I won't do it without payment.~ */ GOTO 2
END

IF ~!PartyHasItem("_INGJOIA")
~ THEN BEGIN 6 // from:
  SAY #78509 /* ~You don't have my ring yet? If you are not going to help me then don't keep coming back here.~ */
  IF ~~ THEN EXIT
END

IF ~PartyHasItem("_INGJOIA")
~ THEN BEGIN 7 // from:
  SAY #78510 /* ~I thank you. This ring was a gift when I set out on my own. Couldn't bear the thought of some smelly old hobgoblin having it. You are a good sort, and I'll say so to anyone that asks.~ */
  IF ~~ THEN DO ~AddexperienceParty(400)
ReputationInc(1)
TakePartyItem("_INGJOIA")
EraseJournalEntry(78505)
EscapeArea()
~ SOLVED_JOURNAL #78511 /* ~Joia's flamedance ring

I returned a flamedance ring to Joia in the Friendly Arm Inn. She was very appreciative, even if she had no gold to give me.~ */ EXIT
END
