Advertisement
hypnotizd

Automatic Terra Steel Example

Mar 7th, 2016
1,870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. ----------------------------------------------------------
  2. -- Automatic Terra Steel Example                        --
  3. --                                                      --
  4. -- Minecraft FTB Infinity Evolved Episode 75            --
  5. -- https://www.youtube.com/watch?v=E68iCWUE9FE          --
  6. --                                                      --
  7. -- YouTube Channel http://youtube.com/hypnotizd         --
  8. ----------------------------------------------------------
  9.  
  10. local function checkManaPoolLevel()
  11.   local right = rs.getAnalogInput("right")
  12.   local result = false
  13.  
  14.   if (right == 15) then
  15.     result = true
  16.   end
  17.  
  18.   return result
  19. end
  20.  
  21.  
  22. local function makeTS(count)
  23.   if (type(count) == "number") then
  24.     while (count > 0) do
  25.       --Take 1 of each item and pepare to drop
  26.       rs.setBundledOutput("back", colors.blue)
  27.       os.sleep(1)
  28.       --Drop prepared items
  29.       rs.setBundledOutput("back", colors.purple)
  30.       os.sleep(5)
  31.       count = count - 1
  32.     end
  33.   end
  34. end
  35.  
  36. local function takeItemsFromBarrel()
  37.   rs.setBundledOutput("back", colors.red)
  38. end
  39.  
  40. local function sendItemsToTopChest()
  41.   rs.setBundledOutput("back", colors.green)
  42. end
  43.  
  44. local function init()
  45.   rs.setBundledOutput("back", 0)
  46. end
  47.  
  48. init()
  49.  
  50. while true do
  51.  
  52.   if (checkManaPoolLevel()) then
  53.     takeItemsFromBarrel()
  54.     os.sleep(10)
  55.  
  56.     sendItemsToTopChest()
  57.     os.sleep(10)
  58.  
  59.     makeTS(32)
  60.   end
  61.  
  62.   os.sleep(30)
  63.  
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement