Computer Craft help needed, program to repair items

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
Running a custom pack, which gives me a lot of broken equipment from mobs that if repaired would provide much needed resources.

I need a system to find two identical items, craft repair them, and dump the item into another chest, which will eventually filter the damaged items back into the first chest.
I thought a turtle would be ideal for this, but my knowledge is very limited of LUA, most I've done is a timer and redstone control (but I am familiar with some progamming languages). Can anyone help?

This is my thought process on how it would work:
Loop through each slot of source chest. (for... next)
Take slot item into turtle. (turtle.suck or something...)
Loop through each slot of source chest, find a matching item ID that matches the item in the turtle (for...next, if turtle.item=chest.item)
If found, craft repair, place item in another chest, end the loop. (turtle repair+drop, end for)
Otherwise, dump item into chest (turtle drop)
Loop to next item (next)
 

Azzanine

New Member
Jul 29, 2019
2,706
-11
0
I have one idea, turn that limited knowledge in it a somewhat less limited knowledge, or give up in turtles.

If you are lucky you might find a script on Computer craft message boards.
 

cylen

New Member
Jul 29, 2019
1
0
0
This is only possible if you have Openperipherals. Else i think you are out of luck

This. Openperipherals lets you wrap a chest as a peripheral and then use a method to get item data on a certain slot. ComputerCraft on its own has no way of reading item data.

However, if you have TE3 you can sort and move damaged items with itemducts. AE can also do this with fuzzy export busses.

Enviado desde mi Nexus 7 mediante Tapatalk