LightKnight51

Fast Hopper System

Jul 31st, 2025 (edited)
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | Gaming | 0 0
  1. --- Program : Fast Hopper System
  2. --- Author : LightKnight51
  3. --- Last modification : 31/07/2025
  4.  
  5. --- Utils API
  6. local libraryName = "MarquitoLuaUtils"
  7. local libraryCode = "0FA6u1qV"
  8.  
  9. -- Initialize the hopper system
  10. function InitFastHopperSystem()
  11.     while true do
  12.         turtle.suckUp()
  13.         for m = 1, 16  do
  14.             turtle.dropDown()
  15.  
  16.            
  17.             -- Get item name in current slot
  18.             local turtleCurrentItemName = nil
  19.             if turtle.getItemDetail(m) ~= nil then
  20.                 turtleCurrentItemName = turtle.getItemDetail(m).name
  21.             end
  22.            
  23.             if turtleCurrentItemName ~= nil then
  24.                 turtle.select(m)
  25.                 turtle.dropDown()
  26.             end
  27.         end
  28.         sleep(0.05)
  29.     end
  30. end
  31.  
  32. -- Download program
  33. function DownloadProgram(pastebinCode, programName)
  34.     if not fs.exists(programName) then
  35.         shell.run("pastebin get " .. pastebinCode .. " " .. programName)
  36.     end
  37. end
  38.  
  39. -- We need this library for other programs work
  40. DownloadProgram(libraryCode, libraryName)
  41. os.loadAPI("MarquitoLuaUtils")
  42. -- Initialize the item filter system
  43. InitFastHopperSystem()
Advertisement
Add Comment
Please, Sign In to add comment