ColdWarZombies.asl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // An Autosplitter made for BOCW for zombies
  2. // This usually will have some bugs just because online MP will always be trash
  3. // Message KunoDemetries#6969 on discord if there is a problem or join the zombies discord
  4. state("BlackOpsColdWar")
  5. {
  6. int round : 0x108C640C; // A built in counter for rounds (TY 3arc)
  7. int loading1 : 0xF5F3C70; // taken from the campaign load remover because it works here
  8. }
  9. startup
  10. {
  11. settings.Add("rounders", false, "Round Splits"); // A grouping for settings for rounds
  12. vars.rounds = new Dictionary<string,string> // creating a string dictionary
  13. {
  14. {"2","Round 2"},
  15. {"3","Round 3"},
  16. {"4","Round 4"},
  17. {"5","Round 5"},
  18. {"10","Round 10"},
  19. {"15","Round 15"},
  20. {"30","Round 30"},
  21. {"50","Round 50"},
  22. {"70","Round 70"},
  23. {"100","Round 100"},
  24. };
  25. foreach (var Tag in vars.rounds) // setting each variable in the Dictionary to the word tag rounders to link it to the master setting
  26. {
  27. settings.Add(Tag.Key, true, Tag.Value, "rounders");
  28. };
  29. vars.onStart = (EventHandler)((s, e) => // thanks gelly for this, it's basically making sure it always clears the vars no matter how livesplit starts
  30. {
  31. vars.starter = true; // setting the gameTimer to true
  32. });
  33. timer.OnStart += vars.onStart;
  34. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  35. {
  36. var timingMessage = MessageBox.Show (
  37. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  38. "LiveSplit is currently set to show Real Time (RTA).\n"+
  39. "Would you like to set the timing method to Game Time? This will make verification easier",
  40. "LiveSplit | Call of Duty: Black Ops Cold War Zombies",
  41. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  42. );
  43. if (timingMessage == DialogResult.Yes)
  44. {
  45. timer.CurrentTimingMethod = TimingMethod.GameTime;
  46. }
  47. }
  48. }
  49. init // creating strings just for functioning the split and start a little clearer
  50. {
  51. vars.doneMaps = new List<string>();
  52. vars.starter = false; // used to activate the gameTime setting
  53. }
  54. start
  55. {
  56. if ((current.round == 1) && (current.loading1 != 0)) // if round is 1 and loading is done start
  57. {
  58. vars.starter = true; // setting the gameTimer to true
  59. return true; // returning true to start the timer
  60. }
  61. }
  62. split
  63. {
  64. return ((settings[(current.round.ToString())]) && (current.round != old.round));
  65. }
  66. gameTime
  67. {
  68. if ((vars.starter == true) && (current.round == 1) && (current.loading1 != 0)) // doing a check if were actually playing
  69. {
  70. vars.starter = false; //setting the starter to false for the next run (could also do this in reset)
  71. return TimeSpan.FromSeconds(-10); // removing 10 seconds to match up with the timing method (could also be used to add time)
  72. }
  73. }
  74. reset
  75. {
  76. return (current.round == 0); // if you're back in main menu round is 0
  77. }
  78. exit
  79. {
  80. timer.OnStart -= vars.onStart;
  81. }