NMDanny

Untitled

Apr 10th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. function SetPeripheral(name)
  2.     for key,direction in pairs(peripheral.getNames()) do
  3.         if(peripheral.getType(direction)==name) then
  4.             print("Peripheral "..key..":"..peripheral.getType(direction))
  5.             return peripheral.wrap(direction)
  6.         end
  7.     end
  8. end
  9. local mon=setPeripheral("monitor")
  10. print("Redirecting output to monitor")
  11. term.redirect(mon)
  12. local ppl={daniel="awesome",notdaniel="faggot"}
  13. for people,info in pairs(ppl) do
  14.     print(people..": "..info)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment