Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
2,078
Widok
0
24/09/2015 10:29 pm
Topic starter
ComputerCraft + Applied Energistics: watch and craft item
1 Answer
0
24/09/2015 10:31 pm
Topic starter
1. Create file startup
2. Write
1 |
Shell.startup("watcher_my_app") |
Shell.startup("watcher_my_app")
3. Create file
1 |
edit watcher_my_app |
edit watcher_my_app
4. Paste script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
lp = peripheral.wrap("back") list = lp.getAvailableItems() while true do print("Sprawdzam kompost") for number, item in pairs(list) do if item.fingerprint.id == "Forestry:fertilizerCompound" then print("- w zasobach = "..item.size) if item.size < 10 then print("Brak kompostu, request") lp.requestCrafting(item.fingerprint, 10) end end end sleep(120) end |
lp = peripheral.wrap("back") list = lp.getAvailableItems() while true do print("Sprawdzam kompost") for number, item in pairs(list) do if item.fingerprint.id == "Forestry:fertilizerCompound" then print("- w zasobach = "..item.size) if item.size < 10 then print("Brak kompostu, request") lp.requestCrafting(item.fingerprint, 10) end end end sleep(120) end
5. Reboot CC using Ctrl+R
6. You can allways interrupt running app by pressing Ctrl+T