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

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

IF WEIGHT #4 /* Triggers after states #: 5 6 7 9 even though they appear after this state */
~  ReputationLT(LastTalkedToBy,8)
NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #14843 /* ~Ah, I sense rogues. As a member of the Most Noble Order of the Radiant Heart, it is my duty to clear the wilderness of such as you. Raise your weapons, and let us do battle!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
  IF ~Global("X#VicLau","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VicLau","GLOBAL",1)~ EXTERN ~VICONJ~ 116
END

IF WEIGHT #5 /* Triggers after states #: 5 6 7 9 even though they appear after this state */
~  ReputationLT(LastTalkedToBy,15)
ReputationGT(LastTalkedToBy,7)
NumberOfTimesTalkedTo(0)
~ THEN BEGIN 1 // from:
  SAY #14844 /* ~Ah, travelers, this wilderness is too expansive to keep clear of monsters all on my own. Many gibberlings pass through this very spot day and night. Will you stay here and help fend them off?~ */
  IF ~~ THEN REPLY #14883 /* ~Yes, we would gladly join you for a while.~ */ GOTO 3
  IF ~~ THEN REPLY #14884 /* ~No, thank you. A herd of gibberlings shouldn't be too much for an experienced paladin such as yourself.~ */ GOTO 4
END

IF WEIGHT #6 /* Triggers after states #: 5 6 7 9 even though they appear after this state */
~  ReputationGT(LastTalkedToBy,14)
NumberOfTimesTalkedTo(0)
~ THEN BEGIN 2 // from:
  SAY #14845 /* ~Ah, I sense a party of adventurers that seeks to do good in the world. How would you like to fend off a herd of gibberlings?~ */
  IF ~~ THEN REPLY #14886 /* ~Yes, we would gladly join you for a while.~ */ GOTO 8
  IF ~~ THEN REPLY #14885 /* ~No, thank you. A herd of gibberlings shouldn't be too much for an experienced paladin such as yourself.~ */ GOTO 4
END

IF ~~ THEN BEGIN 3 // from: 1.0
  SAY #14846 /* ~Wonderful. The gibberlings should be coming soon. You should prepare yourselves.~ */
  IF ~~ THEN DO ~SetInterrupt(FALSE)
Wait(3)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
SetNumTimesTalkedTo(10)
SetInterrupt(TRUE)
~ UNSOLVED_JOURNAL #27237 /* ~The Gibberling Hordes
At the invitation of a paladin named Laurel, I am to assist in this region's ongoing battle against the gibberling hordes.~ */ EXIT
END

IF ~~ THEN BEGIN 4 // from: 2.1 1.1
  SAY #14847 /* ~Aye, you are right. I have held them off nightly for two weeks straight, now. Have a safe journey, friends.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF WEIGHT #0 ~  False()
~ THEN BEGIN 5 // from:
  SAY #14848 /* ~I have held off swarms of gibberlings and have uprooted dens of evil all my life. You are little match for me, friends.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 6 // from:
  SAY #14849 /* ~I can tell you little beyond what you must already know: There is something evil in this land and it is growing.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~  CombatCounter(0)
NumberOfTimesTalkedTo(10)
~ THEN BEGIN 7 // from:
  SAY #14850 /* ~Gibberlings are a plague that must be wiped from the Sword Coast. Perhaps we will meet again.~ */
  IF ~~ THEN DO ~AddexperienceParty(250)
SetGlobal("HelpLaurel","GLOBAL",1)
EraseJournalEntry(27237)
EraseJournalEntry(27238)
EscapeArea()
~ SOLVED_JOURNAL #27239 /* ~The Gibberling Hordes
Laurel has introduced us to a most fascinating sport: gibberling hunting. We'll have to rest up and re-arm, but I dare say we shall visit her again.~ */ EXIT
  IF ~Global("X#AjantisLaurel","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AjantisLaurel","GLOBAL",1)~ EXTERN ~AJANTJ~ 68
END

IF ~~ THEN BEGIN 8 // from: 2.0
  SAY #14887 /* ~Wonderful. You should prepare yourselves. Fire magics work well against the gibberlings, so if you have such spells, use them.~ */
  IF ~~ THEN DO ~SetInterrupt(FALSE)
Wait(3)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
CreateCreatureOffScreen("gibber",S)
SetNumTimesTalkedTo(10)
SetInterrupt(TRUE)
~ UNSOLVED_JOURNAL #27238 /* ~The Gibberling Hordes
At the invitation of a paladin named Laurel, I am to assist in this region's ongoing battle against the gibberling hordes. At her suggestion, I will prepare as much fire magic as possible, as it is said the beasts fear flames above all else.~ */ EXIT
END

IF WEIGHT #3 ~  NumberOfTimesTalkedTo(11)
~ THEN BEGIN 9 // from:
  SAY #20611 /* ~There are other things that I must now turn my attention to. Goodbye.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 10 // from:
  SAY #46102 /* ~Helm go with you.~ */
  IF ~~ THEN DO ~AddexperienceParty(250)
SetGlobal("HelpLaurel","GLOBAL",1)
EraseJournalEntry(27237)
EraseJournalEntry(27238)
EscapeArea()
~ SOLVED_JOURNAL #27239 /* ~The Gibberling Hordes
Laurel has introduced us to a most fascinating sport: gibberling hunting. We'll have to rest up and re-arm, but I dare say we shall visit her again.~ */ EXIT
END

IF ~~ THEN BEGIN 11 // from:
  SAY #47436 /* ~My faith protects me!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END
