Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("right")
- term.redirect(mon)
- local status = {"streichen.","abgelehnt.","angenommen."}
- local current = 1
- local combo = "1"
- local lastTimer
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Karte")
- print(status[current])
- local event,arg1,arg2,arg3 = os.pullEvent()
- if event == "timer" and arg1 == lastTimer then
- current = 1
- lastTimer = nil
- rs.setOutput("bottom",false)
- elseif event == "mag_swipe" then
- if arg1 == combo then
- lastTimer = os.startTimer(3)
- current = 3
- rs.setOutput("back",true)
- else
- lastTimer = os.startTimer(3)
- current = 2
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement