APPEND ACBREP

IF ~%BG1_BEFORE_TRANSITION% Global("ACBREINPARTY","GLOBAL",1)See(player1)~ THEN BEGIN 0.a
SAY @0
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",2)JoinParty()~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION% Global("ACSTORY","GLOBAL",0)Global("ACBREINPARTY","GLOBAL",2)~ THEN BEGIN KICKOUT.1
SAY @1
++ @2 + KICKOUT.1a
++ @3 + KICKOUT.1b
END

IF ~~ THEN BEGIN KICKOUT.1a
SAY @4
IF ~~ THEN DO ~JoinParty()~ EXIT
END

IF ~~ THEN BEGIN KICKOUT.1b
SAY @5
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)MoveGlobal("%Beregost_ThunderhammerSmithy%","ACBRESMI",[851.508])EscapeAreaMove("AC9999",333,333,0)~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION% Global("ACSTORY","GLOBAL",1)Global("ACBREINPARTY","GLOBAL",2)PartyHasItem("ACIRON")~ THEN BEGIN KICKOUT.2
SAY @6 = @7 = @8
IF ~~ THEN DO ~SetInterrupt(FALSE) EraseJournalEntry(@10005)AddJournalEntry(@10006,QUEST)SetGlobal("ACAR6700","LOCALS",2)SetGlobal("ACSTORY","GLOBAL",2)SetGlobal("ACBREINPARTY","GLOBAL",3)SetGlobal("ACBREAGARWANTSHISIRON","LOCALS",4)TakePartyItem("ACIRON")
SmallWait(1)
DestroyItem("ACIRON") SmallWait(1)
TakePartyItem("ACBOOK") SmallWait(1)
DestroyItem("ACBOOK")AddexperienceParty(300)MoveGlobal("%Beregost_ThunderhammerSmithy%","ACBRESMI",[851.508])EscapeAreaMove("AC9999",333,333,0)
SetInterrupt(TRUE)~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION% Global("ACSTORY","GLOBAL",1)Global("ACBREINPARTY","GLOBAL",2)!PartyHasItem("ACIRON")~ THEN BEGIN KICKOUT.3
SAY @9
++ @2 + KICKOUT.1a
++ @3 + KICKOUT.3b
END

IF ~~ THEN BEGIN KICKOUT.3b
SAY @10
IF ~~ THEN DO ~EraseJournalEntry(@10005)AddJournalEntry(@10007,QUEST_DONE)SetGlobal("ACBREINPARTY","GLOBAL",3)SetGlobal("ACBREAGARFORGOTHISIRON","LOCALS",6)SetGlobal("ACBREBROKE","GLOBAL",1)~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION%Global("ACSTORY","GLOBAL",3)Global("ACBREINPARTY","GLOBAL",2)~ THEN BEGIN KICKOUT.4
SAY @11
++ @2 + KICKOUT.4a
++ @12 + KICKOUT.4b
END

IF ~~ THEN BEGIN KICKOUT.4a
SAY @13
IF ~~ THEN DO ~JoinParty()~ EXIT
END

IF ~~ THEN BEGIN KICKOUT.4b
SAY @14
++ @15 DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)~ + KICKOUT.4d
++ @16 + KICKOUT.4c
END

IF ~~ THEN BEGIN KICKOUT.4c
SAY @17
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)SetGlobal("ACBREBROKE","GLOBAL",1)EscapeAreaDestroy(90)~ EXIT
END

IF ~~ THEN BEGIN KICKOUT.4d
SAY @18
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)EscapeAreaMove("%Beregost_JovialJuggler_L1%",77,979,14)~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION%Global("ACSTORY","GLOBAL",3)Global("ACBREINPARTY","GLOBAL",3)~ THEN BEGIN REJOIN.STORY3
SAY @19
++ @20 + REJOIN.STORY3Y
++ @21 EXIT
END

IF ~~ THEN BEGIN REJOIN.STORY3Y
SAY @22
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",2)JoinParty()~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION%Global("ACSTORY","GLOBAL",4)Global("ACBREINPARTY","GLOBAL",2)~ THEN BEGIN KICKOUT.5
SAY @23
++ @24 + KICKOUT.5a
++ @25 + KICKOUT.5b
END

IF ~~ THEN BEGIN KICKOUT.5a
SAY @26
IF ~~ THEN DO ~JoinParty()~ EXIT
END

IF ~%BG1_BEFORE_TRANSITION%Global("ACSTORY","GLOBAL",5)Global("ACBREINPARTY","GLOBAL",2)~ THEN BEGIN KICKOUT.6
SAY @27
++ @2 + KICKOUT.6a
++ @28 + KICKOUT.6b
END

IF ~~ THEN BEGIN KICKOUT.6a
SAY @4
IF ~~ THEN DO ~JoinParty()~ EXIT
END

IF ~~ THEN BEGIN KICKOUT.6b
SAY @29
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)MoveGlobal("%Beregost_ThunderhammerSmithy%","ACBRESMI",[851.508])EscapeAreaMove("AC9999",333,333,0)~ EXIT
END


END


CHAIN
IF ~~ THEN ACBREP KICKOUT.5b
@75
==%YESLICK_BANTER% IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @76
==ACBREP IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @77
END
++ @78 + KICKOUT.5a
++ @16 + KICKOUT.5c

CHAIN
IF ~~ THEN ACBREP KICKOUT.5c
@79
==%YESLICK_BANTER% IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @80 DO ~LeaveParty()EscapeAreaDestroy(90)~
==ACBREP IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @81 DO ~SetGlobal("ACBreBroke","GLOBAL",1)SetGlobal("ACBREEXISTS","GLOBAL",2)SetGlobal("ACBREINPARTY","GLOBAL",3)LeaveParty()EscapeAreaDestroy(90)~
EXIT
