View difference between Paste ID: EB0825Zt and i6ATbf9L
SHOW: | | - or go back to the newest paste.
1
a = peripheral.wrap("top")
2
name1 = "FreestyleBurgers" --Name of one user
3
name2 = "thegreekgeek" --Name of second user
4
tArgs = {...}
5
b = tArgs[1]
6
c = tArgs[2]
7
d = tArgs[3]
8
e = textutils.unserialize(b)
9
f = textutils.unserialize(c)
10
g = textutils.unserialize(d)
11
dir = nil
12
if tArgs[4] == "FreestyleBurgers" then
13
  dir = "west" --Direction of chest for name1
14
elseif tArgs[4] == "thegreekgeek" then
15
  dir = "east" --Direction of chest for name2
16
end
17
if not a.containsItemType(e, f) then
18
  a.requestCrafting({id = e, dmg = f, qty = g})
19
  os.sleep(5*g)
20
end
21
p = a.extractItem({id = e, dmg = f, qty = g}, dir)
22-
shell.run("startup")
22+
shell.run("startup").