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

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

IF ~~ THEN BEGIN 0 // from:
  SAY #85539 /* ~Jeb's right!  It's only a matter of time before we're... we're...~ */
  IF ~~ THEN EXTERN ~_SONNER~ 0
END

IF ~~ THEN BEGIN 1 // from:
  SAY #85540 /* ~It's that bitch of Umberlee!  She's the one!~ */
  IF ~~ THEN EXTERN ~_SONNER~ 4
END

IF ~~ THEN BEGIN 2 // from: _SONNER:6.0
  SAY #85541 /* ~Another 20 gold!  That's fair, isn't it?!~ */
  IF ~~ THEN REPLY #85542 /* ~Perhaps I shall after all.~ */ DO ~IncrementGlobal("FisherPrice","GLOBAL",20)
~ EXTERN ~_SONNER~ 5
  IF ~~ THEN REPLY #85543 /* ~I've made my decision. Now get someone else.~ */ EXTERN ~_JEBADO~ 4
END

IF WEIGHT #4 /* Triggers after states #: 8 10 11 12 even though they appear after this state */
~Global("HelpJebadoh","GLOBAL",1)
~ THEN BEGIN 3 // from: _SONNER:26.0
  SAY #85545 /* ~Have you done it?!  Have you killed the bitch?~ */
  IF ~Dead("tenya")
~ THEN REPLY #6407 /* ~She will trouble you no more.~ */ GOTO 7
  IF ~Global("ReturnedToTelman","GLOBAL",0)
Global("TenyaStory","GLOBAL",1)
~ THEN REPLY #85546 /* ~This... priestess had much to say about the group of you.~ */ DO ~SetGlobal("ReturnedToTelman","GLOBAL",1)
~ GOTO 4
  IF ~Global("ReturnedToTelman","GLOBAL",0)
Global("TenyaStory","GLOBAL",1)
~ THEN REPLY #85547 /* ~She's more powerful than you said, But if you sweeten our deal...~ */ DO ~SetGlobal("ReturnedToTelman","GLOBAL",1)
~ GOTO 5
  IF ~~ THEN REPLY #85549 /* ~I'll have no more part in this!  I don't trust any of you!~ */ EXTERN ~_SONNER~ 8
  IF ~~ THEN REPLY #85550 /* ~No, we haven't killed her yet.~ */ GOTO 14
END

IF ~~ THEN BEGIN 4 // from: 3.1
  SAY #85551 /* ~She knows we sent you?  Damn it, she'll kill us all for...~ */
  IF ~~ THEN EXTERN ~_SONNER~ 11
  IF ~Global("X#JaTelman","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
!Dead("tenya")
~ THEN DO ~SetGlobal("X#JaTelman","GLOBAL",1)~ EXTERN ~_JAHEIJ~ 92
END

IF ~~ THEN BEGIN 5 // from: 3.2
  SAY #85552 /* ~By Talos, 50 gold more!!  Just go DO IT!~ */
  IF ~~ THEN EXTERN ~_JEBADO~ 5
END

IF ~~ THEN BEGIN 6 // from: _SONNER:12.1 _SONNER:11.1
  SAY #85553 /* ~Well that's it then!  The jig's up isn't it?~ */
  IF ~~ THEN EXTERN ~_JEBADO~ 6
END

IF ~~ THEN BEGIN 7 // from: 3.0
  SAY #85554 /* ~Talos be praised, at last I can sleep well again.~ */
  IF ~~ THEN EXTERN ~_SONNER~ 18
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 8 // from:
  SAY #85555 /* ~Lately, a young priestess of Umberlee has been causin' me and my friends a lot of trouble.  Seems she wants revenge against us for killing her mother.  Well, we had to.  A Talos priest promised his favor upon us if we did.  Caught between gods, we are.  You are as well.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #85556 /* ~Leave me alone!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~NumberOfTimesTalkedTo(0)
ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN BEGIN 10 // from:
  SAY #85557 /* ~Damn it Jebadoh, we can't go on like this forever!  There is no way we can keep quotas up when we're afraid to come near the nets... excuse me who are you?~ */
  IF ~~ THEN DO ~ActionOverride("jebadoh",SetNumTimesTalkedTo(1))
ActionOverride("sonner",SetNumTimesTalkedTo(1))
~ EXTERN ~_JEBADO~ 0
END

IF WEIGHT #2 ~NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN BEGIN 11 // from:
  SAY #85557 /* ~Damn it Jebadoh, we can't go on like this forever!  There is no way we can keep quotas up when we're afraid to come near the nets... excuse me who are you?~ */
  IF ~~ THEN DO ~ActionOverride("jebadoh",SetNumTimesTalkedTo(1))
ActionOverride("sonner",SetNumTimesTalkedTo(1))
~ EXTERN ~_JEBADO~ 1
END

IF WEIGHT #3 ~NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN BEGIN 12 // from:
  SAY #85557 /* ~Damn it Jebadoh, we can't go on like this forever!  There is no way we can keep quotas up when we're afraid to come near the nets... excuse me who are you?~ */
  IF ~~ THEN DO ~ActionOverride("jebadoh",SetNumTimesTalkedTo(1))
ActionOverride("sonner",SetNumTimesTalkedTo(1))
~ EXTERN ~_JEBADO~ 2
END

IF WEIGHT #5 ~Global("HelpJebadoh","GLOBAL",2)
~ THEN BEGIN 13 // from:
  SAY #85558 /* ~What do ya want?~ */
  IF ~~ THEN EXTERN ~_SONNER~ 9
END

IF ~~ THEN BEGIN 14 // from: 3.4
  SAY #85559 /* ~Well come back when you have.~ */
  IF ~~ THEN EXIT
END
