Advertisement
PiggyWhiskey

Armor Stand Management

Jan 26th, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Red   = Export to Primary
  2. --Black = Import from Primary
  3.  
  4. function resetStands()
  5.   --All stands to OFF
  6.  rs.setBundledOutput("bottom",0)
  7.  print("Resetting Rednet")
  8. end
  9.  
  10.  function clearPrimary()
  11.   local colours = {
  12.     colors.orange,
  13.     colors.magenta,
  14.     colors.lightBlue
  15.     }
  16.   print("Clearing Primary Stand")
  17.   --Clear Primary
  18.  
  19.     --Allow Primary Import
  20.   --Allow all storage Stands
  21.   rs.setBundledOutput("bottom", 49150)
  22.  
  23.   --Wait for AE to Catch up
  24.   sleep(5)
  25.  
  26.   --Reset all colours
  27.   resetStands()
  28.   print("Primary Stand Cleared")
  29. end
  30.  
  31.  
  32.  
  33. function importStand (num)
  34. --Enable specific stand Dark Cable
  35. local colours = {
  36.     colors.orange,
  37.     colors.magenta,
  38.     colors.lightBlue
  39.     }
  40.  
  41.   print("Importing Stand")
  42.   --Clear Primary
  43.   clearPrimary()
  44.  
  45.   --Allow Export to Primary - Red
  46.   --Allow Access to Storage Armour Stand
  47.   rs.setBundledOutput("bottom",colours[num] + colors.red)
  48.  
  49.   --Wait for AE to catch up
  50.   sleep(5)
  51.  
  52.   --Armour Should move to new location
  53.  
  54.   --Reset all colours
  55.   resetStands()
  56.   print("Armour Moved")
  57. end
  58.  
  59. print("Give suit number")
  60. local n = tonumber(io.read())
  61. if n == 0 then
  62.   clearPrimary()
  63. else
  64.   importStand(n)
  65. end
  66.  
  67. --Remove Armour from primary to chest (May be nothing)
  68. --Disconect all Stands
  69. --Import from Primary Stand
  70.  
  71.  
  72. --Bring Armour from Stand wanted to Primary
  73. --Disable all Dark Cables except for stand wanted
  74. --Export from AE to Primary Stand
  75.  
  76.  
  77. --Move armour from chest to Stand (May be nothing)
  78. --Disconnect Primary Stand
  79. --Enable the empty stand
  80. --Enable Import Cable (Buffer Chest)
  81. --should import to available stand (Storage Bus)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement