forked from gaithern/KH-1FM-AP-LUA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1fmAPEotWFlagFixes.lua
36 lines (32 loc) · 1.08 KB
/
1fmAPEotWFlagFixes.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
-----------------------------------
------ Kingdom Hearts 1 FM AP -----
------ by Gicu -----
-----------------------------------
LUAGUI_NAME = "kh1fmAP"
LUAGUI_AUTH = "Sonicshadowsilver2"
LUAGUI_DESC = "Kingdom Hearts 1FM AP Integration"
Now = 0x233CADC - 0x3A0606
RoomFlags = 0x2DE7AAE - 0x3A0606
CutsceneFlags = 0x2DE63D0 - 0x3A0606
canExecute = false
function _OnInit()
if GAME_ID == 0xAF71841E and ENGINE_TYPE == "BACKEND" then
canExecute = true
ConsolePrint("KH1 detected, running script")
else
ConsolePrint("KH1 not detected, not running script")
end
end
function _OnFrame()
if canExecute then
if ReadByte(CutsceneFlags+0x0B0F) == 0x08 and ReadByte(CutsceneFlags+0x020D) == 0x00 then
WriteByte(CutsceneFlags+0x020D, 0x01)
WriteByte(RoomFlags+0x55, 0x0D)
WriteByte(RoomFlags+0x58, 0x0D)
WriteByte(RoomFlags+0x5B, 0x0D)
WriteByte(RoomFlags+0x5F, 0x0D)
WriteInt(RoomFlags+0x61, 0x0D0D0D0D)
WriteInt(RoomFlags+0x65, 0x0D0D0D0D)
end
end
end