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

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

IF WEIGHT #1 /* Triggers after states #: 7 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #5120 /* ~Please wait a moment, kind <SIRMAAM>! You must forgive me for my appearance, but I've been wandering the wilderness for more than a week now. You've got to help me! My friend is badly hurt, and he might die if he doesn't get assistance soon. Please, help me.~ */
  IF ~~ THEN REPLY #5121 /* ~Sorry lady, but we don't have the time for this.~ */ EXIT
  IF ~~ THEN REPLY #5122 /* ~What is the name of this friend of yours?~ */ GOTO 1
  IF ~~ THEN REPLY #5123 /* ~Take us to this friend, we're always ready to aid a lady in distress.~ */ GOTO 2
  IF ~Global("X#SHARTEELENA1","GLOBAL",0)
InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#SHARTEELENA1","GLOBAL",1)~ EXTERN ~SHARTJ~ 104
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #5124 /* ~His name is Sam—Samuel. Will you help me, <SIRMAAM>?~ */
  IF ~~ THEN REPLY #5125 /* ~Yes, we can. Where is this Samuel?~ */ GOTO 2
  IF ~~ THEN REPLY #5126 /* ~Sorry, but it's time for us to leave.~ */ EXIT
  IF ~Global("X#VicLena","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VicLena","GLOBAL",1)~ EXTERN ~VICONJ~ 117
END

IF ~~ THEN BEGIN 2 // from: 1.0 0.2
  SAY #5127 /* ~This is him right here on the ground.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #5128 /* ~This is Samuel. He's so sick right now. *sob* I don't know how much longer he has to live. Could you take him to the Friendly Arm Inn? If you were to take him to Gellana Mirrorshade at the Temple of Wisdom, she'd help him. Please, can you do this?~ */
  IF ~~ THEN REPLY #5129 /* ~Okay, okay! We'll take Samuel to the Temple of Wisdom at the Friendly Arm Inn.~ */ GOTO 5
  IF ~~ THEN REPLY #5130 /* ~We'll take him to the Temple of Wisdom, but only for a price.~ */ GOTO 4
  IF ~~ THEN REPLY #5131 /* ~Sorry, girl, we just don't have time for this.~ */ EXIT
  IF ~Global("X#LenaFaldorn1","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#LenaFaldorn1","GLOBAL",1)~ EXTERN ~FALDOJ~ 92
END

IF ~~ THEN BEGIN 4 // from: 3.1
  SAY #4997 /* ~All I have is this ring. Will it do? Here take it.~ */
  IF ~~ THEN REPLY #5001 /* ~Sorry wench, but the ring just doesn't cut it. We'll keep it for you though.~ */ DO ~GiveItem("RING13",LastTalkedToBy)
~ EXIT
  IF ~~ THEN REPLY #5003 /* ~Sure, the ring will do.~ */ DO ~GiveItem("RING13",LastTalkedToBy)
~ GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.1 3.0
  SAY #5132 /* ~Thank you, thank you so much. When you pick him up, be sure to be gentle. Please take him to the temple right away. I don't know how much longer he'll live.~ */
  IF ~~ THEN DO ~ActionOverride("Samuel",DestroySelf())
SetGlobalTimer("Samuel","GLOBAL",THREE_DAYS)
GiveItemCreate("MISC13",LastTalkedToBy,0,0,0)
EscapeArea()
~ UNSOLVED_JOURNAL #27086 /* ~Samuel and Lena
We have promised the woman Lena that we will take Samuel to the Temple of Wisdom at the Friendly Arm Inn.~ */ EXIT
  IF ~Global("X#AjantisLena","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AjantisLena","GLOBAL",1)~ EXTERN ~AJANTJ~ 71
END

IF WEIGHT #2 /* Triggers after states #: 7 even though they appear after this state */
~  True()
~ THEN BEGIN 6 // from:
  SAY #6287 /* ~Just leave me be.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 7 // from:
  SAY #6289 /* ~All I know is that my poor Samuel is going to die. Please friends, take him to the Temple of Wisdom in the Friendly Arm Inn. Please do this for me; here, take all of my money.~ */
  IF ~~ THEN DO ~GivePartyGold(1000000)
~ EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #46107 /* ~Thank you!~ */
  IF ~~ THEN DO ~ActionOverride("Samuel",DestroySelf())
SetGlobalTimer("Samuel","GLOBAL",THREE_DAYS)
GiveItemCreate("MISC13",LastTalkedToBy,0,0,0)
EscapeArea()
~ UNSOLVED_JOURNAL #27086 /* ~Samuel and Lena
We have promised the woman Lena that we will take Samuel to the Temple of Wisdom at the Friendly Arm Inn.~ */ EXIT
END
