to run with the bk2
xTemp = 0
yTemp = 0
zTemp = 0
function pokeLag()
inputs = joypad.getimmediate()
inputsTS = movie.getinput(emu.framecount())
if inputs["P1 DPad D"] then
setPos()
end
if inputsTS["P1 DPad D"] then
setPos()
end
end
function cs(xT,yT,zT)
xTemp = xT
zTemp = zT
end
function setPos()
fr = emu.framecount()
if fr < 999999 then
xPos = 6140.2187570266
zPos = 2811.1621740723
elseif fr > 11000 and fr < 12000 then --ffm bit clip
xPos = -1005.206
zPos = 420.29
--xPos = -0.000001
--zPos = 959.92384
--Game.setPosition(-0.000001, 0, 959.92384)
elseif fr > 12000 and fr < 13000 then --mm early
xPos = 3698.8178710938
zPos = -2085.7736816406
elseif fr > 15000 and fr < 16000 then --Clip near chimpy
xPos = -5284.0688
zPos = 5933.8516
elseif fr > 17000 and fr < 17500 then --50 skip
xPos = -2354.6667
zPos = -3550.525
elseif fr > 17500 and fr < 18000 then --pink clip
xPos = -254.6172
zPos = 4055.6897
elseif fr > 18000 and fr < 19500 then --pipe room clip
xPos = -91.632
zPos = -533.776
elseif fr > 19500 and fr < 20000 then --180 skip
xPos = -1421.1462599989
zPos = -681.88204099915
elseif fr > 20000 and fr < 21000 then --260 skip
xPos = 3511.01
zPos = 272.13
elseif fr > 21000 and fr < 23000 then --350 skip
xPos = 1528.40466
zPos = -107.80102
elseif fr > 24300 and fr < 25300 then --MMM Early
xPos = -137.39240913391
zPos = 308.39746418666
elseif fr > 25300 and fr < 26000 then --Cellar Clip
xPos = -949.99469360352
zPos = 437.50729629516
elseif fr > 29000 and fr < 29800 then --Napper Clip
xPos = -137.60519653321
zPos = -2363.2022659681
elseif fr > 29800 and fr < 30800 then --Near pool Clip
xPos = 3499.9883984375
zPos = 60.004640625
elseif fr > 33500 and fr < 34500 then --Clip in Mumbos
xPos = -271.39830810547
zPos = -77.001107788086
elseif fr > 43000 and fr < 44200 then --Clip near water
xPos = -1144.7769781494
zPos = 1484.0933687061
elseif fr > 45000 and fr < 46000 then --Clip near 640
xPos = 1145.3966162109
zPos = -82.597984484159
elseif fr > 46500 and fr < 47500 then --Clip near 765
xPos = 2440.4487304687500000
zPos = 910.6121215820312500
elseif fr > 47500 and fr < 48200 then --FF Skip
xPos = 1863
zPos = -3724
elseif fr > 48200 and fr < 49200 then --810 Skip
xPos = -347.23098754883
zPos = 650.10699462891
end
mainmemory.writefloat(0x37CF70, xPos, true);
mainmemory.writefloat(0x37CF70 + 0x10, xPos, true);
mainmemory.writefloat(0x37CF78, zPos, true);
mainmemory.writefloat(0x37CF78 + 0x10, zPos, true);
end
event.onframestart(pokeLag)