APPEND ACBREP

IF ~Global("ACAUDWAITS","GLOBAL",5)
OR(3) 
!InParty(Player1) 
!See(Player1) 
StateCheck(Player1,CD_STATE_NOTVALID)~ THEN BEGIN AR2010.1
SAY @30
IF ~~ THEN EXIT
END

IF ~Global("ACAUDWAITS","GLOBAL",5) 
InParty(Player1) 
See(Player1) 
!StateCheck(Player1,CD_STATE_NOTVALID)~ THEN BEGIN AR2010.2
SAY @31
++ @32 + AR2010.3
++ @33 + AR2010.4
++ @34 + AR2010.5
END

IF ~~ THEN BEGIN AR2010.6
SAY @35
IF ~~ THEN DO ~SetGlobal("ACAUDWAITS","GLOBAL",6)ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_10")~ EXIT
END

IF ~~ THEN BEGIN AR2010.7
SAY @36
++ @37 + AR2010.6
++ @38 + AR2010.8
++ @39 + AR2010.9
++ @40 + AR2010.10
END

IF ~~ THEN BEGIN AR2010.8
SAY @41
++ @37 + AR2010.6
++ @42 + AR2010.9
++ @43 + AR2010.10
END

IF ~~ THEN BEGIN AR2010.9
SAY @44
++ @45 + AR2010.6
++ @40 + AR2010.10
END

IF ~~ THEN BEGIN AR2010.10
SAY @46
++ @47 + AR2010.6
++ @39 + AR2010.9
IF ~GLOBALGT("ACBREFRIENDCOUNTER","GLOBAL",10)~ THEN REPLY @48 + AR2010.11a
IF ~GLOBALLT("ACBREFRIENDCOUNTER","GLOBAL",11)~ THEN REPLY @48 + AR2010.11b
END

END //APPEND ACBREP

CHAIN
IF ~~ THEN ACBREP AR2010.11a
@49 
== ACBREP IF ~Global("C#IM_ImoenStays","GLOBAL",0)~ THEN @101
== ACBREP IF ~!Global("C#IM_ImoenStays","GLOBAL",0)~ THEN @102
== ACBREP @103
END
IF ~~ THEN DO ~SetGlobal("ACAUDQUEST","GLOBAL",13)SetGlobal("ACBREBIO","GLOBAL",1)SetGlobal("ACBREBIO","GLOBAL",1)SetGlobal("ACBREINPARTY","GLOBAL",2)JoinParty()~ EXIT


APPEND ACBREP

IF ~~ THEN BEGIN AR2010.11b
SAY @49 = @51
IF ~~ THEN DO ~SetGlobal("ACAUDQUEST","GLOBAL",13)SetGlobal("ACBREINPARTY","GLOBAL",3)SetGlobal("ACBREBROKE","GLOBAL",1)EscapeAreaDestroy(90)~ EXIT
END

IF ~Global("ACAUDWAITS","GLOBAL",6)~ THEN BEGIN AR2000.1
SAY @52
++ @53 + AR2000.2
++ @54 + AR2000.3
++ @55 + AR2000.4
++ @56 + AR2000.5
END

IF ~~ THEN BEGIN AR2000.2
SAY @57
IF ~~ THEN DO ~SetGlobal("ACAUDWAITS","GLOBAL",7)ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_11")~ EXIT
END

IF ~~ THEN BEGIN AR2000.3
SAY @58
++ @53 + AR2000.2
++ @54 + AR2000.3
++ @55 + AR2000.4
++ @56 + AR2000.5
END

IF ~~ THEN BEGIN AR2000.4
SAY @59
++ @53 + AR2000.2
++ @54 + AR2000.3
++ @56 + AR2000.5
END

IF ~~ THEN BEGIN AR2000.5
SAY @60
++ @53 + AR2000.2
++ @54 + AR2000.3
++ @55 + AR2000.4
END

IF ~Global("ACAUDQUEST","GLOBAL",13)Global("ACAUDQUESTEND","GLOBAL",0)~ THEN BEGIN QUESTEND
SAY @61
++ @62 DO ~SetGlobal("ACAUDQUESTEND","GLOBAL",1)~ + QUESTEND.1
++ @63 DO ~SetGlobal("ACAUDQUESTEND","GLOBAL",1)~ + QUESTEND.2
END

IF ~~ THEN BEGIN QUESTEND.1
SAY @64
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",2)JoinParty()~ EXIT
END

IF ~~ THEN BEGIN QUESTEND.2
SAY @65
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)EscapeAreaMove("AR0334",648,229,2)~ EXIT
END

IF ~Global("ACBREINPARTY","GLOBAL",3)AreaCheck("AR0334")~ THEN BEGIN CROMJOIN
SAY @66
++ @67 + CROMJOIN.1
++ @68 + CROMJOIN.2
END

IF ~~ THEN BEGIN CROMJOIN.1
SAY @69
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",2)JoinParty()~ EXIT
END

IF ~~ THEN BEGIN CROMJOIN.2
SAY @70
IF ~~ THEN EXIT
END

IF ~%BGT_VAR2%Global("ACBREINPARTY","GLOBAL",2)~ THEN BEGIN KICKOUTBG2
SAY @71 
++ @72 + KICKOUTBG2.1
++ @73 + KICKOUTBG2.2
END

IF ~~ THEN BEGIN KICKOUTBG2.2
SAY @4
IF ~~ THEN DO ~JoinParty()~ EXIT
END


END


CHAIN
IF ~~ THEN ACBREP AR2010.3
@82
==ACBREP IF ~Race(PLAYER1,DWARF)~ THEN @83
==ACBREP IF ~!Race(PLAYER1,DWARF)~ THEN @84
==ACBREP @85
END
++ @86 + AR2010.6
++ @87 + AR2010.7
++ @38 + AR2010.8
++ @88 + AR2010.9
++ @40 + AR2010.10

CHAIN
IF ~~ THEN ACBREP AR2010.4
@89
==ACBREP IF ~Race(PLAYER1,DWARF)~ THEN @83
==ACBREP IF ~!Race(PLAYER1,DWARF)~ THEN @84
==ACBREP @85
END
++ @86 + AR2010.6
++ @87 + AR2010.7
++ @38 + AR2010.8
++ @88 + AR2010.9
++ @40 + AR2010.10

CHAIN
IF ~~ THEN ACBREP AR2010.5
@90
==ACBREP IF ~Race(PLAYER1,DWARF)~ THEN @83
==ACBREP IF ~!Race(PLAYER1,DWARF)~ THEN @84
==ACBREP @85
END
++ @86 + AR2010.6
++ @87 + AR2010.7
++ @38 + AR2010.8
++ @39 + AR2010.9
++ @40 + AR2010.10

CHAIN
IF ~~ THEN ACBREP KICKOUTBG2.1
@91
==ACBREP IF ~Global("ACIKNOWCROM","LOCALS",0)~ THEN @92 DO ~SetGlobal("ACIKNOWCROM","LOCALS",1)SetGlobal("ACAR0334","LOCALS",2)SetGlobal("ACBREINPARTY","GLOBAL",3)EscapeAreaMove("AR0334",648,229,2)~
==ACBREP IF ~GlobalGT("ACIKNOWCROM","LOCALS",0)~ THEN @93 DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)EscapeAreaMove("AR0334",648,229,2)~
END
IF ~~ THEN  EXIT
