Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("back")
- rednet.open("top")
- function display()
- x,y = mon.getSize()
- --mt = {}
- mon.setBackgroundColor(colors.black)
- mon.clear()
- mon.setTextColor(colors.black)
- levels = 5 --put in your number of levels. this can be a variable.
- digi = levels
- p = 0
- for i = 1, levels, 2 do
- p = p + 1
- mon.setCursorPos(x/2,digi)
- digi = digi - 1
- mon.setBackgroundColor(colors.yellow)
- p = tostring(p)
- mon.write(" "..p.." ")
- p = tonumber(p)
- p = p + 1
- mon.setCursorPos(x/2,digi)
- digi = digi - 1
- mon.setBackgroundColor(colors.orange)
- p = tostring(p)
- mon.write(" "..p.." ")
- p = tonumber(p)
- end
- end
- while true do
- display()
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- Floor = levels - yPos + 1
- if Floor > 0 then
- rednet.send(45, Floor)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement