Advertisement
Guest User

minernew.lua

a guest
Feb 25th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. local component = require("component")
  2. local sides = require("sides")
  3. local robot = require("robot")
  4. local functions = require("functions")
  5. rawget(getmetatable(o) or {}, "__ev")
  6.  
  7.  --[[local g = component.generator
  8.    robot.select(2)
  9.    g.untinsert()
  10.    print(g.co())]]
  11.  
  12.  
  13. rmb = 1 -- Means Robot moved block
  14. turnedLeft = true -- Boolean that means at 1 that the robot turned left last 25 Blocks
  15.  
  16.  
  17.   for i = 200,1,-1 do
  18.   --Check when the Robot has moved 12 Blocks
  19.   if (rmb % 12 == 0)
  20.   then print("Es ist durch 12 teilbar")
  21.   end
  22.   if (rmb % 25 == 0)
  23.   then turnedLeft = functions.turnRobot(turnedLeft)
  24.   print(turnedLeft)
  25.   end
  26.  
  27.  
  28.  
  29.       if robot.detect() == true
  30.     then
  31.       robot.swing(sides.front)
  32.       robot.forward(1)
  33.       print(rmb)
  34.     else
  35.       robot.forward(1)
  36.       print(rmb)
  37.    end
  38.   rmb = rmb + 1
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement