Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --code wall making sure that no funny
- --business is going on with the tape drive
- local run = true
- tape = peripheral.find("tape_drive")
- if not tape then
- print("ya need a tape fer this eiet")
- run = false
- end
- if not tape.isReady() and not tape.getLabel() == "Movement_SoundPAC" then
- print("put the correct tape in boy")
- run = false
- end
- --if run is false, program will not start
- if tape and tape.isReady() and tape.getLabel() == "Movement_SoundPAC" then
- tape.seek(-tape.getSize()) --adding "()" to getSize will call the function
- end
- local scene = 1 -- not used yet
- local x = 2 --defining
- local y = 2 --position variables
- local function input()
- local event,key,aux1,aux2 = os.pullEvent()
- if event == "key" then
- if key == "200" or key == "17" and y > 1 then
- y = y - 1
- elseif key == "208" or key == "31" and y < 9 then
- y = y + 1
- elseif key == "203" or key == "30" and x > 1 then
- x = x - 1
- elseif key == "205" or key == "32" and x > 1 then
- x = x + 1
- elseif key == "28" then
- if tape.getState() == "PLAYING" then
- tape.stop()
- tape.seek(-tape.getSize())
- end
- run = false
- end
- end
- end
- local l1 = {}
- local l2 = {}
- local l3 = {}
- local l4 = {}
- local l5 = {}
- local l6 = {}
- local l7 = {}
- local l8 = {}
- local l9 = {}
- local l10 = {}
- local l11 = {}
- -- dont define as local for every change, because it messes up lua
- --while run do
- term.clear()
- term.setCursorPos(1,1)
- l1 = {"#","#","#","#","#","#","#","#","#","#","#"}
- l2 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l3 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l4 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l5 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l6 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l7 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l8 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l9 = {"#"," "," "," "," "," "," "," "," "," ","#"}
- l10 ={"#"," "," "," "," "," "," "," "," "," ","#"}
- l11 ={"#","#","#","#","#","#","#","#","#","#","#"}
- for i,f in pairs(l1)do
- char = 1
- term.write(f)
- term.setCursorPos(i,1)
- char = char + 1
- end
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement