toastonrye

Adv Peripherals Inventory Dump v1.20.1 Youtube

Oct 25th, 2024
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. --dumper program for Youtube
  2. --my video was recorded in v1.18 and it seems the removeItemFromPlayer function changed in 1.20.1
  3. --this is my quick fix
  4. --original video https://www.youtube.com/watch?v=vegXpliPFhA
  5. --by toastonrye
  6.  
  7. local im = peripheral.find("inventoryManager")
  8. local cb = peripheral.find("chatBox")
  9.  
  10. if im == nil then error("the inventory manager not found") end
  11. if cb == nil then error("chatBox not found") end
  12.  
  13. print("Running dumper")
  14.  
  15. while true do
  16.  local e, player, msg = os.pullEvent("chat")
  17.  if msg == "dump" and player == "toastonrye" then
  18.   print("Dumping slots 9 through 26")
  19.   myInv = im.getItems()  
  20.   for k,v in pairs(myInv) do
  21.    if k>=9 and k<=26 then
  22.     im.removeItemFromPlayer("up", {fromSlot=k})
  23.    end
  24.   end
  25.  end
  26. end
  27.  
Add Comment
Please, Sign In to add comment