Dialog Skip:
Download DialogSkip.luaLanguage: lua
-- press the X button at the first possible
-- frame after each box of dialogue
pReady = { 0x83014, 0x83018, 0x83054, 0x830CC, 0x8308C, 0x83090 }
btPressed = { 0, 0, 0, 0, 0, 0 }
while (true) do
for i = 1,# btPressed do
ready = memory.readbyte(pReady[i])
if ready == 1 then
if btPressed[i] == 0 or btPressed[i] == 10 then
joypad.set(1,{["x"]=true})
emu.frameadvance()
joypad.set(1,{["x"]=true})
btPressed[i] = 1
end
elseif ready == 10 then
if btPressed[i] == 0 or btPressed[i] == 1 then
joypad.set(1,{["x"]=true})
emu.frameadvance()
joypad.set(1,{["x"]=true})
btPressed[i] = 10
end
else
btPressed[i] = 0
end
-- gui.text(40,10+(i*8),btPressed[i] .. " " .. ready)
end
-- mem = 0x83088
-- for i=0,32 do
-- gui.text(40,10+(i*8),mem+(i*4) .. " " .. memory.readbyte(mem+(i*4)))
-- end
emu.frameadvance()
end
Step Script
StepVals = {7, 182, 240, 31, 85, 91, 55, 227, 174, 79, 178, 94, 153, 246, 119, 203, 96, 143, 67, 62, 167, 76, 45, 136, 199, 104, 215, 209, 194, 242, 193, 221, 170, 147, 22, 247, 38,
4, 54, 161, 70, 78, 86, 190, 108, 110, 128, 213, 181, 142, 164, 158, 231, 202, 206, 33, 255, 15, 212, 140, 230, 211, 152, 71, 244, 13, 21, 237, 196, 228, 53, 120, 186, 218, 39, 97,
171, 185, 195, 125, 133, 252, 149, 107, 48, 173, 134, 0, 141, 205, 126, 159, 229, 239, 219, 89, 235, 5, 20, 201, 36, 44, 160, 60, 68, 105, 64, 113, 100, 58, 116, 124, 132, 19, 148,
156, 150, 172, 180, 188, 3, 222, 84, 220, 197, 216, 12, 183, 37, 11, 1, 28, 35, 43, 51, 59, 151, 27, 98, 47, 176, 224, 115, 204, 2, 74, 254, 155, 163, 109, 25, 56, 117, 189, 102, 135,
63, 175, 243, 251, 131, 10, 18, 26, 34, 83, 144, 207, 122, 139, 82, 90, 73, 106, 114, 40, 88, 138, 191, 14, 6, 162, 253, 250, 65, 101, 210, 77, 226, 92, 29, 69, 30, 9, 17, 179, 95, 41,
121, 57, 46, 42, 81, 217, 93, 166, 234, 49, 129, 137, 16, 103, 245, 169, 66, 130, 112, 157, 146, 87, 225, 61, 241, 249, 238, 8, 145, 24, 32, 177, 165, 187, 198, 72, 80, 154, 214, 127,
123, 233, 117, 223, 50, 111, 52, 168, 208, 184, 99, 200, 192, 236, 75, 232, 23, 248};
Offsync = 0x8005F150;
StepLoc = 0x0005F151;
StepLoc2 = 0x0005F164;
DangerLoc = 0x0005F0FE;
AngeloLoc = 0x00077E9A;
function GetNextEncounter()
Danger = memory.readbyte(DangerLoc);
Step = memory.readbyte(StepLoc);
WalkStep = 0;
while (Danger < StepVals[math.mod(Step,256)+1]) do
WalkStep = WalkStep+1;
Step = Step + 1;
Danger = Danger + 2;
end;
Danger = memory.readbyte(DangerLoc);
Step = memory.readbyte(StepLoc);
RunStep = 0;
while (Danger < StepVals[math.mod(Step,256)+1]) do
RunStep = RunStep+1;
Step = Step + 1;
Danger = Danger + 5;
end;
gui.text(120,1,string.format("Walk: %d Run: %d",WalkStep,RunStep));
gui.text(120,11,string.format("Step: %.2f Danger: %d", memory.readbyte(StepLoc) + memory.readword(StepLoc2)/256, memory.readbyte(DangerLoc)));
gui.text(120,21,string.format("Angelo Steps: %d", memory.readbyte(AngeloLoc)));
end;
while true do
emu.frameadvance();
GetNextEncounter();
end;