korupt_virus

Untitled

Apr 12th, 2012
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. if fs.exists("counter.txt") == false then
  2. count = fs.open("counter.txt", "w")
  3. uum = 0
  4. stacks = math.floor(uum / 64)
  5. dc = math.floor(stacks / 54)
  6. count.writeLine(uum)
  7. count.writeLine(stacks)
  8. count.writeLine(dc)
  9. count.close()
  10. end
  11. count = fs.open("counter.txt", "r")
  12. uum = tonumber(count.readLine())
  13. stacks = tonumber(count.readLine())
  14. dc = tonumber(count.readLine())
  15. count.close()
  16. term.clear()
  17. term.setCursorPos(1,1)
  18. print("uum:"..uum..)
  19. print("stacks:"..stacks..)
  20. print("double chests"..dc..)
  21.  
  22. while true do
  23. event = os.pullEvent()
  24.   if event == "redstone" then
  25.   rsInput = rs.getBundledInput("back")
  26. if colors.test(rsInput, colors.orange) == true then
  27. uum = uum + 1
  28. stacks = math.floor(uum / 64)
  29. dc = math.floor(stacks / 54)
  30. end
  31. count = fs.open("counter.txt", "w")
  32. count.writeLine(uum)
  33. count.writeLine(stacks)
  34. count.writeLine(dc)
  35. count.close()
  36. term.clear()
  37. term.setCursorPos(1,1)
  38. print("uum:"..uum..)
  39. print("stacks:"..stacks..)
  40. print("double chests"..dc..)
  41. end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment