Guest User

pulse

a guest
Mar 30th, 2013
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. local tArgs = { ... }
  2. if #tArgs ~= 1 then
  3.     print( "Usage: pulse <length>" )
  4.     return
  5. end
  6.  
  7. local waitOne = 4
  8. local waitTwo = 50
  9. local current = 1
  10.  
  11. local length = tonumber( tArgs[1] )
  12. if length < 1 then
  13.     print( "Mining distance must be positive" )
  14.     return
  15. end
  16.  
  17.  
  18.  
  19. term.clear()
  20. term.setCursorPos(1,1)
  21. print( "Welcome to S.M.A.U.G." )
  22. print( " (Strategic Mining and" )
  23. print( "  Allied Universal Gobbler)" )
  24. print( "Prepare for extreme sorting" )
  25. print( "  system overflow." )
  26. for i = 1, length do
  27.   rs.setOutput("front", true)
  28.   sleep(waitOne)
  29.   rs.setOutput("front", false)
  30.   rs.setOutput("front", true)
  31.   sleep(1)
  32.   rs.setOutput("front", false)
  33.     term.setCursorPos(1,7)
  34.     print( "Mining ")
  35.     term.setCursorPos(9,7)
  36.     print( current )
  37.     term.setCursorPos(14,7)
  38.     print( "/" )
  39.     term.setCursorPos(15,7)
  40.     print( length )
  41.     term.setCursorPos(21,7)
  42.     print( " meters..." )
  43.    
  44.     --"/" length " meters...")
  45.   rs.setOutput("back", true)
  46.   sleep(waitOne)
  47.   rs.setOutput("back", false)
  48.   sleep(waitTwo)
  49.   current = current + 1
  50. end
Advertisement
Add Comment
Please, Sign In to add comment