DPG-mattcow12

test mfe

Jul 26th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. rednet.open("right")
  2. while true do
  3.   event, id, text = os.pullEvent()
  4.   if event == "rednet_message" then
  5.   print(text)
  6.     if text == "getPower" then
  7.        data["Capacitor Full"] = true
  8.        if data["Capacitor Full"] then
  9.       rednet.send(id, "full")
  10.        elseif data["Capacitor Has Energy"] then
  11.       rednet.send(id, "part")
  12.        elseif data["Capacitor Empty"] then
  13.       rednet.send(id, "empty")
  14.        else
  15.       rednet.send(id, "fail")
  16.        end
  17.     end
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment