User File #638758678769027522

Upload All User Files

#638758678769027522 - Crazy Castle 3 room script

CC3-room-script.lua
0 downloads
Uploaded 12 hours ago by Winslinator (see all 27)
This script will automatically navigate the player through each of the small item rooms as fast as possible. I used it to check if the the current TAS navigates through every item room optimally, and indeed it does!
--uncomment lines containing tastudio.togglerecording() if working in TAStudio

while true do

x1 = mainmemory.read_u16_le(0x1834)

if x1 > 56 and x1 <= 76 then
	joypad.set({Up=true})
	joypad.set({["P1 Up"]=true})
end

if x1 > 76 then
	joypad.set({Left=true})
	joypad.set({["P1 Left"]=true})
end

emu.frameadvance()	

x2 = mainmemory.read_u16_le(0x1834)
	if x1 == 56 and x2 > 56 then
		for i=1,4,1 do
			joypad.set({Up=true})
			joypad.set({["P1 Up"]=true})
			emu.frameadvance()
		end
		--tastudio.togglerecording()
	end

	if x1 > 56 and x2 == 56 then
		for i=1,4,1 do
			joypad.set({Up=true})
			joypad.set({["P1 Up"]=true})
			emu.frameadvance()
		end
		--tastudio.togglerecording()
	end

end