Jump to content




Want to pullitem ...


  • You cannot reply to this topic
1 reply to this topic

#1 Mhaw

  • New Members
  • 1 posts

Posted 15 September 2015 - 03:56 PM

Hi !
I want to pull the selected item of the turtule with itempull() but the turtle alaways push the first item of his inventory ...

  • local side= peripheral.wrap("west")


  • turtle.select(2)


  • c.pullItem(side)


  • print("Done")

and i don't find any way in "search" ...

Help me :'(


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 15 September 2015 - 11:28 PM

The idea is that a turtle can't do this. However, with OpenPeripherals installed, you can rig up an external container as a peripheral and order the container itself to place the item into the turtle.

local container = peripheral.wrap(<side>)
container.pushItemIntoSlot(<direction>, <fromContainerSlot>, <amount>, <toTurtleSlot>)

So let's say the turtle is to the south of the container. You want to transfer at most 20 items from the container's third slot to the turtle's tenth slot. You'd do:

local container = peripheral.wrap(<side>)
container.pushItemIntoSlot("south", 3, 20, 10)






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users