Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup()
- ae = peripheral.wrap("back")
- cust = {}
- end
- function main()
- setup()
- end
- function getComponents()
- for i = 1, #spells do
- cust["id"] = spells[i]
- cust["qty"] = 1
- cust["dmg"] = 0
- print(textutils.serialize(cust))
- ret = ae.extractItem(cust, "west")
- end
- end
- function save(table,name)
- local file = fs.open(name,"a")
- file.writeLine((textutils.serialize(table)))
- file.close()
- end
- function load(name)
- local file = fs.open(name,"r")
- data = file.readAll()
- file.close()
- spells = textutils.unserialize(data)
- end
- load("spells")
- getComponents()
- main()
Advertisement
Add Comment
Please, Sign In to add comment