Advertisement
GDragonArcher

Colony AFK

Jun 7th, 2023 (edited)
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. local integrator = peripheral.find("colonyIntegrator")
  2. local box = peripheral.find("chatBox")                      -- check for the chatbox
  3.  
  4. redstone.setOutput("bottom", true)
  5.  
  6. if integrator.isInColony() then
  7.     print("Block is inside a colony!")
  8. else
  9.     print("Not in a colony!")
  10. end
  11.  
  12. while true do
  13.  
  14.     --if integrator.isUnderAttack() == true then
  15.         --redstone.setOutput("bottom", false)
  16.         --print("under attack")
  17.     --end
  18.  
  19. --try to figure out what is sending the under attack message
  20.  
  21.     local event, username, message, uuid, isHidden = os.pullEvent("chat")
  22.     print("The 'chat' event was fired with the username " .. username .. " and the message " .. message)
  23.    
  24.         --if(param2 == "totem") then -- param2 is the message and param1 is the player's name
  25.  
  26. sleep(10)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement