-
-
Save just-ero/5113900aea2e76da8efa55596bdbd940 to your computer and use it in GitHub Desktop.
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("ChainedTogether-Win64-Shipping") | |
{ | |
double X : 0x6F65C48, 0x1B8, 0x38, 0x0, 0x30, 0x2D8, 0x1A0, 0x128; | |
double Y : 0x6F65C48, 0x1B8, 0x38, 0x0, 0x30, 0x2D8, 0x1A0, 0x130; | |
double Z : 0x6F65C48, 0x1B8, 0x38, 0x0, 0x30, 0x2D8, 0x1A0, 0x138; | |
int Timer : 0x6F65C48, 0x158, 0x320; | |
} | |
startup | |
{ | |
vars.Splits = new Dictionary<string, double[]> | |
{ | |
{ "Underworld (73m)", new[] { 48169.700, -6670.38, 10415.32, 1600 } }, | |
{ "- First Ladder", new[] { 57607.000, 57647.00, -4686.00, -4602 } }, | |
{ "Hell Cliffs (196m)", new[] { 58518.040, -5896.68, 22762.73, 600 } }, | |
{ "- Hell Cliffs Drone (258m)", new[] { 63361.970, -7714.82, 28700.00, 85 } }, | |
{ "The Car Race (313m)", new[] { 60736.000, -5806.00, 34473.00, 2000 } }, | |
{ "- Rotating Cube (372m)", new[] { 57840.650, -4092.85, 40061.93, 550 } }, | |
{ "The Whispering Vault (446m)", new[] { 47380.000 } }, | |
{ "- Open The Door (515m)", new[] { 70099.820, -12091.44, 54309.28, 1000 } }, | |
{ "The Aqua Maze (582m)", new[] { 56175.000, -9616.00, 61161.00, 1900 } }, | |
{ "The Subway Station (634m)", new[] { 61164.220, -16430.15, 66112.40, 875 } }, | |
{ "- Station Drone (688m)", new[] { 43285.670, -19387.02, 71659.89, 85 } }, | |
{ "- Red Elevator to City (830m)", new[] { 55934.050, -7474.58, 85888.98, 360 } }, | |
{ "The City (1115m)", new[] { 114310.000 } }, | |
{ "- City Crane (1167m)", new[] { 64600.000, -5950.00, 119450.00, 2340 } }, | |
{ "- Double Crane Platforms (1228m)", new[] { 54706.000, -8769.00, 125606.00, 2350 } }, | |
{ "- Elevator to Buildings (1305m)", new[] { 59656.000, -7845.00, 133400.00, 1050 } }, | |
{ "Over The Buildings (1370m)", new[] { 139850.000 } }, | |
{ "- Buildings Helicopter (1462m)", new[] { 61241.000, -7060.00, 149050.00, 150 } }, | |
{ "The Warehouse (1532m)", new[] { 155996.000 } }, | |
{ "The Harbor (1647m)", new[] { 58833.190, -10168.21, 167476.00, 4100 } }, | |
{ "- Blue Railing Chariot (1726m)", new[] { 55267.000, -9424.00, 175450.00, 2200 } }, | |
{ "- Elevator to stairs (1773m)", new[] { 60015.000, -5540.00, 180200.00, 1550 } }, | |
{ "- Helicopter to Temple (2008m)", new[] { 63676.359, -12937.55, 203690.00, 150 } }, | |
{ "The Temple (2105m)", new[] { 209230.000 } }, | |
{ "- Elevator to Asian Shrine (2301m)", new[] { 60844.000, -13114.00, 233000.00, 1800 } }, | |
{ "The Asian Shrine (2414m)", new[] { 244140.000 } }, | |
{ "- Wooden Horse Wagon (2678m)", new[] { 57636.000, -9231.00, 270700.00, 1300 } }, | |
{ "The Deities (2757m)", new[] { 40703.730, -1902.68, 278480.62, 2270 } }, | |
{ "- Wooden Boat (2819m)", new[] { 52432.000, -1512.00, 284710.00, 1600 } }, | |
{ "- Zeus Lightning (2989m)", new[] { 81930.000, -23160.00, 301710.00, 610 } }, | |
{ "- Air Balloon Pump (3044m)", new[] { 45515.000, -11171.00, 307250.00, 100 } }, | |
{ "The Garden (3282m)", new[] { 47610.460, -11083.54, 334514.26, 4200 } }, | |
{ "The Final Trials (3352m)", new[] { 56907.000, -32509.00, 337997.00, 940 } }, | |
{ "- Kiosk (3485m)", new[] { 56351.000, -23282.00, 351400.00, 650 } }, | |
{ "- Carriage (3547m)", new[] { 60435.000, -27560.00, 357470.00, 450 } }, | |
{ "The Sun (3658m)", new[] { 89000.000, -4500.00, 373000.00, 8500 } }, | |
}; | |
foreach (var key in vars.Splits.Key) | |
settings.Add(key, key[0] != '-'); | |
vars.GetDistance = (Func<double, double, double, double, double, double, double>)((x1, y1, z1, x2, y2, z2) => { | |
double dx = x2 - x1; | |
double dy = y2 - y1; | |
double dz = z2 - z1; | |
return Math.Sqrt(dx * dx + dy * dy + dz * dz); | |
}); | |
vars.CompletedSplits = new HashSet<string>(); | |
} | |
onStart | |
{ | |
vars.CompletedSplits.Clear(); | |
timer.StartTime = TimeStamp.Now - (TimeSpan.FromSeconds(-1)); | |
} | |
start | |
{ | |
return old.Timer == 0 && current.Timer == 1; | |
} | |
gameTime | |
{ | |
return TimeSpan.FromSeconds(current.Timer); | |
} | |
reset | |
{ | |
return old.Timer > 0 && current.Timer == 0; | |
} | |
split | |
{ | |
foreach (var entry in vars.Splits) | |
{ | |
var key = entry.Key; | |
var values = entry.Value; | |
if (!settings[key] || vars.CompletedSplits.Contains(key)) | |
continue; | |
switch (values.Length) | |
{ | |
case 0: | |
return current.X == 0 && current.Y == 0 && current.Z == 0; | |
case 1: | |
return current.Z >= values[0]; | |
default: | |
double d = vars.GetDistance(current.X, current.Y, current.Z, values[0], values[1], values[2]); | |
double r = values[3]; | |
if (key == "The Harbor (1647m)") | |
return d <= r && current.Z >= values[2]; | |
else if (key == "- First Ladder") | |
return values[0] <= current.X && current.X <= values[1] && values[2] <= current.Y && current.Y <= values[3]; | |
else | |
return d <= r; | |
} | |
} | |
} | |
onSplit | |
{ | |
vars.currSplit++; | |
} | |
onReset | |
{ | |
vars.currSplit = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment