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

BEGIN ~_FAHRIN~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #2 /* Triggers after states #: 5 6 even though they appear after this state */
~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #74538 /* ~I don't talk to people with bad karma.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 1 // from:
  SAY #74539 /* ~A tasloi has stolen my scroll of wisdom, wanderer, and fled to the east. If you could retrieve it for me, your karma shall exceed your wildest expectations.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #74540 /* ~Fahrington's scroll

Fahrington, a strange druid in the Wood of Sharp Teeth, has had his scroll of wisdom stolen by a tasloi heading east.  I felt sorry for the poor man, as he does seem to be in desperate need of it.~ */ EXIT
  IF ~Global("X#FALDORNFAHRINGTON1","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FALDORNFAHRINGTON1","GLOBAL",1)~ EXTERN ~_FALDOJ~ 98
END

IF WEIGHT #3 /* Triggers after states #: 5 6 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 2 // from:
  SAY #74541 /* ~A tasloi has stolen my scroll of wisdom, wanderer, and fled eastward towards the ettercap's lair. The poor tasloi is probably quite dead by now but the ettercaps, of course, will not recognize the scroll's value. If you could retrieve it for me, I promise to brighten your karma.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #74542 /* ~Fahrington's scroll

Fahrington, a strange druid in the Wood of Sharp Teeth, has had his scroll of wisdom stolen.  He appears to know the area well, and suspects that it has fallen into the claws of an ettercap to the east.~ */ EXIT
  IF ~Global("X#FALDORNFAHRINGTON2","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FALDORNFAHRINGTON2","GLOBAL",1)~ EXTERN ~_FALDOJ~ 99
END

IF WEIGHT #5 /* Triggers after states #: 4 5 6 even though they appear after this state */
~Global("HelpFahrington","GLOBAL",0)
!PartyHasItem("_SCRL12")
~ THEN BEGIN 3 // from:
  SAY #74543 /* ~I have no patience for your karmic flouting. Find my scroll and we shall connect then, wanderer.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 5 6 even though they appear after this state */
~Global("HelpFahrington","GLOBAL",0)
PartyHasItem("_SCRL12")
~ THEN BEGIN 4 // from:
  SAY #74544 /* ~Ah, my scroll. Take it with you, wanderer. It will increase your karmic essence.~ */
  IF ~~ THEN DO ~AddexperienceParty(300)
SetGlobal("HelpFahrington","GLOBAL",1)
EraseJournalEntry(74540)
EraseJournalEntry(74542)
~ SOLVED_JOURNAL #88916 /* ~Fahrington's scroll

I recovered Fahrington's scroll, and he gifted it to me, saying it would increase my "karmic essence."  I wonder what it does...~ */ EXIT
END

IF WEIGHT #0 ~False()
~ THEN BEGIN 5 // from:
  SAY #74545 /* ~That would be bad for your karma.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 6 // from:
  SAY #74546 /* ~Let me help you find your spiritual self and brighten your karmic essence before the gods...~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 ~True()
~ THEN BEGIN 7 // from:
  SAY #74547 /* ~Has your aura grown in wisdom, lately?~ */
  IF ~~ THEN EXIT
END
