S3mpx

yeet

Dec 23rd, 2020 (edited)
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. -- Library --
  2.  
  3.         -- [INFORMATION] --
  4. local appName = "s3"
  5. local appType = "Library"
  6. local version = "Alpha"
  7. local author = "S3mpx"
  8.  
  9.         -- [VARIABLES] --
  10.  
  11. hunterY = 0
  12. diaY = 11
  13.  
  14.         -- [BASIC FUNKTIONS] --
  15.  
  16.     -- { Dig } --
  17. -- dig() --
  18. function dig()
  19.     turtle.dig()
  20. end
  21.  
  22. -- digUp() --
  23. function digUp()
  24.     turtle.digUp()
  25. end
  26.  
  27. -- digDown() --
  28. function digDown() --
  29.     turtle.digDown()
  30. end
  31.  
  32.     -- { Move } --
  33.  
  34. -- go() --
  35. function go()
  36.     turtle.forward()
  37. end
  38.  
  39. -- up() --
  40. function up()
  41.     turtle.up()
  42. end
  43.  
  44. -- down() --
  45. function down()
  46.     turtle.down()
  47. end
  48.  
  49.     -- { Rotate } --
  50.    
  51. -- rLeft() --
  52. function rLeft()
  53.     turtle.turnLeft()
  54. end
  55.  
  56. -- rRight() --
  57. function rRight()
  58.     turtle.turnRight()
  59. end
  60.  
  61. -- rAround() --
  62. function rAround()
  63.     rLeft()
  64.     rLeft()
  65. end
  66.  
  67.         -- [ADVANCED FUNKTIONS] --
  68.  
  69.     -- { dig() + Move } --
  70.  
  71. -- dig.go() --
  72. function dig.go()
  73.     dig()
  74.     go()
  75. end
  76.  
  77. -- dig.up() --
  78. function dig.up()
  79.     digUp()
  80.     up()
  81. end
  82.  
  83. -- dig.down() --
  84. function dig.down()
  85.     digDown()
  86.     down()
  87. end
  88.  
  89.         -- [EPIC FUNKTIONS] --
  90.  
  91. -- roomClear()
  92. function roomClear()
  93.     for i=1, 8 do
  94.         for i=1, 16 do
  95.             dig.go()
  96.         end
  97.         rLeft()
  98.         dig.go()
  99.         rLeft()
  100.         for i=1, 16 do
  101.             dig.go()
  102.         end
  103.         rRight()
  104.         dig.go()
  105.         rRight()
  106.     end
  107. end
  108.  
  109. -- diahunt() --
  110. function diahunt()
  111.     print("how high am I?")
  112.     hunterY = io.read()
  113.     yLeft = hunterY - diaY
  114.     for i=1, yLeft do
  115.         dig.down()
  116.     end
  117.     for i=1, 3 do
  118.         dig.go()
  119.     end
  120.     roomClear()
  121. end
Add Comment
Please, Sign In to add comment