BEGIN ACAUD001

/*
IF ~Global("ACAUDWAITS","GLOBAL",1)!Name("ACBRE",LastTalkedToBy())~ THEN BEGIN 1.NOSTART
SAY @0
IF ~~ THEN EXIT
END
*/

IF ~Global("ACAUDWAITS","GLOBAL",1)
OR(3)
!InParty("ACBRE") 
!See("ACBRE") 
StateCheck("ACBRE",CD_STATE_NOTVALID)~ THEN BEGIN 1.NOSTART
SAY @0
IF ~~ THEN EXIT
END

/*
IF ~Global("ACAUDWAITS","GLOBAL",1)Name("ACBRE",LastTalkedToBy())!See(PLAYER1)~ THEN BEGIN 1.NOSTARTa
SAY @1
IF ~~ THEN EXIT
END
*/

IF ~Global("ACAUDWAITS","GLOBAL",1)
InParty("ACBRE") 
See("ACBRE") 
!StateCheck("ACBRE",CD_STATE_NOTVALID)
!See(PLAYER1)~ THEN BEGIN 1.NOSTARTa
SAY @1
IF ~~ THEN EXIT
END

BEGIN ACAUD002

IF ~Global("ACAUDQUEST","GLOBAL",13) 
OR(3)
!InParty("ACBRE") 
!See("ACBRE") 
StateCheck("ACBRE",CD_STATE_NOTVALID)~ THEN BEGIN NOSTART.2
SAY @2
IF ~~ THEN EXIT
END

CHAIN
IF ~Global("ACAUDQUEST","GLOBAL",13)
InParty("ACBRE") 
See("ACBRE") 
!StateCheck("ACBRE",CD_STATE_NOTVALID)~ THEN ACAUD002 START.2
@3
==ACBREJ @4
END
IF ~~ THEN EXTERN ACGAL FINALTALK //in acgal.d

CHAIN
IF ~Global("ACAUDQUEST","GLOBAL",2)~ THEN ACAUD001 START
@5 DO ~SetGlobal("ACAUDQUEST","GLOBAL",3)EraseJournalEntry(@10026)~
==ACBREJ @6
==ACAUD001 @7
==ACBREJ @8
==ACAUD001 @9
==ACBREJ @10
==ACAUD001 @11
==ACBREJ @12
==ACAUD001 @13
==ACBREJ @14
==ACAUD001 @15
==ACBREJ @16
==ACAUD001 @17
==ACBREJ @18
==ACAUD001 @19 DO ~UseItem("potn10",Myself)~
==BAERIE IF ~InParty("AERIE")See("AERIE")!StateCheck("AERIE",CD_STATE_NOTVALID)~ THEN @20
==BKORGAN IF ~InParty("KORGAN")See("KORGAN")!StateCheck("KORGAN",CD_STATE_NOTVALID)~ THEN @21
==BANOMEN IF ~InParty("ANOMEN")See("ANOMEN")!StateCheck("ANOMEN",CD_STATE_NOTVALID)~ THEN @22
==BNALIA IF ~InParty("NALIA")See("NALIA")!StateCheck("NALIA",CD_STATE_NOTVALID)~ THEN @23
==BJAHEIR IF ~InParty("JAHEIRA")See("JAHEIRA")!StateCheck("JAHEIRA",CD_STATE_NOTVALID)~ THEN @24
==BYOSHIM IF ~InParty("YOSHIMO")See("YOSHIMO")!StateCheck("YOSHIMO",CD_STATE_NOTVALID)~ THEN @25
==ACBREJ @26 DO ~AddJournalEntry(@10027,QUEST)SetGlobalTimer("ACAXETIMER","LOCALS",TWO_DAYS)~
EXIT

CHAIN
IF ~Global("ACAUDINTM","GLOBAL",3)~ THEN ACAUD001 TM.START
@27 DO ~SetGlobal("ACAUDINTM","GLOBAL",4)~
==ACBREJ @28
==ACAUD001 @29
==ACBREJ @30
==ACAUD001 @31
==ACBREJ @30
==ACAUD001 @32 DO ~UseItem("potn10",Myself)~
==ACBREJ @33
EXIT

CHAIN
IF ~Global("ACAUDWAITS","GLOBAL",1)
InParty("ACBRE") 
See("ACBRE") 
!StateCheck("ACBRE",CD_STATE_NOTVALID)
See(PLAYER1)~ THEN ACAUD001 1.NOSTART
@34 DO ~SetGlobal("ACAUDWAITS","GLOBAL",3)SetGabber(PLAYER1)~
==ACBREJ @35
==ACAUD001 @36
==ACBREJ @37
==ACAUD001 @38 = @39
==ACBREJ @40
==ACAUD001 @41
END
IF ~~ THEN DO ~ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_09")~ EXIT

CHAIN
IF ~GlobalLT("ACAUDQUEST","GLOBAL",13)NumTimesTalkedTo(0)~ THEN ACAUD002 1.START
@71 DO ~SetGlobal("ACAUDWAITS","GLOBAL",4)SetGabber(PLAYER1)MakeGlobal()~
==ACBREJ @43
==ACAUD002 @72
==ACBREJ @45 = @46
==ACAUD002 @73 = @74
==ACBREJ @49
==ACAUD002 @75
==ACBREJ @51
==ACAUD002 @76
END
++ @53 + 1.1
++ @54 + 1.1
++ @55 + 1.1
++ @56 + 1.1
++ @57 + 1.1

CHAIN
IF ~~ THEN ACAUD002 1.1
@58 = @59
==ACBREJ IF ~Global("ACAUDQUEST","GLOBAL",11)~ THEN @60
==ACAUD002 IF ~Global("ACAUDQUEST","GLOBAL",11)~ THEN @61
==ACBREJ IF ~Global("ACAUDQUEST","GLOBAL",11)~ THEN @62
==ACAUD002 IF ~Global("ACAUDQUEST","GLOBAL",11)~ THEN @63
==ACBREJ IF ~Global("ACAUDQUEST","GLOBAL",11)~ THEN @64
==ACBREJ IF ~Global("ACAUDQUEST","GLOBAL",12)~ THEN @65
==ACAUD002 IF ~Global("ACAUDQUEST","GLOBAL",12)~ THEN @66
==ACBREJ IF ~Global("ACAUDQUEST","GLOBAL",12)~ THEN @67
==ACBREJ @68
==ACAUD002 @69
==ACBREJ @70
END
IF ~~ THEN DO ~SetGlobalTimer("ACBRELAWTIMER","GLOBAL",EIGHT_HOURS)SetGlobal("ACBREINPARTY","GLOBAL",3)ActionOverride("ACAUD002",TakePartyItem("ACPLOT1A"))ActionOverride("ACAUD002",TakePartyItem("ACPLOT1B"))ActionOverride("ACAUD002",TakePartyItem("ACPLOT1C"))LeaveParty()SetLeavePartyDialogFile()ActionOverride("ACAUD002",EscapeAreaMove("AC9999",333,222,0))EscapeAreaMove("AC9999",333,333,0)~ EXIT


////////////////////////////////////// SOUNDCHECKDATEIEN

CHAIN
IF ~Global("SOUNDCHECK","GLOBAL",1)~ THEN ACAUD001 SOUNDCHECK
@5
==ACBREJ @6
==ACAUD001 @7
==ACBREJ @8
==ACAUD001 @9
==ACBREJ @10
==ACAUD001 @11
==ACBREJ @12
==ACAUD001 @13
==ACBREJ @14
==ACAUD001 @15
==ACBREJ @16
==ACAUD001 @17
==ACBREJ @18
==ACAUD001 @19
EXIT

CHAIN
IF ~Global("SOUNDCHECK","GLOBAL",2)~ THEN ACAUD001 SOUNDCHECK2
@42 
==ACBREJ @43
==ACAUD001 @44 
==ACBREJ @45 = @46
==ACAUD001 @47  = @48 
==ACBREJ @49
==ACAUD001 @50 
==ACBREJ @51
==ACAUD001 @52 
EXIT

CHAIN
IF ~Global("SOUNDCHECK","GLOBAL",3)~ THEN ACAUD001 SOUNDCHECK3
@34
==ACBREJ @35
==ACAUD001 @36
==ACBREJ @37
==ACAUD001 @38 = @39
==ACBREJ @40
==ACAUD001 @41
EXIT

CHAIN
IF ~Global("SOUNDCHECK","GLOBAL",4)~ THEN ACAUD001 SOUNDCHECK4
@34
==ACBREJ @77 = @78
==ACBREJ @79
==ACAUD001 @80
==ACBREJ @81
==ACAUD001 @82
//////////////
==ACBREJ @83 DO ~EscapeAreaDestroy(90)~
==ACAUD002 @84
/////////////////////////////
==ACBREJ @85 = @86
==ACAUD001 @87
==ACBREJ @88
==ACBREJ @89 = @90 
==ACBREJ @91
==ACAUD001 @92
EXIT

