-
Notifications
You must be signed in to change notification settings - Fork 16
/
ScriptHawk (TAS Safe).lua
70 lines (65 loc) · 2.12 KB
/
ScriptHawk (TAS Safe).lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
TASSafe = true;
local function writeblock(...)
--print("Memory write blocked! Your TAS is safe!");
end
emu.setregister = writeblock;
nes.addgamegenie = writeblock;
mainmemory.writebyte = writeblock;
mainmemory.writebyterange = writeblock;
mainmemory.write_u8 = writeblock;
mainmemory.writefloat = writeblock;
mainmemory.write_s8 = writeblock;
mainmemory.write_u8 = writeblock;
mainmemory.write_s16_le = writeblock;
mainmemory.write_s16_be = writeblock;
mainmemory.write_u16_le = writeblock;
mainmemory.write_u16_be = writeblock;
mainmemory.write_s24_le = writeblock;
mainmemory.write_s24_be = writeblock;
mainmemory.write_u24_le = writeblock;
mainmemory.write_u24_be = writeblock;
mainmemory.write_s32_le = writeblock;
mainmemory.write_s32_be = writeblock;
mainmemory.write_u32_le = writeblock;
mainmemory.write_u32_be = writeblock;
memory.writebyte = writeblock;
memory.writebyterange = writeblock;
memory.write_u8 = writeblock;
memory.writefloat = writeblock;
memory.write_s8 = writeblock;
memory.write_u8 = writeblock;
memory.write_s16_le = writeblock;
memory.write_s16_be = writeblock;
memory.write_u16_le = writeblock;
memory.write_u16_be = writeblock;
memory.write_s24_le = writeblock;
memory.write_s24_be = writeblock;
memory.write_u24_le = writeblock;
memory.write_u24_be = writeblock;
memory.write_s32_le = writeblock;
memory.write_s32_be = writeblock;
memory.write_u32_le = writeblock;
memory.write_u32_be = writeblock;
local result = require("ScriptHawk");
if result == true then
print("This is a special version of ScriptHawk designed to be used while TASing");
print("All memory writes are blocked");
print("Some features may be unavailable in this mode");
ScriptHawk.mode = "TAS";
while true do
if client.ispaused() then
gui.cleartext();
--gui.clearGraphics();
ScriptHawk.UI:updateReadouts();
ScriptHawk.modifyOSDUI:updateReadouts();
ScriptHawk.drawHitboxes();
ScriptHawk.drawHeap();
Game.drawUI();
end
ScriptHawk.processKeybinds(ScriptHawk.keybindsRealtime);
ScriptHawk.processJoypadBinds(ScriptHawk.joypadBindsRealtime);
ScriptHawk.processMouseBinds(ScriptHawk.mouseBinds);
Game.realTime();
emu.yield();
end
end