Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local tArgs = { ... }
- local function printUsage()
- print( "Usage: unequip <side>" )
- end
- if #tArgs ~= 1 then
- printUsage()
- return
- end
- local function unequip( fnEquipFunction )
- for nSlot=1,16 do
- local nOldCount = turtle.getItemCount( nSlot )
- if nOldCount == 0 then
- turtle.select( nSlot )
- if fnEquipFunction() then
- local nNewCount = turtle.getItemCount( nSlot )
- if nNewCount > 0 then
- print( "Item unequipped" )
- return
- else
- print( "Nothing to unequip" )
- return
- end
- end
- end
- end
- print( "No space to unequip item" )
- end
- local sSide = tArgs[1]
- if sSide == "left" then
- unequip( turtle.equipLeft )
- elseif sSide == "right" then
- unequip( turtle.equipRight )
- else
- printUsage()
- return
- end
- turtle.select(1) --turtle slot--
- turtle.place()
- --------------------
- turtle.select(2) --turtle Fuel--
- turtle.drop()
- --------------------
- sleep(15)
- --------------------
- turtle.up()
- turtle.select(3) -- EnderChest Items--
- turtle.placeDown()
- turtle.up()
- turtle.select(4) -- mekanism pipe--
- turtle.placeDown()
- turtle.up()
- turtle.select(5) -- chest --
- turtle.placeDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement