G2A Many GEOs
SHARE
TWEET

wiremine.lua

a guest Mar 28th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local slot = 1
  2. local itemId = 0
  3. local vanilla = "minecraft:"
  4. local param = tonumber(arg[1])
  5.  
  6. local modem = peripheral.wrap('left')
  7. modem.open(69)
  8. if not #arg == 0 do
  9.     mode.open(69 + param)
  10. end
  11. while turtle.getFuelLevel() > 0 do
  12.     local event,moSi,sCh,rCh,msg,dist=os.pullEvent("modem_message")
  13.     if msg=='Left' then
  14.         turtle.turnLeft()
  15.     end    
  16.     if msg=='Right' then
  17.         turtle.turnRight()
  18.     end
  19.     if msg=='Mine' then
  20.         print('How far?')
  21.         event,moSi,sCh,rCh,msg,dist=os.pullEvent("modem_message")
  22.         local max = tonumber(msg)
  23.         print(msg)
  24.         for i=1,max do
  25.             write(turtle.getFuelLevel().."\n")
  26.             turtle.dig()
  27.             turtle.forward()
  28.         end
  29.     end
  30.     while not (turtle.refuel() or slot==16) do
  31.         itemId = turtle.getItemDetail(slot)
  32.         if not (itemId == nil) then itemId = itemId.name end
  33.        
  34.         if itemId==vanilla.."cobblestone" then turtle.drop() end
  35.         if itemId==vanilla.."granite" then turtle.drop() end
  36.         if itemId==vanilla.."diorite" then turtle.drop() end
  37.         if itemId==vanilla.."andesite" then turtle.drop() end
  38.         if itemId==vanilla.."dirt" then turtle.drop() end
  39.         if itemId==vanilla.."gravel" then turtle.drop() end
  40.         if msg=="Stop" then return end
  41.          
  42.         slot = slot + 1
  43.         turtle.select(slot)
  44.     end
  45.     slot = 1
  46. end
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top