I'm a complete beginner at computercraft and lua but hopefully that will point other beginners in the right direction.
tArgs = {...}
if #tArgs == 0 then
print("usage get <itemID> (count=64) (Metatag)")
exit()
end
itemID = tonumber(tArgs[1])
qty = 64
if #tArgs > 1 then
qty = tonumber(tArgs[2])
end
dmg = -1
if #tArgs > 2 then
dmg = tonumber(tArgs[3])
end
ae = peripheral.wrap("right")
cust = {}
cust["id"] = itemID
cust["qty"] = qty
if dmg >= 0 then
cust["dmg"] = dmg
end
print(textutils.serialize(cust))
ret = ae.extractItem(cust, "east")
This trivial example is executed in a turtle sitting next to an ae terminal.












