BEGIN ACELASIA

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 0
SAY @0
++ @1 + 1
IF ~Global("ACBORKPLOT","GLOBAL",1)~ THEN REPLY @2 + 2
++ @3 + 3
END

IF ~~ THEN BEGIN 1
SAY @4
++ @5 + 2
IF ~Global("ACBORKPLOT","GLOBAL",1)~ THEN REPLY @6 + 2
++ @3 + 3
IF ~Dead("ACBOR001")~ THEN REPLY @7 + 14
END

IF ~~ THEN BEGIN 2
SAY @8
++ @9 + 4
++ @10 + 5
IF ~!Dead("ACBOR001")~ THEN REPLY @11 + 6
IF ~Dead("ACBOR001")~ THEN REPLY @12 + 14
END

IF ~~ THEN BEGIN 3
SAY @13
IF ~~ THEN DO ~AddJournalEntry(@10040,QUEST)Enemy()~ EXIT
END

IF ~~ THEN BEGIN 4
SAY @14 = @15 = @16 = @17 = @18
IF ~!Dead("ACBOR001")~ THEN REPLY @19 + 7
IF ~!Dead("ACBOR001")~ THEN REPLY @20 + 6
IF ~Dead("ACBOR001")~ THEN REPLY @12 + 14
END

IF ~~ THEN BEGIN 5
SAY @21 = @15 = @16 = @17 = @18
IF ~!Dead("ACBOR001")~ THEN REPLY @19 + 7
IF ~!Dead("ACBOR001")~ THEN REPLY @20 + 6
IF ~Dead("ACBOR001")~ THEN REPLY @12 + 14
END

IF ~~ THEN BEGIN 6
SAY @22
++ @23 + 7
++ @24 + 6a
END

IF ~~ THEN BEGIN 6a
SAY @25
IF ~~ THEN DO ~EraseJournalEntry(@10038)EraseJournalEntry(@10045)EraseJournalEntry(@10039)EraseJournalEntry(@10040)EraseJournalEntry(@10041)AddJournalEntry(@10043,QUEST_DONE)GiveItem("POTN26",Player1)ActionOverride("ACBOR001",EscapeAreaDestroy(90))EscapeAreaDestroy(90)~ EXIT
END

IF ~~ THEN BEGIN 7
SAY @26 = @27
++ @28 + 8
IF ~PartyHasItem("POTN10")~ THEN REPLY @29 + 9
IF ~!PartyHasItem("POTN10")~ THEN REPLY @30 + 12
IF ~Class(PLAYER2,MAGE_ALL)~ THEN REPLY @31 + 10
IF ~Class(PLAYER3,MAGE_ALL)~ THEN REPLY @32 + 10
IF ~Class(PLAYER4,MAGE_ALL)~ THEN REPLY @33 + 10
IF ~Class(PLAYER5,MAGE_ALL)~ THEN REPLY @34 + 10
IF ~Class(PLAYER6,MAGE_ALL)~ THEN REPLY @35 + 10
IF ~Class(PLAYER1,MAGE_ALL)~ THEN REPLY @36 + 10
++ @37 + 6
++ @38 + 11
END

IF ~~ THEN BEGIN 8
SAY @39
IF ~PartyHasItem("POTN10")~ THEN REPLY @29 + 9
++ @30 + 12
IF ~Class(PLAYER2,MAGE_ALL)~ THEN REPLY @31 + 10
IF ~Class(PLAYER3,MAGE_ALL)~ THEN REPLY @32 + 10
IF ~Class(PLAYER4,MAGE_ALL)~ THEN REPLY @33 + 10
IF ~Class(PLAYER5,MAGE_ALL)~ THEN REPLY @34 + 10
IF ~Class(PLAYER6,MAGE_ALL)~ THEN REPLY @35 + 10
IF ~Class(PLAYER1,MAGE_ALL)~ THEN REPLY @36 + 10
++ @37 + 6
++ @38 + 11
END

IF ~~ THEN BEGIN 10
SAY @40
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 11
SAY @41
IF ~PartyHasItem("POTN10")~ THEN REPLY @29 + 9
IF ~!PartyHasItem("POTN10")~ THEN REPLY @30 + 12
++ @30 + 12
IF ~Class(PLAYER2,MAGE_ALL)~ THEN REPLY @31 + 10
IF ~Class(PLAYER3,MAGE_ALL)~ THEN REPLY @32 + 10
IF ~Class(PLAYER4,MAGE_ALL)~ THEN REPLY @33 + 10
IF ~Class(PLAYER5,MAGE_ALL)~ THEN REPLY @34 + 10
IF ~Class(PLAYER6,MAGE_ALL)~ THEN REPLY @35 + 10
IF ~Class(PLAYER1,MAGE_ALL)~ THEN REPLY @36 + 10
++ @37 + 6
END

IF ~~ THEN BEGIN 12
SAY @42
IF ~~ THEN DO ~AddJournalEntry(@10045,QUEST)~ EXIT
END

IF ~NumTimesTalkedToGT(0)~ THEN BEGIN 13
SAY @43
IF ~!Dead("ACBOR001")~ THEN REPLY @44 + 15
IF ~!Dead("ACBOR001")PartyHasItem("POTN10")~ THEN REPLY @45 + 9
IF ~!Dead("ACBOR001")~ THEN REPLY @37 + 6
IF ~!Dead("ACBOR001")~ THEN REPLY @38 + 11
IF ~Dead("ACBOR001")~ THEN REPLY @46 + 14
END

IF~~ THEN BEGIN 14
SAY @47 = @48
IF ~~ THEN DO ~SetGlobal("ACBORKPLOT","GLOBAL",2)GiveItem("POTN26",Player1)AddexperienceParty(6000)EraseJournalEntry(@10038)EraseJournalEntry(@10039)EraseJournalEntry(@10040)EraseJournalEntry(@10041)EraseJournalEntry(@10045)AddJournalEntry(@10046,QUEST_DONE)EscapeAreaDestroy(90)~ EXIT
END

IF ~~ THEN BEGIN 15
SAY @42
IF ~~ THEN EXIT
END

CHAIN
IF ~~ THEN ACELASIA 9
@49 DO ~TakePartyItemNum("POTN10",1)~
==ACELASIA @50
==ACELASIA @51 DO ~UseItem("potn10",Myself)~ EXIT
