Advertisement
SirBaconBitz

Dream Kitchen :3

Feb 9th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. nope = true
  2. shell.run("foods")
  3. words = {}
  4. itemstack = {id=4,qty=1}
  5. export = peripheral.wrap("left")
  6. bridge = peripheral.wrap("top")
  7. while nope == true do
  8. itemstack = {id=4,qty=1}
  9. herp = 0
  10. derp = 0
  11. e, a, b, c, d = os.pullEvent("chat_command")
  12.     if a == "update" then
  13.     shell.run("delete startup")
  14.     shell.run("pastebin get PnMvWduK startup")
  15.     shell.run("reboot")
  16.     elseif a == "updatefood" then
  17.     shell.run("delete foods")
  18.     shell.run("pastebin get y7uDVpjL foods")
  19.     shell.run("foods")
  20.     else
  21.         for k, v in pairs(foods) do
  22.             if k == a then
  23.                 for word in v:gmatch('[^%-]+') do
  24.                 value = tonumber(word)
  25.                 itemstack.id = value
  26.                     if string.find(word, ":") then
  27.                         print(word)
  28.                         for whut in word:gmatch('[^%:]+') do
  29.                             derp = herp
  30.                             herp = whut
  31.                         end
  32.                         print(derp)
  33.                         print(herp)
  34.                         itemstack = {id=4,dmg=0,qty=1}
  35.                         itemstack.dmg = tonumber(herp)
  36.                         itemstack.id = tonumber(derp)
  37.                         export.extractItem(itemstack,"down")
  38.                     else
  39.                     export.extractItem(itemstack,"down")
  40.                     end
  41.                 end
  42.             end
  43.         end
  44.     end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement