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

BEGIN ~CORDYR~

IF ~  ReputationGT(LastTalkedToBy,14)
Global("HelpCordyr","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #15187 /* ~Pleasure to meet you. The name's Cordyr.~ */
  IF ~~ THEN EXIT
END

IF ~  Global("HelpCordyr","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #15188 /* ~Hi. The name's Cordyr. I'm from down south, where the Cloud Peaks tumble into the sea. A pair of sirines has been trying to move into the area. They sank my fishing boat and put me right out of work. *sigh* If they weren't so dang beautiful, it would be a lot easier to convince people of how much of a nuisance they can be.~ */
  IF ~~ THEN DO ~SetGlobal("HelpCordyr","GLOBAL",1)
~ UNSOLVED_JOURNAL #26919 /* ~Cordyr and the Sirines
A fisherman named Cordyr tells of a pair of sirines in his fishing grounds, near where the Cloud Peaks meet the sea.~ */ EXIT
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("safana")
InMyArea("safana")
!StateCheck("safana",CD_STATE_NOTVALID)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~CORANJ~ 298
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("safana")
InMyArea("safana")
!StateCheck("safana",CD_STATE_NOTVALID)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~SAFANJ~ 38
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~CORANJ~ 300
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~JAHEIJ~ 315
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~FALDOJ~ 125
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~EDWINJ~ 143
  IF ~Global("X#CORDYR1","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#CORDYR1","GLOBAL",1)~ EXTERN ~VICONJ~ 163
END

IF ~  !Dead("Sil")
Global("HelpCordyr","GLOBAL",1)
~ THEN BEGIN 2 // from:
  SAY #15199 /* ~You don't have the heart, do you...? It's all right, I know where you're coming from. I couldn't do it myself.~ */
  IF ~~ THEN EXIT
END

IF ~  Global("HelpCordyr","GLOBAL",1)
ReputationLT(LastTalkedToBy,8)
~ THEN BEGIN 3 // from:
  SAY #15200 /* ~You did it, huh? I've got to admit you have a steelier heart than I'd ever want. Here, take this flame arrow scroll. Should have given it to you before, I suppose, but I really didn't think you would survive. Ah well. Better late than never?~ */
  IF ~~ THEN DO ~EraseJournalEntry(26919)
GiveItem("SCRL1F",LastTalkedToBy)
AddexperienceParty(1000)
SetGlobal("HelpCordyr","GLOBAL",2)
~ SOLVED_JOURNAL #26920 /* ~Cordyr and the Sirines
Glad that I dealt with the sirines encroaching on Cordyr's fishing grounds, the fisherman rewarded me with a magic scroll.~ */ EXIT
END

IF ~  Global("HelpCordyr","GLOBAL",1)
~ THEN BEGIN 4 // from:
  SAY #15201 /* ~Thanks for your help. It's a dirty deed but it's the cost of civilization, isn't it? Here, take this haste scroll as payment. I probably should have given it to you before, but I didn't think you would survive. Better late than never?~ */
  IF ~~ THEN DO ~EraseJournalEntry(26919)
GiveItem("SCRL1H",LastTalkedToBy)
AddexperienceParty(1000)
SetGlobal("HelpCordyr","GLOBAL",2)
~ SOLVED_JOURNAL #26920 /* ~Cordyr and the Sirines
Glad that I dealt with the sirines encroaching on Cordyr's fishing grounds, the fisherman rewarded me with a magic scroll.~ */ EXIT
END

IF ~  False()
~ THEN BEGIN 5 // from:
  SAY #15202 /* ~I'm no fighter, friend.~ */
  IF ~~ THEN EXIT
END

IF ~  True()
~ THEN BEGIN 6 // from:
  SAY #15203 /* ~If you find a great deal on a fishing boat, let me know.~ */
  IF ~~ THEN EXIT
END
