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

BEGIN ~GERDE~

IF ~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #15163 /* ~You've come here to fight ankhegs? Well, listen up: it's mating season, so it's primarily females coming up to the surface, looking to put on a little extra weight. They're hungry, they're aggressive, and there are a lot of them. Now, the point of this exercise is not to exterminate them, but to keep their population to a manageable level. Remember, they aerate the soil and thereby improve crop yields by as much as 15%. Food is going to be scarce enough in the next few years, so keep that in mind when you're out there. No more than four ankhegs per party. After that it's catch and release, all right? Most of the activity starts about fifty yards to the east. Now move out, everyone. I'll keep an eye on things from here.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27125 /* ~Ankheg Culling
I am assisting the ranger, Gerde, in her attempt to manage the ankheg population on the plains south of Baldur's Gate. From where I stand at her side, I can see them swarming, coming to the surface roughly fifty yards to our left. On Gerde's instructions, however, I am not to exceed my quota of four kills.~ */ EXIT
  IF ~Global("X#GERDE0","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GERDE0","GLOBAL",1)~ EXTERN ~JAHEIJ~ 349
  IF ~Global("X#GERDE0","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GERDE0","GLOBAL",1)~ EXTERN ~FALDOJ~ 142
  IF ~Global("X#GERDE0","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GERDE0","GLOBAL",1)~ GOTO 6
  IF ~Global("X#GERDE0","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GERDE0","GLOBAL",1)~ EXTERN ~KIVANJ~ 344
  IF ~Global("X#GERDE0","GLOBAL",0)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GERDE0","GLOBAL",1)~ EXTERN ~CORANJ~ 556
END

IF ~  Global("HelpGerde","GLOBAL",1)
GlobalLT("AnkhKills","GLOBAL",5)
~ THEN BEGIN 1 // from:
  SAY #15164 /* ~Good work, and I'll trust that you stuck to the quota. Here is 75 gold pieces. Go find yourself a room in the city and rest up. You've earned it.~ */
  IF ~~ THEN DO ~SetGlobal("HelpGerde","GLOBAL",2)
GiveGoldForce(75)
EraseJournalEntry(27125)
EraseJournalEntry(27076)
EscapeArea()
~ SOLVED_JOURNAL #27126 /* ~Ankheg Culling
Ankhegs are tough to kill, but Gerde's reward of 75 gold pieces is welcome.~ */ EXIT
END

IF ~  Global("HelpGerde","GLOBAL",0)
GlobalLT("AnkhKills","GLOBAL",5)
~ THEN BEGIN 2 // from:
  SAY #15165 /* ~Can't stomach the action, can you? That's all right, there are plenty more who will take your place.~ */
  IF ~~ THEN EXIT
END

IF ~  !GlobalLT("AnkhKills","GLOBAL",5)
~ THEN BEGIN 3 // from:
  SAY #15166 /* ~I said a quota of four per party! Get out of here and watch your back because I report all poachers to the Flaming Fist. Damned hammer-happy fools.~ */
  IF ~~ THEN DO ~EraseJournalEntry(27125)
EraseJournalEntry(27076)
DialogueInterrupt(FALSE)
EscapeArea()
~ EXIT
END

IF ~  False()
~ THEN BEGIN 4 // from:
  SAY #15167 /* ~You want to mess with the Department of Natural Affairs, do you? You're either very brave or very stupid.~ */
  IF ~~ THEN EXIT
END

IF ~  GlobalLT("AnkhKills","GLOBAL",5)
~ THEN BEGIN 5 // from:
  SAY #15168 /* ~The ankheg population appears to have stabilized in this region. I'll continue to monitor them, however, until they go into hibernation for the winter.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from: 0.3
  SAY #49943 /* ~May Shaundakul guide you, friend.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27125 /* ~Ankheg Culling
I am assisting the ranger, Gerde, in her attempt to manage the ankheg population on the plains south of Baldur's Gate. From where I stand at her side, I can see them swarming, coming to the surface roughly fifty yards to our left. On Gerde's instructions, however, I am not to exceed my quota of four kills.~ */ EXIT
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 351
  IF ~  InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN EXTERN ~FALDOJ~ 143
END

IF ~~ THEN BEGIN 7 // from: KIVANJ:344.3
  SAY #49943 /* ~May Shaundakul guide you, friend.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27125 /* ~Ankheg Culling
I am assisting the ranger, Gerde, in her attempt to manage the ankheg population on the plains south of Baldur's Gate. From where I stand at her side, I can see them swarming, coming to the surface roughly fifty yards to our left. On Gerde's instructions, however, I am not to exceed my quota of four kills.~ */ EXIT
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 352
  IF ~  InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN EXTERN ~FALDOJ~ 144
END

IF ~~ THEN BEGIN 8 // from: KIVANJ:345.3
  SAY #49943 /* ~May Shaundakul guide you, friend.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27125 /* ~Ankheg Culling
I am assisting the ranger, Gerde, in her attempt to manage the ankheg population on the plains south of Baldur's Gate. From where I stand at her side, I can see them swarming, coming to the surface roughly fifty yards to our left. On Gerde's instructions, however, I am not to exceed my quota of four kills.~ */ EXIT
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 353
  IF ~  InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN EXTERN ~FALDOJ~ 145
END
