-
-
Save isakvik/a7c6d878a4a33f01851d8d8f99f73745 to your computer and use it in GitHub Desktop.
AutoSplitter for Getting Over It with Bennett Foddy (furniture tower skip fix)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state("GettingOverIt") | |
{ | |
float timer : 0x105E114, 0x0, 0x360, 0x178, 0x1c, 0x80; | |
float x : 0x105E114, 0xc, 0x360, 0x120, 0xd8, 0x20; | |
float y : 0x105E114, 0x4, 0x2dc, 0x18, 0xc, 0xa0; | |
//float timer : 0x105E114, 0x4, 0x298, 0xc, 0xc, 0x80; | |
//float x : 0x1058870, 0x52c, 0x4cc, 0x360, 0x178, 0x20; | |
//float y : 0x1057C44, 0x28, 0x1c, 0xe0, 0x6b8, 0x30; | |
} | |
startup | |
{ | |
//runs once at the start | |
Func<float, bool> zero = (x) => Math.Abs(x) < 1e-5; | |
vars.zero = zero; | |
refreshRate = 100; | |
} | |
init | |
{ | |
//runs when the game starts | |
} | |
update | |
{ | |
//always runs first, following actions only run when this doesnt return false | |
if(timer.CurrentPhase == TimerPhase.Ended && current.x > 5.8 && current.x < 5.9 && current.y > -1.4 && current.y < -1.25 && current.timer < 0.1 && old.timer == 0) { | |
vars.tm = new TimerModel { CurrentState = timer }; | |
vars.tm.Reset(); | |
} | |
if(current.timer > 0.1 && !vars.zero(current.x) && !vars.zero(current.y)) | |
vars.LastValidTime = current.timer; | |
return true; | |
} | |
isLoading | |
{ | |
return true; | |
} | |
gameTime | |
{ | |
return TimeSpan.FromSeconds(System.Convert.ToDouble(vars.LastValidTime)); | |
} | |
reset | |
{ | |
//only runs if timer is running or paused | |
return current.x > 5.8 && current.x < 5.9 && current.y > -1.4 && current.y < -1.25 && current.timer < 0.1 && old.timer == 0; | |
} | |
split | |
{ | |
//runs when reset doesnt return true | |
if(!old.Tutorial && (current.x > 57 && current.x < 63) && (current.y > 3 && current.y < 20)) { | |
current.Tutorial = true; | |
return true; | |
} | |
if(!old.Chimney && (current.x > 187 && current.x < 195) && (current.y > 81 && current.y < 92)) { | |
current.Chimney = true; | |
return true; | |
} | |
if(!old.Slide && (current.x > 333 && current.x < 340) && (current.y > 120 && current.y < 130)) { | |
current.Slide = true; | |
return true; | |
} | |
if(!old.Furniture && (current.x > 398 && current.x < 402) && (current.y > 162 && current.y < 167)) { | |
current.Furniture = true; | |
return true; | |
} | |
if(!old.Orange && (current.x > 466 && current.x < 470) && (current.y > 216 && current.y < 222)) { | |
current.Orange = true; | |
return true; | |
} | |
if(!old.Anvil && (current.x > 544 && current.x < 550) && (current.y > 249 && current.y < 254)) { | |
current.Anvil = true; | |
return true; | |
} | |
if(!old.Bucket && (current.x > 655 && current.x < 660) && (current.y > 279 && current.y < 285)) { | |
current.Bucket = true; | |
return true; | |
} | |
if(!old.IceMountain && (current.x > 701 && current.x < 706) && (current.y > 317 && current.y < 323)) { | |
current.IceMountain = true; | |
return true; | |
} | |
if(!old.Tower && (current.y > 359 && current.y < 365)) { | |
current.Tower = true; | |
return true; | |
} | |
if(!current.EnabledEnd && current.y > 473) { | |
current.EnabledEnd = true; | |
} | |
if(!old.End && current.EnabledEnd && vars.zero(current.timer) && vars.zero(current.x) && vars.zero(current.y)) { | |
current.End = true; | |
return true; | |
} | |
} | |
start | |
{ | |
//runs when update didnt return false, and timer is not running and not paused | |
//Set Start Up State | |
current.Tutorial = false; | |
old.Tutorial = false; | |
current.Chimney = false; | |
old.Chimney = false; | |
current.Slide = false; | |
old.Slide = false; | |
current.Furniture = false; | |
old.Furniture = false; | |
current.Orange = false; | |
old.Orange = false; | |
current.Anvil = false; | |
old.Anvil = false; | |
current.Bucket = false; | |
old.Bucket = false; | |
current.IceMountain = false; | |
old.IceMountain = false; | |
current.Tower = false; | |
old.Tower = false; | |
current.End = false; | |
old.End = false; | |
old.EnabledEnd = false; | |
current.EnabledEnd = false; | |
vars.LastValidTime = 0.0; | |
current.GameTime = TimeSpan.Zero; | |
return current.timer > 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment