UnderTheWaves.asl 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. state("UnderTheWaves-Win64-Shipping")
  2. {
  3. string100 CurSubtitles : "EOSSDK-Win64-Shipping.dll", 0x01552468, 0x68, 0x68, 0x100, 0x0, 0x108, 0x28, 0xE;
  4. }
  5. init
  6. {
  7. vars.doneMaps = new List<string>();
  8. vars.CanStart = false;
  9. vars.EndList = new List<string>
  10. (){
  11. "... what...? [Gasp] ... Pearl? Pearl?",
  12. "Qu’est-ce que... ? [Cri étouffé] Pearl ?... Pearl ?",
  13. "Was ...? [Flüster] Pearl ...? Pearl? Pearl?",
  14. "Cosa...? [Sussulta] Pearl?... Pearl?",
  15. "¿Qué...? Ah... ¿Pearl...? ¿Pearl?",
  16. "什么……?[喘气]珀尔?……珀尔?",
  17. "怎麼……?[喘氣]珀爾?……珀爾?",
  18. "뭐...? [헉 하는 소리] 펄?... 펄?",
  19. "え…?[息をのむ]パール?… パールなのか?",
  20. "ما...؟ [لهاث] \"بيرل\"؟... \"بيرل\"؟",
  21. "Wat...? [hapt naar adem] Pearl...? Pearl?",
  22. "Co...? [Dyszy] Pearl? ... Pearl?",
  23. "O quê? [Arfada] Pearl? ... Pearl?",
  24. "Что...? [тяжело дышит] Перл?... Перл?",
  25. "¿Qué...? [Jadea] ¿Pearl?... ¿Pearl?",
  26. "Τι...; [Πνιχτά] Περλ;... Περλ;",
  27. "Mi...? [zihálás] Pearl?... Pearl?",
  28. "O que...? [Ofegante] Pearl?... Pearl?",
  29. "Co...? [Zalapání] Pearl...? Pearl?",
  30. "อะไรน่ะ...? [หอบ] เพิร์ล?... เพิร์ล?",
  31. "Ne... [Yutkunma] Pearl?.. Pearl?"
  32. };
  33. // Code stipet written by just_ero, derived from Micrologist's original codework on UE4 sigscanning
  34. Func<int, string, IntPtr> scan = (offset, pattern) => {
  35. var scn = new SignatureScanner(game, game.MainModule.BaseAddress, game.MainModule.ModuleMemorySize);
  36. var pttern = new SigScanTarget(offset, pattern);
  37. var ptr = scn.Scan(pttern);
  38. return ptr + 0x4 + game.ReadValue<int>(ptr);
  39. };
  40. // GameEngine and Loading are both generic scans found by Micrologist
  41. vars.GameEngine = scan(0x3, "48 89 05 ?? ?? ?? ?? 48 85 c9 74 ?? e8 ?? ?? ?? ?? 48 8d 4d");
  42. vars.Loading = scan(0x5, "89 43 60 8B 05 ?? ?? ?? ??");
  43. vars.InteractionList = scan( 0x3, "48 8d 0d ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8b 05 ?? ?? ?? ?? 4c 89 24 d8 49 8b 8c 24");
  44. vars.Day = scan(0x3, "48 8d 0d ?? ?? ?? ?? e8 ?? ?? ?? ?? 83 fb ?? 72 ?? d1 eb 83 c3 ?? 8b c3 48 03 c0 49 0b c4");
  45. print(vars.GameEngine.ToString("X"));
  46. print(vars.Day.ToString("X"));
  47. vars.watchers = new MemoryWatcherList
  48. {
  49. //vars.engine
  50. new StringWatcher(new DeepPointer(vars.GameEngine, 0x8B0, 0x0), 150) { Name = "CurMap"},
  51. //vars.loading
  52. new MemoryWatcher<int>(new DeepPointer(vars.Loading)) {Name = "Loading"},
  53. //vars.interactivelist
  54. new MemoryWatcher<bool>(new DeepPointer(vars.InteractionList, 0x178, 0x4B8, 0x692)) {Name = "bCinematicHideHud"},
  55. //vars.day
  56. new MemoryWatcher<int>(new DeepPointer(vars.Day, 0x150, 0x30, 0x0, 0x20, 0x20, 0x20, 0x290)) {Name = "CurDay"},
  57. };
  58. }
  59. startup
  60. {
  61. settings.Add("UTW", true, "Under The Waves");
  62. settings.Add("End", true, "End split?");
  63. vars.missions = new Dictionary<string,string>
  64. {
  65. {"2", "Day 2"},
  66. {"3", "Day 3"},
  67. {"14", "Day 14"},
  68. {"15", "Day 15"},
  69. {"16", "Day 16"},
  70. {"17", "Day 17"},
  71. };
  72. foreach (var Tag in vars.missions)
  73. {
  74. settings.Add(Tag.Key, true, Tag.Value, "UTW");
  75. };
  76. }
  77. update
  78. {
  79. vars.watchers.UpdateAll(game);
  80. //vars.gamengine
  81. current.CurMap = vars.watchers["CurMap"].Current;
  82. //print(vars.watchers["CurMap"].Current.ToString());
  83. old.CurMap = vars.watchers["CurMap"].Old;
  84. //vars.loading
  85. current.isLoading = vars.watchers["Loading"].Current;
  86. //vars.interactivelist
  87. current.bCinematicHideHud = vars.watchers["bCinematicHideHud"].Current;
  88. //vars.day
  89. current.CurDay = vars.watchers["CurDay"].Current.ToString();
  90. print(current.CurMap);
  91. if (old.CurMap.Contains("MainMenu"))
  92. {
  93. vars.CanStart = true;
  94. // print("True");
  95. }
  96. }
  97. start
  98. {
  99. return ((vars.CanStart) && (!current.bCinematicHideHud) && (current.CurDay == "1"));
  100. }
  101. onStart
  102. {
  103. vars.doneMaps.Add(current.CurDay);
  104. vars.CanStart = false;
  105. }
  106. split
  107. {
  108. if (settings[current.CurDay] && (!vars.doneMaps.Contains(current.CurDay)) && (current.bCinematicHideHud) && (!current.CurMap.Contains("MainMenu")))
  109. {
  110. vars.doneMaps.Add(current.CurDay);
  111. return true;
  112. }
  113. if ((settings["End"]) && (current.CurMap.Contains("Boat_End") | (current.CurMap.Contains("Beach_End"))))
  114. {
  115. return true;
  116. }
  117. }
  118. isLoading
  119. {
  120. return ((current.isLoading != 0));
  121. }
  122. reset
  123. {
  124. }
  125. onReset
  126. {
  127. vars.CanStart = false;
  128. vars.doneMaps.Clear();
  129. }