Advertisement
BillBodkin

Diamond Counter

Dec 27th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. counter = 0
  2. while true do
  3.     term.setCursorPos(1,1)
  4.     term.clear()
  5.     turtle.suckUp(1)
  6.     print("Gen Stats (push button to reset)")
  7.     print("Diamonds: " .. tostring(counter))
  8.     print("EMC: " .. tostring(counter * 8192))
  9.     if redstone.getInput("back") then
  10.         print("Resetting and stopping")
  11.         turtle.dropUp()
  12.         while type(http.get("http://tools.uk.ms/cc/diamondcounter/addDiamond.php?cmd=clr")) ~= "table" do
  13.             sleep(1)
  14.         end
  15.         break
  16.     end
  17.     if turtle.getItemCount(1) == 1 then
  18.         counter = counter + 1
  19.         while type(http.get("http://tools.uk.ms/cc/diamondcounter/addDiamond.php")) ~= "table" do
  20.             sleep(1)
  21.         end
  22.     end
  23.     turtle.dropDown()
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement