Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.startTimer(1)
- print("Altar")
- altar = peripheral.wrap("right")
- modem = peripheral.wrap("left")
- glasses = peripheral.wrap("top")
- modem.callRemote("computer_26", "turnOn")
- local x, y = term.getCursorPos()
- while true do
- local event, p1, p2, p3 = os.pullEvent()
- --print("Ev: ", event, " ", p1, " ", p2, " ", p3)
- if event == "timer" then
- os.startTimer(1)
- local ra = rs.getAnalogInput("right")
- term.setCursorPos(1, y)
- term.clearLine()
- local s = "Redstone: " .. tostring(ra)
- term.write(s)
- local info = altar.getInfo()
- term.setCursorPos(1, y+1)
- term.clearLine()
- local s2 = "Life Essence: " .. tostring(info.amount)
- term.write(s2)
- os.setComputerLabel(s .. " " .. s2)
- glasses.clear()
- glasses.addText(0, 3, s2, 0x00FF00)
- end
- if event == "key" then
- --if p1 == 256
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement