StiGMaT14

Computer Craft: Start Cc Turtle Chunk [Turtle]

Sep 1st, 2025 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. -- Turtle (Merged with Chunk Loader upgrade item: "Cc Turtle Chunk")
  2. -- Made by StiGMaT - https://discord.gg/MqMF4ucy9R"
  3. local p = peripheral.wrap("right")
  4. local pFoundSide = ""
  5. if not p then
  6.     print("No peripheral on right")
  7.     -- Try to find on the left
  8.     p = peripheral.wrap("left")
  9.     if not p then
  10.         print("No peripheral on left")
  11.         error("Chunk loader peripheral: NOT FOUND!")
  12.     else
  13.         pFoundSide = "left"
  14.     end
  15. else
  16.     pFoundSide = "right"
  17. end
  18.  
  19. if not p then
  20.     error("Chunk loader peripheral not found.")
  21. else
  22.     print("Chunk loader found! On " .. pFoundSide .. " side.")
  23.  
  24.     -- Prompt for password
  25.     write("Enter password: ")
  26.     local password = read("*")  -- hides input while typing
  27.  
  28.     -- Trying to Start Chunk Loader
  29.     local ok, msg = p.enableChunkLoader(password)
  30.     print("EnabledState:", ok, msg)
  31.  
  32.     -- Debug getStatus
  33.     local status = p.getStatus and p.getStatus() or {}
  34.     print("getStatus:", textutils.serialize(status))
  35. end
Advertisement
Add Comment
Please, Sign In to add comment