Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c=peripheral.wrap("right")
- function fileToTable(file)
- if fs.exists(file)~=true then
- c.say("file"..file.." not found")
- return(false)
- end
- fp=fs.open(file,"r")
- line={}
- i=1
- line[i]=fp.readLine()
- if line[i]==nil then return(false) end
- while line[i]~=nil do
- i=i+1
- line[i]=fp.readLine()
- end
- output={line,i}
- return(output)
- end
- qu=fileToTable("qu")[1]
- quLen=fileToTable("qu")[2]
- i=1
- while qu[i]~=nil do
- c.say(qu[i].."?") sleep(0.5)
- c.say("a)"..qu[i+1]) sleep(0.5)
- c.say("b)"..qu[i+2]) sleep(0.5)
- c.say("c)"..qu[i+3]) sleep(0.5)
- c.say("d)"..qu[i+4])
- e,player,message = os.pullEvent("chat")
- while message~=qu[i+5] do
- e,player,message = os.pullEvent("chat")
- end
- c.say(player.." du hast recht!")
- sleep(1)
- i=i+6
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement