Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local portal = peripheral.wrap("right")
- local monitor = peripheral.wrap("monitor_1")
- local w, h = monitor.getSize()
- newLine = function()
- local _,cY = monitor.getCursorPos()
- monitor.setCursorPos((w/2)-5,cY+1)
- end
- monitor.setTextScale(2)
- local color = colors.black
- monitor.setBackgroundColor(colors.black)
- monitor.clear()
- monitor.setCursorPos(3,1)
- for i=0, portal.getStoredCount()-1 do
- monitor.setBackgroundColor(color)
- color = color/2
- monitor.write(" " .. portal.getStoredName(i) .. " ")
- newLine()
- end
- while(true) do
- ecent, side, xPos, yPos = os.pullEvent("monitor_touch")
- portal.terminate()
- if yPos == 2 then
- portal.dialStored(1)
- elseif yPos == 3 then
- portal.dialStored(2)
- elseif uPos == 4 then
- portal.dialStored(3)
- end
- os.sleep(0.05)
- portal.terminate()
- end
Add Comment
Please, Sign In to add comment