Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...};
- local x = 0;
- local y = args[1];
- local z = 0;
- function forward()
- if turtle.detect() then
- turtle.dig();
- end
- end
- function up()
- y = y + 1;
- if turtle.detectUp() then
- turtle.digUp();
- end
- turtle.up();
- end
- function down()
- y = y - 1;
- if turtle.detectDown() then
- turtle.digDown();
- end
- turtle.down();
- end
- function descend()
- while y > -30 do
- down();
- end
- end
- -- This function is causing so many problems
- function is_valuable(data)
- lis = {"minecraft:diamond_ore", "minecraft:coal_ore", "minecraft:gold_ore", "minecraft:iron_ore", "minecraft:redstone_ore"};
- print(data.name);
- for index, value in ipairs(lis) do
- if value == data.name then
- return true;
- end
- end
- print("no valuable ores discovered");
- print("ore name: ", data.name);
- return false;
- end
- function scan()
- success, data = turtle.inspectUp();
- if data.name == "minecraft:redstone_ore" then
- print("fuck it");
- end
- if is_valuable(data) then
- print("this ore is valueable");
- end
- end
- function strip()
- for i = 1, 32 do
- forward();
- end
- end
- function strip_step()
- turtle.turnLeft();
- -- check for valueable item. dig it.
- turtle.turnRight();
- turtle.turnRight();
- -- check for valuable item again.
- turtle.turnLeft();
- end
- if z == nil then
- print("please pass y value as argument");
- return;
- end
- scan();
- -- descend();
- -- turtle.turnLeft();
- -- for i = 1, 32 do
- -- end
Add Comment
Please, Sign In to add comment