Plays through Clue using Deign's solution and an ideal RNG seed.
To use it you will need to make a savestate at frame 0.
local i=0
--savestate at frame 0
savestate.load("clue_power_on.State")
-- deign's solution has seed 90
memory.write_u8(9,90)
input_to_game=joypad.get(1)
while i<1614 do
--do menu inputs
input_to_game["Left"]=false
input_to_game["Right"]=false
input_to_game["Up"]=false
input_to_game["Down"]=false
input_to_game["Start"]=false
input_to_game["Select"]=false
input_to_game["A"]=false
input_to_game["B"]=false
input_to_game["X"]=false
input_to_game["Y"]=false
input_to_game["l"]=false
input_to_game["r"]=false
if i==139 then
input_to_game["Start"]=true
end
if i==173 then
input_to_game["Up"]=true
end
if i==174 then
input_to_game["Start"]=true
end
if i==214 then
input_to_game["A"]=true
end
if i==254 then
input_to_game["X"]=true
end
if i==287 then
input_to_game["A"]=true
end
if i==320 then
input_to_game["X"]=true
end
if i==360 then
input_to_game["A"]=true
end
if i==393 then
input_to_game["X"]=true
end
if i==426 then
input_to_game["A"]=true
end
if i==466 then
input_to_game["X"]=true
end
if i==499 then
input_to_game["A"]=true
end
if i==532 then
input_to_game["B"]=true
end
if i==566 then
input_to_game["Start"]=true
end
if i==831 then
input_to_game["Up"]=true
end
if i==833 then
input_to_game["Up"]=true
end
if i==834 then
input_to_game["A"]=true
end
if i==913 then
input_to_game["Up"]=true
end
if i==914 then
input_to_game["A"]=true
end
if i==968 then
input_to_game["Left"]=true
end
if i==969 then
input_to_game["A"]=true
end
if i==1024 then
input_to_game["Right"]=true
end
if i==1025 then
input_to_game["Down"]=true
end
if i==1026 then
input_to_game["A"]=true
end
if i>1100 then
if math.fmod(i,2)>0 then input_to_game["X"]=true end
if math.fmod(i,2)==0 then input_to_game["A"]=true end
end
joypad.set(input_to_game,1)
gui.text(20,20,string.format('%d',i),"white")
emu.frameadvance()
i=i+1
end