Advertisement
Guest User

Computercraft Pokedex command computer startup.lua

a guest
Feb 6th, 2025
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | Software | 0 0
  1. --pokedex command computer
  2. --executes whatever command is sent to it. Should probably check that the id of the recieved message matches the pokedex id otherwise anyone could send whatever command to it
  3. rednet.open("top")
  4. while true do
  5.     -- Listen for a command
  6.     local id, message = rednet.receive()
  7.     print(message)
  8.     success, result = commands.exec(message)
  9.     print(result[1])
  10.     rednet.send(id,result[1])
  11.  
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement