Advertisement
SirBaconBitz

Multifood

Jul 2nd, 2014
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. args = { ... }
  2. food = args[1]
  3. if args[1] == "craft" then
  4. handle = fs.open("foodqueue", "r")
  5. output = handle.readAll()
  6. handle.close()
  7. mfcdest = textutils.unserialize(output)
  8. number = mfcdest.sNum
  9. cfood = mfcdest.food
  10. foodstuffs.craft(tostring(cfood),tonumber(number))
  11. menuApi.stopMenu()
  12. shell.run("startup")
  13. else
  14.   for k,v in pairs(args) do
  15.     if k ~= 1 then
  16.       food = food..v
  17.     end
  18.   end
  19.  
  20.   numenu = {}
  21.  
  22.   for i = 1,999 do
  23.     table.insert( numenu, { text = i })
  24.   end
  25.  
  26.   print(food)
  27.   sleep(0.1)
  28.   menuApi.runMenu(numenu)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement