SHOW:
|
|
- or go back to the newest paste.
| 1 | local localTable = {}
| |
| 2 | local i = 0 | |
| 3 | io.input('localOreList.txt')
| |
| 4 | ||
| 5 | repeat | |
| 6 | i = i+1 | |
| 7 | localTable[i] = io.read('localOreList.txt')
| |
| 8 | until localTable[i] == nil | |
| 9 | ||
| 10 | ||
| 11 | function itemIsOre() | |
| 12 | itemInfo = turtle.getItemDetail() | |
| 13 | for i = 1, #localTable do | |
| 14 | if itemInfo.name == localTable then | |
| 15 | isOre = true | |
| 16 | else | |
| 17 | isOre = false | |
| 18 | end | |
| 19 | end | |
| 20 | return isOre | |
| 21 | end | |
| 22 | ||
| 23 | for i = 1, 11 do | |
| 24 | turtle.select(i) | |
| 25 | if itemIsOre == true then | |
| 26 | print('true')
| |
| 27 | end | |
| 28 | end |