Advertisement
Guest User

Untitled

a guest
Jan 6th, 2022
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. component = require("component")
  2. me = component.me_interface
  3. db = component.database
  4.  
  5. io.write('Number of blocks needed: ')
  6. nBlocks = io.read("*n")
  7.  
  8. io.write('DB index: ')
  9. dbIndex = io.read("*n")
  10.  
  11. cycles = nBlocks//64;
  12. lastStack = nBlocks%64;
  13.  
  14. for i=1,cycles do
  15.     me.setInterfacePatternInput(1, db.address, dbIndex, 64, i)
  16. end
  17.  
  18. me.setInterfacePatternInput(1, db.address, dbIndex, lastStack, cycles+1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement