Advertisement
Guest User

startup

a guest
Jun 25th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. textTable={
  2.   "Welcome to NanoTech!",
  3.   "NanoTech specialzes in Computercraft items.",
  4.   "We also sell hand made computercraft programs",
  5.   "Besides pre-made programs you can request",
  6.   "custom made programs Which will be written",
  7.   "specificly for you!",
  8.   "",
  9.   "You can see information about custom programs",
  10.   "at the monitor behind you.",
  11.  
  12. }
  13.  
  14. m=peripheral.wrap("top")
  15. s=peripheral.wrap("right")
  16. function writeText()
  17.   m.setCursorPos(1,1)
  18. m.clear()
  19.     m.setTextScale(1)
  20.   nearPlayers=s.getPlayerNames()
  21.   --print(nearPlayers)
  22.   --print(nearPlayers[1])
  23.   if nearPlayers[1]~=nil then
  24.     print(nearPlayers)
  25.     nearPlayers=nearPlayers[1]
  26.     m.write("Hello ")
  27.     m.setTextColor(32)
  28.     m.write(nearPlayers)
  29.     m.setTextColor(1)
  30.   end
  31.   for line,text in ipairs(textTable) do
  32.     m.setCursorPos(1,line+2)
  33.     m.write(text)
  34.   end
  35. end
  36.  
  37. while true do
  38.   writeText()
  39.   sleep(1)
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement