Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NintwnDude879 committed Nov 27, 2022
2 parents b1e371c + 0c60500 commit 50935a9
Showing 1 changed file with 29 additions and 40 deletions.
69 changes: 29 additions & 40 deletions FNaFSBAutoSplitter.asl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

//Todo:
//Piturrete suggestion- add message bags
//Piturrete issue- time items

//base address change: 0
state("fnaf9-Win64-Shipping", "v1.04"){
Expand Down Expand Up @@ -32,7 +33,7 @@ state("fnaf9-Win64-Shipping", "v1.04"){
float posZ: 0x0441C5F0, 0xDE8, 0x38, 0x0, 0x30, 0x268, 0x298, 0x1D8;

//Buttons that start cutscenes (pressed = 0)
int vannyEndButton: 0x0441FCB0, 0x98, 0xA0, 0x128, 0xA8, 0x2F8, 0x240;
bool vannyEndButton: 0x0441FCB0, 0x98, 0xA0, 0x128, 0xA8, 0x2F8, 0x240;
int escapeEndLeaveButtonEast: 0x0441FCB0, 0x98, 0x2D0, 0x128, 0xA8, 0x38, 0x3D8, 0x268;
int carEndLeaveButton: 0x0441FCB0, 0x98, 0x2D0, 0x128, 0xA8, 0x40, 0x3D8, 0x268;
int fireEndLeaveButton: 0x0441FCB0, 0x98, 0x2D0, 0x128, 0xA8, 0x48, 0x3D8, 0x268;
Expand Down Expand Up @@ -103,7 +104,7 @@ state("fnaf9-Win64-Shipping", "v1.05"){
float posZ: 0x0441D880, 0xDE8, 0x38, 0x0, 0x30, 0x268, 0x298, 0x1D8;

//Buttons that start cutscenes (pressed = 0)
int vannyEndButton: 0x04420F40, 0x98, 0xA0, 0x128, 0xA8, 0x2F8, 0x240;
bool vannyEndButton: 0x04420F40, 0x98, 0xA0, 0x128, 0xA8, 0x2F8, 0x240;
int escapeEndLeaveButtonEast: 0x04420F40, 0x98, 0x2D0, 0x128, 0xA8, 0x38, 0x3E0, 0x268;
int fireEndLeaveButton: 0x04420F40, 0x98, 0x2D0, 0x128, 0xA8, 0x48, 0x3E0, 0x268;
int carEndLeaveButton: 0x04420F40, 0x98, 0x2D0, 0x128, 0xA8, 0x40, 0x3E0, 0x268;
Expand Down Expand Up @@ -174,7 +175,7 @@ state("fnaf9-Win64-Shipping", "v1.07"){
float posZ: 0x0441D9C0, 0xDE8, 0x38, 0x0, 0x30, 0x268, 0x298, 0x1D8;

//Buttons that start cutscenes (pressed = 0)
int vannyEndButton: 0x04421080, 0x98, 0xA0, 0x128, 0xA8, 0x2F8, 0x240;
bool vannyEndButton: 0x04421080, 0x98, 0xA0, 0x128, 0xA8, 0x2F8, 0x240;
int escapeEndLeaveButtonWest: 0x04421080, 0x98, 0x2D0, 0x128, 0xA8, 0x48, 0x3E0, 0x268;
int escapeEndLeaveButtonEast: 0x04421080, 0x98, 0x2D0, 0x128, 0xA8, 0x60, 0x3E0, 0x268;
int carEndLeaveButton: 0x04421080, 0x98, 0x2D0, 0x128, 0xA8, 0x50, 0x3E0, 0x268;
Expand Down Expand Up @@ -221,8 +222,8 @@ state("fnaf9-Win64-Shipping", "v1.07"){
}
//base address change: 8C00
state("fnaf9-Win64-Shipping", "v1.11"){
//Keeps track of Freddy's power
int freddyPower: 0x04424338, 0x8, 0x10, 0x38, 0xB8;
//Keeps track of Freddy's battery popup
int freddyThing: 0x044288B0, 0x128, 0x310, 0x120, 0x230;

//Arcade pointers
int golfStrokeCount: 0x044288B0, 0x128, 0x378, 0x270, 0x230, 0x40;
Expand All @@ -245,7 +246,7 @@ state("fnaf9-Win64-Shipping", "v1.11"){
float posZ: 0x044251F0, 0xDE8, 0x38, 0x0, 0x30, 0x268, 0x298, 0x1D8;

//Buttons that start cutscenes (pressed = 0)
int vannyEndButton: 0x044288B0, 0x98, 0xA0, 0x128, 0xA8, 0x308, 0x240;
bool vannyEndButton: 0x044288B0, 0x98, 0xA0, 0x128, 0xA8, 0x308, 0x240;
int escapeEndLeaveButtonEast: 0x044288B0, 0x98, 0xC80, 0x128, 0xA8, 0x128, 0x3E0, 0x270;
int carEndLeaveButton: 0x044288B0, 0x98, 0x2C8, 0x128, 0xA8, 0x130, 0x3E0, 0x270;
int fireEndLeaveButton: 0x044288B0, 0x98, 0x2C8, 0x128, 0xA8, 0x138, 0x3E0, 0x270;
Expand Down Expand Up @@ -275,7 +276,6 @@ state("fnaf9-Win64-Shipping", "v1.11"){
bool pause: 0x044251F0, 0x8B8;
bool menu: 0x044288B0, 0x128, 0x1A8, 0x20, 0x100, 0xA0, 0x228;
int blackScreen: 0x04453ED8, 0x184;
int freddyThing: 0x044288B0, 0x128, 0x310, 0x120, 0x230;

//Elevator pointers (elevator in motion = 1)
bool kitElev: 0x044288B0, 0x98, 0x7D0, 0x128, 0xA8, 0xB8, 0x2E8;
Expand Down Expand Up @@ -1282,9 +1282,6 @@ start {
print("Loading Constant: " + vars.loadingConstant.ToString());
}
}
if (version != "v1.11"){
vars.freddyThing = 0;
}
});

//Updates refreshRate
Expand Down Expand Up @@ -1330,37 +1327,30 @@ start {
//Resets variables upon stopping timer
vars.resetVariables();

//Start conditions (time, Freddy power, menu)
//Start conditions (time, Freddy power, freddyThing)
if (current.hourClock == -1 && current.minuteClock == 0){
if (current.freddyPower == 30){
if (version == "v1.11" && current.freddyThing == 0 && old.freddyThing == 18){
if (version != "v1.11"){
if (current.freddyPower < old.freddyPower){
print("Start Timer");
return true;
}
else if (old.freddyPower == 100){
}
else if (version == "v1.11"){
if (current.freddyThing == 0 && old.freddyThing != 0){
print("Start Timer");
return true;
}
}
}
}
}

reset {
//Resets variables for certain splits upon starting in freddy
if (current.hourClock == -1 && current.minuteClock == 0){
if (current.freddyPower == 30){
if (version == "v1.11" && current.freddyThing == 0 && old.freddyThing == 18){
//Resets timer upon starting new game
if (settings["Reset Settings"]){
if (old.hourClock != -1){
if (vars.checkTime("Reset On New Game", true, -1, 0)){
return true;
}
else if (old.freddyPower == 100){
return true;
}
}
if (settings["Reset Settings"]){
if (settings["Reset On New Game"]){
if (old.hourClock != -1){
print("Reset Timer");
return true;
}
}
}
}
}
Expand Down Expand Up @@ -1885,12 +1875,10 @@ split {
print("Car Battery Cutscene");
return true;
}
if (settings["CB_B"]){
if (current.carEndLeaveButton < old.carEndLeaveButton){
if (!current.menu){
print("Car Battery Button");
return true;
}
if (settings["CB_B"] && current.carEndLeaveButton == 0 && old.carEndLeaveButton != 0){
if (!current.menu){
print("Car Battery Button");
return true;
}
}
}
Expand All @@ -1900,13 +1888,13 @@ split {
return true;
}
if (settings["E_B"]){
if (current.escapeEndLeaveButtonEast < old.escapeEndLeaveButtonEast){
if (current.escapeEndLeaveButtonEast == 0 && old.escapeEndLeaveButtonEast != 0){
if (!current.menu){
print("Escape (East) Button");
return true;
}
}
if (current.escapeEndLeaveButtonWest < old.escapeEndLeaveButtonWest){
if (current.escapeEndLeaveButtonWest == 0 && old.escapeEndLeaveButtonWest != 0){
if (!current.menu){
print("Escape (West) Button");
return true;
Expand All @@ -1919,7 +1907,7 @@ split {
print("Fire Escape Cutscene");
return true;
}
if (settings["F_B"] && current.fireEndLeaveButton < old.fireEndLeaveButton){
if (settings["F_B"] && current.fireEndLeaveButton == 0 && old.fireEndLeaveButton != 0){
if (!current.menu){
print("Fire Escape Button");
return true;
Expand All @@ -1945,7 +1933,8 @@ split {
print("Vanny Cutscene");
return true;
}
if (settings["V_B"] && current.vannyEndButton < old.vannyEndButton){
print(current.vannyEndButton.ToString());
if (settings["V_B"] && !current.vannyEndButton && old.vannyEndButton){
if (vars.checkPosition("V_B", true, 17550, 17750, 28450, 28740, 2500, 2800)){
return true;
}
Expand Down

0 comments on commit 50935a9

Please sign in to comment.