Advertisement
Rolcam

Computercraft - Ender Storage Test Program

Jul 11th, 2025 (edited)
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1. -- replace these with whatever the peripheral name is. It can vary
  2. tank = peripheral.wrap("ender_tank_0")
  3. chest = peripheral.wrap("ender_chest_0")
  4.  
  5. ender = nil
  6.  
  7. while true do
  8.     term.clear()
  9.     term.setTextColor(colors.yellow)
  10.     term.setCursorPos(1,1)
  11.     print("Ender Storage Test System")
  12.     print("1 - Modify ender chest color")
  13.     print("2 - Modify ender tank color")
  14.     print(" ")
  15.     print("Please make a selection:")
  16.     input = read()
  17.     if input == "1" then
  18.         ender = chest        
  19.     elseif input == "2" then
  20.         ender = tank
  21.     else
  22.         term.setTextColor(colors.red)
  23.         print("Invalid Selection! Please try again.")
  24.         sleep(2)
  25.     end
  26.     if ender ~= nil then
  27.         term.setTextColor(colors.purple)
  28.         term.clear()
  29.         term.setCursorPos(1,1)
  30.         print("Please enter the value for the first color.")
  31.         print("We will not validate these values!")
  32.         print("Please use numberic values only")
  33.         col1 = read()
  34.         term.clear()
  35.         term.setCursorPos(1,1)
  36.         print("Please enter the value for the second color.")
  37.         print("We will not validate these values!")
  38.         print("Please use numberic values only")
  39.         col2 = read()
  40.         term.clear()
  41.         term.setCursorPos(1,1)
  42.         print("Please enter the value for the third color.")
  43.         print("We will not validate these values!")
  44.         print("Please use numberic values only")
  45.         col3 = read()
  46.         term.clear()
  47.         term.setCursorPos(1,1)
  48.         print("Setting color band...")
  49.         ender.setColors(tonumber(col1), tonumber(col2), tonumber(col3) )
  50.     end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement