Advertisement
SirBaconBitz

lookingAt

Jan 25th, 2014
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. sens = peripheral.wrap("left")
  2. terminal = peripheral.wrap("right")
  3. terminal.clear()
  4. namebox = terminal.addBox(10, 10, 75, 25, 0x00FFFF, 0.5)
  5. nametext = terminal.addText(12, 17, "placeholder", 0xFFFFFF)
  6. typebox = terminal.addBox(10, 40, 50, 15, 0x00FFFF, 0.5)
  7. valuebox = terminal.addBox(10, 60, 50, 15, 0x00FFFF, 0.5)
  8. typetext = terminal.addText(12, 45, "I'm not going to make the type work.", 0xFFFFFF)
  9. valuetext = terminal.addText(12, 65, "1", 0xFFFFFF)
  10. while true do
  11. local _, msg = os.pullEvent("chat_command")
  12. data = sens.getPlayerData(name)
  13. first = nil
  14. second = nil
  15. third = nil
  16. fourth = nil
  17. if string.find(msg, "name") then
  18. for word in msg:gmatch('%S+') do
  19. if word == "name" then
  20. print("nope")
  21. else
  22. name = word
  23. end
  24. end
  25. nametext.setText(name)
  26. print(name.."t")
  27. else
  28. end
  29. if string.find(msg, "typeset") then
  30. local pos = string.find(msg, " ")
  31. local type = string.sub(msg, 1, pos, -1)
  32. typetext.setText(type)
  33. end
  34. if string.find(msg, "value") then
  35. runit = msg
  36. print("accepted")
  37. end
  38. if msg == "get" then
  39. data = sens.getPlayerData(name)
  40. end
  41.  
  42.  
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement