Paste not found.
Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted by Keridos on January 20, 2015

Section 1 (Text)

API = require("buttonAPI")
local event = require("event")
local computer = require("computer")
local term = require("term")
local component = require("component")
local gpu = component.gpu
 
local rs = component.redstone
local colors = require("colors")
local side = require("sides")
local proc = require("process")

local quarryActive = false
local quarryRuns = 0
local timer1

 
function API.fillTable()
  API.setTable("Toggle Quarry", toggleQuarry, 10,20,3,5)  
  API.setTable("Free Ram", freemen, 10,20,8,10)
  API.setTable("Reboot", reboot, 22,32,8,10)
  API.screen()
end
 
function getClick(p1, p2, p3, x, y)
  if x == nil or y == nil then
    local h, w = gpu.getResolution()
    gpu.set(h, w, ".")
    gpu.set(h, w, " ")
  else
    API.checkxy(x,y)
  end
  event.listen(touch,getClick())
end

 
function toggleSpawning()
  API.toggleButton("Spawning")
  if buttonStatus == true then
    toggleQuarry = true
  else
    toggleQuarry = false
  end
end

function activateRedstone()
  if quarryActive then
    rs.setOutput(side.west, 15)
	quarryRuns = quarryRuns + 1
    event.timer(1,deactivateRedstone())
  end
end
 
function deactivateRedstone()
  rs.setOutput(side.west, 0)
  if quarryActive then
    event.timer(12,activateRedstone())
  end
end

function reboot()
  rs.setOutput(side.top,0)
  computer.shutdown(true)
end

function updateScreen()
  API.label(1,24,"Quarry at run: "..quarryRuns)
end
 
term.setCursorBlink(false)
gpu.setResolution(80, 25)
API.clear()
API.fillTable()
API.heading("Frame Quarry Script for ironhide.de")
API.label(1,24,"Quarry at run: "..quarryRuns)
event.listen(touch,getClick())
event.timer(5,updateScreen(),math.huge)