Advertisement
Z4i

Smelt

Z4i
Feb 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local type, ant = ...
  2. local t = periphial.wrap("top")
  3. function ingot()
  4.     for i=0, ant do
  5.         redstone.setOutput("left", true)
  6.         sleep(0.1)
  7.         redstone.setOutput("left", false)
  8.         sleep(1.5)
  9.         t.clear()
  10.         t.setCursorPos(1,1)
  11.         t.write(ant-(i+1)      
  12.     end
  13. end
  14.  
  15. function block()
  16.     for i=0, ant do
  17.         rs.setOutput("left", true)
  18.         sleep(0.1)
  19.         rs.setOutput("left", false)
  20.         sleep(16)
  21.         t.clear()
  22.         t.setCursorPos(1,1)
  23.         t.write(ant-(i+1)
  24.     end
  25. end
  26.  
  27. if type == ingot
  28.     ingot()
  29. else if type == block
  30.     block()
  31. else
  32.     print("Skriv 'ingot' eller 'block' og antalll")
  33. end
  34. t.clear()
  35. t.setCursorPos(1,1)
  36. t.write("Done!")
  37. sleep(3)
  38. t.clear()
  39. t.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement