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

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

IF WEIGHT #0 ~  ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #15169 /* ~There be pheasants and penguins and booberry trees between the greenest of skies and the whitest of seas (wertle, wertle, wertle, wooo, wertle-wooooo...).~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 2 3 4 even though they appear after this state */
~  Global("HelpArcand","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #15170 /* ~Popple the Rock took stock of the lock and thought he was better off darning his sock (wertle-woo, wertle, wertle, woo-wertle, wooooo...).~ */
  IF ~~ THEN EXIT
  IF ~Global("X#VicArcand","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VicArcand","GLOBAL",1)~ EXTERN ~VICONJ~ 85
END

IF WEIGHT #1 ~  ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
NumberOfTimesTalkedTo(0)
~ THEN BEGIN 2 // from:
  SAY #15171 /* ~I like you, yes I do (wertle, wertle, wertle, wooo...) and I know of a way to make you like me too (wertle, wertle, wertle-wooooo...). Down by the ocean, down by the sea, there's a pirate ship waiting for you and for me. Bring me what's in it, but don't ever wear it, or sure enough, soon enough, you'll wertle too...~ */
  IF ~~ THEN UNSOLVED_JOURNAL #26848 /* ~Arcand the Mad
I encountered an old sage who goes by the entirely justified name of Mad Arcand. Through the froth of his insanity, some interesting clues have surfaced, however. He claims there is a ship along the shoreline containing something of value. He has asked, in his way, that I return this mysterious item to him, making sure not to use it in the interim. For all his apparent madness, however, I cannot help but be suspicious of this strange man.~ */ EXIT
END

IF WEIGHT #2 ~  PartyHasItem("RING23")
Global("HelpArcand","GLOBAL",0)
~ THEN BEGIN 3 // from:
  SAY #15172 /* ~What a beautiful ring! Where'er did you get it? (Most likely quite near where exactly I put it...) Wertle, oh wertle, oh dear wertle-wooo... wertle, oh wertle, oh woo... Oh, I know what you're thinking of Mad Arcand the Stinking who takes what you give him and gives not in return. So here, take this bottle, but please don't unstopple or (wertle, poor wertle), you'll surely get burned.~ */
  IF ~~ THEN DO ~EraseJournalEntry(26848)
AddexperienceParty(300)
GiveItem("POTN13",LastTalkedToBy)
TakePartyItem("RING23")
SetGlobal("HelpArcand","GLOBAL",1)
~ SOLVED_JOURNAL #26849 /* ~Arcand the Mad
Oh Mad, Mad Arcand with your crumbling mind, your dizzying ditties are more cryptic than kind. But thanks for this bottle, whate'er it might be. Oh I'm tempted, so tempted to look in and see... but you've warned me against it and to your words I'll stay true, at least so long as I'm wanting to.~ */ EXIT
END

IF WEIGHT #3 ~  False()
~ THEN BEGIN 4 // from:
  SAY #15173 /* ~Bad wertle, dumb wertle, wrong wertle-wooo, why do you do all the things that you do?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 ~  True()
~ THEN BEGIN 5 // from:
  SAY #15174 /* ~Ah, my wise wertle, how do you do? Mad Arcand the Simple has been missing you. (Wertle, oh wertle, oh dear wertle-wooooo...)~ */
  IF ~~ THEN EXIT
END
