daily pastebin goal
56%
SHARE
TWEET

Dom

a guest Jun 13th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local r = require("robot")
  2.  
  3. local f = r.forward
  4. local b = r.back
  5. local sw = r.swing
  6. local use = r.use
  7. local up = r.up
  8. local dn = r.down
  9. local rt = r.turnRight
  10. local lt = r.turnLeft
  11. local ar = r.turnAround
  12.  
  13. print("Введите длину, ширину и высоту здания")
  14. local long = io.read()
  15. local width = io.read()
  16. local high = io.read()
  17.  
  18. function try()
  19.  
  20.   if(use()) then
  21.     b()
  22.   else
  23.     while(not(key)) do
  24.       key = use()
  25.     end
  26.   end
  27. end
  28.  
  29.  
  30. for i = 1,high do
  31.   for j = 1,width do
  32.     for k = 1,long-1 do
  33.  
  34.     try()
  35.  
  36.     end
  37.  
  38.     if(j%2==1) then
  39.       lt() b() try() lt() b() try()
  40.     else
  41.   end
  42. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top