APPEND ACBREJ

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREAGARWANTSHISIRON","LOCALS",1)~ THEN BEGIN BREAGARWANTSHINSIRON1
SAY @8  = @9  = @10
IF ~~ THEN DO ~SetGlobal("ACBREAGARWANTSHISIRON","LOCALS",2)SetGlobalTimer("ACBREWANTSTOFORGE","LOCALS",TEN_DAYS)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREIRONCOMPLAINER","LOCALS",1)~ THEN BEGIN IRONCOMPLAINER1
SAY @11
IF ~~ THEN DO ~SetGlobal("ACBREIRONCOMPLAINER","LOCALS",2)SetGlobalTimer("ACIRONCOMPLAINTIMER","LOCALS",FIVE_DAYS)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREIRONCOMPLAINER","LOCALS",3)~ THEN BEGIN IRONCOMPLAINER2
SAY @12
IF ~~ THEN DO ~SetGlobal("ACBREIRONCOMPLAINER","LOCALS",4)SetGlobalTimer("ACIRONCOMPLAINTIMER","LOCALS",FIVE_DAYS)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREIRONCOMPLAINER","LOCALS",5)~ THEN BEGIN IRONCOMPLAINER3
SAY @13
IF ~~ THEN DO ~EraseJournalEntry(@10005)AddJournalEntry(@10007,QUEST_DONE)SetGlobal("ACBREIRONCOMPLAINER","LOCALS",6)SetGlobal("ACBREBROKE","GLOBAL",1)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREAGARFORGOTHISIRON","LOCALS",1)~ THEN BEGIN FORGOTHISIRON
SAY @14
IF ~~ THEN DO ~SetGlobal("ACBREAGARFORGOTHISIRON","LOCALS",2)SetGlobalTimer("ACBREAGARFORGOTHISIRONTIMER","LOCALS",TWO_DAYS)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREAGARFORGOTHISIRON","LOCALS",3)~ THEN BEGIN FORGOTHISIRON.1
SAY @15
IF ~~ THEN DO ~SetGlobal("ACBREAGARFORGOTHISIRON","LOCALS",4)SetGlobalTimer("ACBREAGARFORGOTHISIRONTIMER","LOCALS",TWO_DAYS)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)Global("ACBREAGARFORGOTHISIRON","LOCALS",5)~ THEN BEGIN FORGOTHISIRON.2
SAY @16
IF ~~ THEN DO ~EraseJournalEntry(@10005)AddJournalEntry(@10006,QUEST)SetGlobal("ACBREAGARFORGOTHISIRON","LOCALS",6)SetGlobal("ACBREBROKE","GLOBAL",1)~ EXIT
END

IF ~Global("ACSTORY","GLOBAL",1)!AreaCheck("%Beregost%")Global("ACBREAGARWANTSHISIRON","LOCALS",3)~ THEN BEGIN ACLEFTFORSMITH
SAY @17
IF ~~ THEN GOTO ACLEFTFORSMITH.2
END

IF ~Global("ACSTORY","GLOBAL",1)AreaCheck("%Beregost%")Global("ACBREAGARWANTSHISIRON","LOCALS",3)~ THEN BEGIN ACLEFTFORSMITH.1
SAY @18 
IF ~~ THEN GOTO ACLEFTFORSMITH.2
END

IF ~~ THEN BEGIN ACLEFTFORSMITH.2
SAY @19 = @20
IF ~~ THEN DO ~ClearAllActions()StartCutSceneMode()StartCutScene("ACBREBER")~ EXIT
END

IF ~~ THEN BEGIN Acc.2
SAY @21
++ @22 + Acc.3
++ @23 + Acc.4
++ @24 + Acc.5
END

IF ~~ THEN BEGIN Acc.3
SAY @25
IF ~~ THEN GOTO Acc.6
END

IF ~~ THEN BEGIN Acc.4
SAY @26
IF ~~ THEN GOTO Acc.6
END

IF ~~ THEN BEGIN Acc.5
SAY @27
IF ~~ THEN GOTO Acc.6
END

IF ~~ THEN BEGIN Acc.6
SAY @28 = @29 = @30 = @31
++ @32 + Acc.7
++ @33 + Acc.7
++ @34 + Acc.8
END

IF ~~ THEN BEGIN Acc.8
SAY @35
IF ~~ THEN GOTO Acc.7
END

IF ~~ THEN BEGIN Acc.9
SAY @36 = @37 = @38
++ @39 + Acc.11
++ @40 + Acc.13
END

IF ~~ THEN BEGIN Acc.9a
SAY @41
IF ~~ THEN GOTO Acc.13
END

IF ~~ THEN BEGIN Acc.10
SAY @42
IF ~~ THEN GOTO Acc.12
END

IF ~~ THEN BEGIN Acc.12
SAY @43
IF ~~ THEN GOTO Acc.13
END

IF ~~ THEN BEGIN SILVERAPPEARS.2
SAY @44
IF ~~ THEN DO ~ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_04")~ EXIT
END

IF ~~ THEN BEGIN SILVERAPPEARS.3
SAY @45
IF ~~ THEN DO ~ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_04")~ EXIT
END

IF ~~ THEN BEGIN SILVERAPPEARS.4
SAY @46
IF ~~ THEN DO ~ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_04")~ EXIT
END

IF ~Global("ACSILVERAPPEARS","GLOBAL",3)~ THEN BEGIN SILVERAPPEARS.5
SAY @47 = @48
++ @49 + SILVERAPPEARS.6
++ @50 + SILVERAPPEARS.7
++ @51 + SILVERAPPEARS.8
++ @52 + SILVERAPPEARS.9
END

IF ~~ THEN BEGIN SILVERAPPEARS.6
SAY @53
IF ~~ THEN DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",4)SetGlobalTimer("ACGIANTQUESTREMINDER","GLOBAL",FIVE_DAYS)~ EXIT
END

IF ~~ THEN BEGIN SILVERAPPEARS.7
SAY @54
++ @55 + SILVERAPPEARS.6
++ @56 + SILVERAPPEARS.10
++ @51 + SILVERAPPEARS.8
++ @52 + SILVERAPPEARS.9
END

IF ~~ THEN BEGIN SILVERAPPEARS.8
SAY @57
++ @55 + SILVERAPPEARS.6
++ @56 + SILVERAPPEARS.10
++ @50 + SILVERAPPEARS.7
++ @52 + SILVERAPPEARS.9
END

IF ~~ THEN BEGIN SILVERAPPEARS.9
SAY @58
++ @55 + SILVERAPPEARS.6
++ @56 + SILVERAPPEARS.10
++ @50 + SILVERAPPEARS.7
++ @59 + SILVERAPPEARS.11
END

IF ~~ THEN BEGIN SILVERAPPEARS.11
SAY @60
IF ~~ THEN DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",4)~ EXIT 
END

IF ~Global("ACGIANTQUESTREMIND","LOCALS",1)~ THEN BEGIN GIANTQUESTREMINDER.1
SAY @61
IF ~~ THEN DO ~SetGlobal("ACGIANTQUESTREMIND","LOCALS",2)~ EXIT
END

IF ~Global("ACGIANTQUESTREMIND","LOCALS",3)~ THEN BEGIN GIANTQUESTREMINDER.2
SAY @62
IF ~~ THEN DO ~SetGlobal("ACGIANTQUESTREMIND","LOCALS",4)~ EXIT
END

IF ~Global("ACSILVERAPPEARS","GLOBAL",5)~ THEN BEGIN GIANTBANTER
SAY @63   
++ @64 DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",6)~ + GIANTBANTER1
++ @65 DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",6)~ + GIANTBANTER2
++ @66 DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",6)~ + GIANTBANTER3
++ @67 DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",6)~ + GIANTBANTER4
END

IF ~~ THEN BEGIN GIANTBANTER1
SAY @68
IF ~~ THEN GOTO GIANTBANTER5
END

IF ~~ THEN BEGIN GIANTBANTER2
SAY @69
IF ~~ THEN GOTO GIANTBANTER5
END

IF ~~ THEN BEGIN GIANTBANTER3
SAY @70
IF ~~ THEN GOTO GIANTBANTER5
END

IF ~~ THEN BEGIN GIANTBANTER4
SAY @71
IF ~~ THEN GOTO GIANTBANTER5
END

IF ~~ THEN BEGIN GIANTBANTER5
SAY @72
IF ~~ THEN DO ~CreateCreature("ACGiant",[2166.2381],0)~ EXIT
END

IF ~Global("ACSILVERAPPEARS","GLOBAL",7)~ THEN BEGIN SILVERREAPPEARS
SAY @73   
++ @74 + SILVER2.2
++ @75 + SILVER2.3
++ @76 + SILVER2.4
++ @77 + SILVER2.5
END

IF ~~ THEN BEGIN SILVER2.2
SAY @78 = @79
IF ~~ THEN GOTO SILVER2.6
END

IF ~~ THEN BEGIN SILVER2.3
SAY @80
IF ~~ THEN GOTO SILVER2.6
END

IF ~~ THEN BEGIN SILVER2.4
SAY @81
IF ~~ THEN GOTO SILVER2.6
END

IF ~~ THEN BEGIN SILVER2.5
SAY @82 = @83
IF ~~ THEN GOTO SILVER2.6
END

IF ~~ THEN BEGIN SILVER2.6
SAY @84   
IF ~~ THEN DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",8)ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_04")~ EXIT
END

IF ~Global("ACSILVERAPPEARS","GLOBAL",8)~ THEN BEGIN 2NDSILVERLEFT
SAY @85  = @86 = @87
++ @88 + SILVERBANTER2.1
++ @89 + SILVERBANTER2.2
++ @90 + SILVERBANTER2.3
++ @91 + SILVERBANTER2.4
END

IF ~~ THEN BEGIN SILVERBANTER2.1
SAY @92
IF ~~ THEN GOTO SILVERBANTER2.5
END

IF ~~ THEN BEGIN SILVERBANTER2.2
SAY @93
IF ~~ THEN GOTO SILVERBANTER2.5
END

IF ~~ THEN BEGIN SILVERBANTER2.3
SAY @94
IF ~~ THEN GOTO SILVERBANTER2.5
END

IF ~~ THEN BEGIN SILVERBANTER2.4
SAY @95
IF ~~ THEN GOTO SILVERBANTER2.5
END

IF ~~ THEN BEGIN SILVERBANTER2.5
SAY @96
IF ~~ THEN DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",9)SetGlobal("ACMYAXE","GLOBAL",1)~ EXIT
END

IF ~Global("ACREVIQUEST","GLOBAL",2)~ THEN BEGIN REVIQUEST1
SAY @97
IF ~~ THEN DO ~SetGlobal("ACREVIQUEST","GLOBAL",3) CreateCreatureObject("ACRALPH",Myself,0,0,0)~ EXIT
END

IF ~Global("ACAR6515","LOCALS",4)~ THEN BEGIN CHAPTER8.START
SAY @98  = @99
IF ~GlobalLT("ACBREDESCIDES","GLOBAL",4)~ THEN DO ~SetGlobal("ACAR6515","LOCALS",5)~ + CHAPTER8.1
IF ~GlobalGT("ACBREDESCIDES","GLOBAL",3)GlobalLT("ACBREDESCIDES","GLOBAL",6)~ THEN DO ~SetGlobal("ACAR6515","LOCALS",5)~ + CHAPTER8.2
IF ~GlobalGT("ACBREDESCIDES","GLOBAL",5)GlobalLT("ACBREDESCIDES","GLOBAL",9)~ THEN DO ~SetGlobal("ACAR6515","LOCALS",5)~ + CHAPTER8.3
IF ~GlobalGT("ACBREDESCIDES","GLOBAL",8)~ THEN DO ~SetGlobal("ACAR6515","LOCALS",5)~ + CHAPTER8.4
END

IF ~~ THEN BEGIN CHAPTER8.1
SAY @100
IF ~~ THEN DO ~SetGlobal("ACBREINPARTY","GLOBAL",3)LeaveParty()Enemy()~ EXIT
END

IF ~~ THEN BEGIN CHAPTER8.2
SAY @101
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN CHAPTER8.3
SAY @102
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN CHAPTER8.4
SAY @103
IF ~~ THEN EXIT
END

END

CHAIN
IF ~Global("ACSTORY","GLOBAL",3)Global("ACBRELOSTHANDDIA","LOCALS",0)~ THEN ACBREJ Acc.1
@104 
==ACREVI @105 
==ACBREJ @106  = @107 
==ACREVI @108 
==ACBREJ @109 
==ACREVI @110 
==ACBREJ @111 
==ACTAEROM @112
==ACBREJ @113
END
++ @114 DO ~SetGlobal("ACBRELOSTHANDDIA","LOCALS",1)EraseJournalEntry(@10011)~ + Acc.2
++ @115 DO ~SetGlobal("ACBRELOSTHANDDIA","LOCALS",1)EraseJournalEntry(@10011)~ + Acc.2
++ @116 DO ~SetGlobal("ACBRELOSTHANDDIA","LOCALS",1)EraseJournalEntry(@10011)~ + Acc.2

CHAIN
IF ~~ THEN ACBREJ Acc.7
@117
==ACREVI @118
==ACBREJ @119 = @120
==ACTAEROM @121
==ACBREJ @122 = @123
END
IF ~GlobalLT("CHAPTER","GLOBAL",%tutu_chapter_5%)~ THEN REPLY @124 + Acc.9
IF ~GlobalLT("CHAPTER","GLOBAL",%tutu_chapter_5%)~ THEN REPLY @125 + Acc.9
IF ~GlobalGT("CHAPTER","GLOBAL",%tutu_chapter_4%)~ THEN REPLY @124 + Acc.9a
IF ~GlobalGT("CHAPTER","GLOBAL",%tutu_chapter_4%)~ THEN REPLY @125 + Acc.9a
++ @126 + Acc.10

CHAIN 
IF ~~ THEN ACBREJ Acc.11
@127 = @128
==ACREVI @129
==ACTAEROM @130
==ACREVI @131
==ACTAEROM @132
==ACBREJ @133
END
IF ~~ THEN DO ~CopyGroundPilesTo("%Beregost_ThunderhammerSmithy%",[851.508])
AddexperienceParty(1200)AddJournalEntry(@10013,QUEST_DONE)SetGlobal("AC6701TELEPORT","GLOBAL",2)SetGlobal("ACBREINPARTY","GLOBAL",2)
RealSetGlobalTimer("ACBreImmyTimer","GLOBAL",800)
ClearAllActions()
      StartCutSceneMode()
      StartCutScene("accut_1x")~ EXIT

CHAIN 
IF ~~ THEN ACBREJ Acc.13
@134 = @128
==ACREVI @129
==ACTAEROM @130
==ACREVI @131
==ACTAEROM @132
==ACBREJ @135
END
IF ~~ THEN DO ~AddexperienceParty(1200)AddJournalEntry(@10012,QUEST_DONE)SetGlobal("AC6701TELEPORT","GLOBAL",2)SetGlobal("ACBREBROKE","GLOBAL",1)SetGlobal("ACBREEXISTS","GLOBAL",2)
ClearAllActions()
      StartCutSceneMode()
      StartCutScene("accut_2x")~ EXIT

CHAIN
IF ~Global("ACSILVERAPPEARS","GLOBAL",2)~ THEN ACBREJ SILVERAPPEARS.1
@136 = @137 DO ~SetGlobal("ACSILVERAPPEARS","GLOBAL",3)~
==%YESLICK_BANTER% IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @138
==%KAGAIN_BANTER% IF ~InParty("KAGAIN")See("KAGAIN")!StateCheck("KAGAIN",CD_STATE_NOTVALID)~ THEN @139
==%YESLICK_BANTER% IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)InParty("KAGAIN")See("KAGAIN")!StateCheck("KAGAIN",CD_STATE_NOTVALID)~ THEN @140
==ACBREJ IF ~OR(3)!InParty("YESLICK")!See("YESLICK")StateCheck("YESLICK",CD_STATE_NOTVALID)InParty("KAGAIN")See("KAGAIN")!StateCheck("KAGAIN",CD_STATE_NOTVALID)~ THEN @140
==%KAGAIN_BANTER% IF ~InParty("KAGAIN")See("KAGAIN")!StateCheck("KAGAIN",CD_STATE_NOTVALID)~ THEN @141
==ACBREJ IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @142
==%YESLICK_BANTER% IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @143
==ACBREJ IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @45
END
IF ~OR(3)!InParty("YESLICK")!See("YESLICK")StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN REPLY @144 + SILVERAPPEARS.2
IF ~OR(3)!InParty("YESLICK")!See("YESLICK")StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN REPLY @145 + SILVERAPPEARS.3
IF ~OR(3)!InParty("YESLICK")!See("YESLICK")StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN REPLY @146 + SILVERAPPEARS.4
IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN DO ~ClearAllActions()StartCutSceneMode()StartCutScene("ACCUT_04")~ EXIT

CHAIN
IF ~~ THEN ACBREJ SILVERAPPEARS.10
@147
==%YESLICK_BANTER% IF ~InParty("YESLICK")See("YESLICK")!StateCheck("YESLICK",CD_STATE_NOTVALID)~ THEN @148 DO ~LeaveParty()EscapeAreaDestroy(90)~
==ACBREJ @149 DO ~AddJournalEntry(@10015,QUEST_DONE)EraseJournalEntry(@10014)SetGlobal("ACBreBroke","GLOBAL",1)SetGlobal("ACBREEXISTS","GLOBAL",2)SetGlobal("ACBRESILVERAPPEARS","LOCALS",3)LeaveParty()EscapeAreaDestroy(90)~
EXIT
