jaune = Color.new (255,255,0)

file = io.open("Cache/num.txt", "r")

chiffre = file:read()

file:close()

screen:blit(0,0,fond)
screen:print(150,140,"Recherche en cours...",blanc)

if chiffre < "80020035" and chiffre > "80020001" or chiffre == "0" then
screen.flip()
screen.waitVblankStart(75) 
dofile("Pages/1.lua")
elseif chiffre < "80020001" and chiffre ~= "0" then
screen:print(70,160,"Impossible de trouver le code recherche...",jaune)
screen:print(170,170,"Retour au menu...",jaune)
screen.flip() 
screen.waitVblankStart(100) 
dofile("menu.lua")
elseif chiffre > "80020450" then
screen:print(70,160,"Impossible de trouver le code recherche...",jaune)
screen:print(170,170,"Retour au menu...",jaune)
screen.flip() 
screen.waitVblankStart(100) 
dofile("menu.lua")
elseif chiffre > "80020034" and chiffre < "80020065" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/2.lua")
elseif chiffre > "80020064" and chiffre < "80020070" or chiffre == "8002006a" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/3.lua")
elseif chiffre > "80020095" and chiffre < "80020099" or chiffre == "8002006b" or chiffre == "8002006c" or chiffre == "8002006d" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/4.lua")
elseif chiffre == "80020099" or chiffre == "8002009a" or chiffre == "8002009b" or chiffre == "8002009c" or chiffre == "800200a0" or chiffre == "800200a1" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/5.lua")
elseif chiffre == "800200a2" or chiffre == "800200c8" or chiffre == "800200c9" or chiffre == "800200ca" or chiffre == "800200cb" or chiffre == "800200cc" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/6.lua")
elseif chiffre == "800200cd" or chiffre == "800200ce" or chiffre == "800200cf" or chiffre == "800200d0" or chiffre == "800200d1" or chiffre == "800200d2" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/7.lua")
elseif chiffre == "800200d3" or chiffre == "800200d4" or chiffre == "800200d5" or chiffre == "800200d6" or chiffre == "800200d7" or chiffre == "800200d8" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/8.lua")
elseif chiffre == "800200d9" or chiffre == "800200da" or chiffre == "800200db" or chiffre == "800200dc" or chiffre == "800200dd" or chiffre == "800200de" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/9.lua")
elseif chiffre == "800200df" or chiffre == "800200e0" or chiffre == "8002012c" or chiffre == "8002012d" or chiffre == "8002012e" or chiffre == "8002012f" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/10.lua")
elseif chiffre > "80020129" and chiffre < "80020136" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/11.lua")
elseif chiffre > "80020135" and chiffre < "80020140" or chiffre == "8002013a" or chiffre == "8002013b" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/12.lua")
elseif chiffre > "80020139" and chiffre < "80020143" or chiffre == "8002013e" or chiffre == "8002013d" or chiffre == "8002013c" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/13.lua")
elseif chiffre > "80020142" and chiffre < "80020149" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/14.lua")
elseif chiffre == "8002014d" or chiffre == "8002014c" or chiffre == "8002014b" or chiffre == "8002014a" or chiffre == "80020190" or chiffre == "80020149" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/15.lua")
elseif chiffre > "80020190" and chiffre < "80020197" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/16.lua")
elseif chiffre > "80020196" and chiffre < "80020200" or chiffre == "8002019a" or chiffre == "8002019b" or chiffre == "8002019c" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/17.lua")
elseif chiffre == "8002019d" or chiffre == "8002019e" or chiffre == "8002019f" or chiffre == "800201a0" or chiffre == "800201a1" or chiffre == "800201a2" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/18.lua")
elseif chiffre == "800201a3" or chiffre == "800201a4" or chiffre == "800201a5" or chiffre == "800201a6" or chiffre == "800201a7" or chiffre == "800201a8" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/19.lua")
elseif chiffre == "800201a9" or chiffre == "800201aa" or chiffre == "800201ab" or chiffre == "800201ac" or chiffre == "800201ad" or chiffre == "800201ae" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/20.lua")
elseif chiffre == "800201af" or chiffre == "800201b0" or chiffre == "800201b1" or chiffre == "800201b2" or chiffre == "800201b3" or chiffre == "800201b4" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/21.lua")
elseif chiffre == "800201b5" or chiffre == "800201b6" or chiffre == "800201b7" or chiffre == "800201b8" or chiffre == "800201b9" or chiffre == "800201ba" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/22.lua")
elseif chiffre == "800201bb" or chiffre == "800201bc" or chiffre == "800201bd" or chiffre == "800201be" or chiffre == "800201bf" or chiffre == "800201c0" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/23.lua")
elseif chiffre == "800201c1" or chiffre == "800201c2" or chiffre == "80020258" or chiffre == "80020259" or chiffre == "8002025a" or chiffre == "8002025b" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/24.lua")
elseif chiffre == "8002025c" or chiffre == "8002025d" or chiffre == "8002025e" or chiffre == "8002025f" or chiffre == "80020260" or chiffre == "80020261" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/25.lua")
elseif chiffre > "80020261" and chiffre < "80020268" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/26.lua")
elseif chiffre == "800202bc" or chiffre == "800202bd" or chiffre == "800202be" or chiffre == "800202bf" or chiffre == "800202c0" or chiffre == "800202c1" then
screen.flip() 
screen.waitVblankStart(75) 
ofile("Pages/27.lua")
elseif chiffre == "800202c2" or chiffre == "800202c3" or chiffre == "800202c4" or chiffre == "800202c5" or chiffre == "800202c6" or chiffre == "800202c7" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/28.lua")
elseif chiffre == "800202c8" or chiffre == "800202c9" or chiffre == "800202ca" or chiffre == "800202cb" or chiffre == "800202cc" or chiffre == "800202cd" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/29.lua")
elseif chiffre > "80020319" and chiffre < "80020324" or chiffre == "800202ce" or chiffre == "800202cf" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/30.lua")
elseif chiffre > "80020323" and chiffre < "80020330" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/31.lua")
elseif chiffre == "8002032a" or chiffre == "8002032b" or chiffre == "8002032c" or chiffre == "8002032d" or chiffre == "800203e8" or chiffre == "800203e9" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/32.lua")
elseif chiffre == "800203ea" or chiffre == "800203eb" or chiffre == "8002044c" or chiffre == "8002044d" then
screen.flip() 
screen.waitVblankStart(75) 
dofile("Pages/33.lua")
end