Guest User

RpgStarter v0.6 Beta

a guest
Mar 26th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. --[[
  2. Rpg Starter Script By LuaEclipser v0.6 Beta.
  3. --]]
  4.  
  5.  
  6.  
  7.  
  8. --local values
  9. name = "player"
  10. gold = 100
  11. health = 100
  12. local w,h = term.getSize()
  13.  
  14. --startup
  15. function display()
  16. term.setCursorPos(1,3)
  17. term.clearLine(3)
  18. term.setCursorPos(1,3)
  19. end
  20.  
  21.  
  22.  
  23. function head() -- The Header
  24. term.setCursorPos(w/2, 1)
  25. write("Game")
  26. term.setCursorPos(1, 2)
  27. write(string.rep("=", w), 2)
  28. end
  29.  
  30. function drawMain()
  31. --term.setCursorPos(1,h/2+5)
  32. --term.write(string.rep("=", w), 2)
  33. term.setCursorPos(1,h/2-5)
  34. term.write(string.rep("=", w), 2)
  35. end
  36.  
  37. function ReadComplete()
  38. term.clear()
  39. head()
  40. drawMain()
  41. display()
  42. end
  43.  
  44.  
  45. display()
  46. readComplete()
  47. write("Whats Your Name Adventurer? > ")
  48. name = read()
  49. display()
  50. readComplete()
  51. write("press any key to start "..name)
  52. event, p1, p2, p3 = os.pullEvent()
  53. display()
  54. readComplete()
Advertisement
Add Comment
Please, Sign In to add comment