Advertisement
Guest User

cables

a guest
Dec 11th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. os.loadAPI("func/func_base")
  2. os.loadAPI("func/func_const")
  3. print ("---CABLE LAYER---")
  4. local matrix = {}
  5. local get = true
  6. while get do
  7.     print ("What direction (u)p, (d)own, (l)eft, (r)ight, (f)orward")
  8.     local val = read()  
  9.     if val ~= "f" then
  10.       if val ~= "d" then
  11.         if  val ~= "u" then
  12.           if val ~= "l" then
  13.             if val ~= "r" then
  14.               get = false
  15.             end
  16.           end
  17.         end
  18.       end
  19.     end
  20.    
  21.     if get == true then
  22.       print("How many Blocks")
  23.       local num = tonumber(read())
  24.       table.insert(matrix, {val, num})
  25.     end
  26.     term.clear()
  27. end
  28.  
  29. print("Put item to place in slot 1")
  30. print("press RETURN to start or TYPE q to cancel")
  31. local v = read()
  32. if v ~= "q" then
  33.     local item = func_base.getItemName(1)
  34.     func_const.layCable(matrix, item)
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement