Advertisement
Guest User

minernew.lua

a guest
Feb 25th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. local component = require("component")
  2. local sides = require("sides")
  3. local robot = require("robot")
  4. rawget(getmetatable(o) or {}, "__ev")
  5.  
  6.  --[[local g = component.generator
  7.    robot.select(2)
  8.    g.untinsert()
  9.    print(g.co())]]
  10.  
  11. rmb = 0
  12.  
  13.   for i = 200,1,-1 do
  14.   --Check when the Robot has moved 12 Blocks
  15.     if (rmb % 12 == 0) then print("Es ist durch 12 teilbar")
  16.     end
  17.     if (rmb == 175) then robot.turnRight()
  18.     elseif (rmb == 172) then robot.turnRight()
  19.     elseif (rmb == 147) then robot.turnLeft()
  20.     elseif (rmb == 144) then robot.turnLeft()
  21.     elseif (rmb == 119) then robot.turnRight()
  22.     elseif (rmb == 116) then robot.turnRight()
  23.     elseif (rmb == 91) then robot.turnLeft()
  24.     elseif (rmb == 88) then robot.turnLeft()
  25.     elseif (rmb == 63) then robot.turnRight()
  26.     elseif (rmb == 60) then robot.turnRight()
  27.     elseif (rmb == 35) then robot.turnLeft()
  28.     elseif (rmb == 32) then robot.turnLeft()
  29.     elseif (rmb == 7) then robot.turnRight()
  30.     end
  31.    
  32.       if robot.detect() == true
  33.         then
  34.             robot.swing(sides.front)
  35.             robot.forward(1)
  36.             print(rmb)
  37.         else
  38.             robot.forward(1)
  39.             print(rmb)
  40.    end
  41.     rmb = rmb + 1
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement