Advertisement
Keridos

Untitled

Jul 11th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. aeBridge = peripheral.wrap("right")
  2. craftTable = {}
  3. aeTable = {}
  4.  
  5. function setCraftTable(craftid,quantity,name)
  6.     craftTable[craftid] = {}
  7.     craftTable[craftid]["quantity"] = quantity
  8.     craftTable[craftid]["name"] = name
  9. end
  10.  
  11. function setCraftingList()
  12.     setCraftTable(5,512,"Oak Wood Planks")
  13.     setCraftTable(280,512,"Sticks")
  14. end
  15.  
  16. function main()
  17.     setCraftingList()
  18.     while true do
  19.         aeTable = aeBridge.listCraft()
  20.         for i,j in pairs(craftTable) do
  21.             if aeTable[i]<j then
  22.                 aeBridge.craft(i,j-aeTable[i])
  23.             end
  24.         end
  25.     end
  26. end
  27.  
  28. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement