// creator  : weidu.exe (version 23600)
// argument : MENDA2.DLG
// game     : .
// source   : ./DATA/DIALOG.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~MENDA2~

IF ~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #20875 /* ~All is ready, friends. I pay for boat and I give copy of sea charts to you.~ */
  IF ~~ THEN DO ~GiveItem("misc1c",Player1)
SetGlobal("TalkedToMendas","GLOBAL",4)
~ UNSOLVED_JOURNAL #27262 /* ~The Reclusive Scholar
Mendas copied sea charts and hired a boat for us. He awaits our arrival at the docks in Ulgoth's Beard.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #20876 /* ~I have bought boat to use. It has food and water for journey. Everything is ready. You go now?~ */
  IF ~~ THEN REPLY #20877 /* ~We need more time to prepare. Be patient.~ */ GOTO 2
  IF ~~ THEN REPLY #20878 /* ~Let us leave immediately.~ */ GOTO 3
  IF ~  ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #20879 /* ~We have decided not to go on your little excursion after all. Sorry.~ */ GOTO 4
  IF ~  ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #20880 /* ~To the Pits with your stupid quest!~ */ GOTO 5
END

IF ~~ THEN BEGIN 2 // from: 7.1 1.0
  SAY #20888 /* ~I be here when you are ready.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from: 7.0 6.0 4.1 1.1
  SAY #20889 /* ~Most excellent, heroes. May gods grant you speedy journey. I will await your return at my house here in Ulgoth's Beard. Go well!~ */
  IF ~~ THEN DO ~ActionOverride(Player1,LeaveAreaLUAPanic("AR2000","",[4747.3515],E))
ActionOverride(Player1,LeaveAreaLUA("AR2000","",[4747.3515],E))
ActionOverride(Player2,LeaveAreaLUA("AR2000","",[4672.3546],E))
ActionOverride(Player3,LeaveAreaLUA("AR2000","",[4614.3561],E))
ActionOverride(Player4,LeaveAreaLUA("AR2000","",[4545.3524],E))
ActionOverride(Player5,LeaveAreaLUA("AR2000","",[4534.3588],E))
ActionOverride(Player6,LeaveAreaLUA("AR2000","",[4473.3586],E))
~ EXIT
END

IF ~~ THEN BEGIN 4 // from: 1.2
  SAY #20890 /* ~Pay is not enough, perhaps. I will offer 3,000 more gold for noble heroes.~ */
  IF ~~ THEN REPLY #20894 /* ~I'm sorry. We're just not interested.~ */ GOTO 5
  IF ~~ THEN REPLY #20895 /* ~Yes, that will do nicely, thank you. Let us depart.~ */ DO ~GiveGoldForce(3000)
~ GOTO 3
  IF ~~ THEN REPLY #20896 /* ~That almost convinces me.~ */ GOTO 5
  IF ~~ THEN REPLY #20897 /* ~It will be a very arduous journey. Offer me a bit more and you have a deal.~ */ GOTO 6
END

IF ~~ THEN BEGIN 5 // from: 7.2 6.1 4.2 4.0 1.3
  SAY #20891 /* ~Please reconsider, good people. The quest is very important. I wait here for the change of your minds.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToMendas","GLOBAL",4)
~ EXIT
END

IF ~~ THEN BEGIN 6 // from: 4.3
  SAY #20892 /* ~4,000, then. It is as far as I can go.~ */
  IF ~~ THEN REPLY #22153 /* ~Then we will accept. Let us begin the journey.~ */ DO ~GiveGoldForce(4000)
~ GOTO 3
  IF ~~ THEN REPLY #22154 /* ~It is not enough. Good day.~ */ GOTO 5
END

IF ~  Global("TalkedToMendas","GLOBAL",4)
~ THEN BEGIN 7 // from:
  SAY #20893 /* ~You will go on journey now?~ */
  IF ~~ THEN REPLY #20898 /* ~We are ready to go now.~ */ GOTO 3
  IF ~~ THEN REPLY #20899 /* ~Not right now. We need some more time.~ */ GOTO 2
  IF ~~ THEN REPLY #20900 /* ~I am no longer interested in your journey.~ */ GOTO 5
  IF ~~ THEN REPLY #20902 /* ~~ */ EXIT
END
