Advertisement
Jackson_Pike

townyinfo2

Aug 6th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.89 KB | None | 0 0
  1. -------------------
  2. if fs.exists("m") then
  3. --fs.delete("m")
  4. --shell.run("pastebin get nXvVUSuw m")
  5. term.clear()
  6. term.setCursorPos(1, 1)
  7. os.loadAPI("m")
  8. else
  9. shell.run("pastebin get nxvvusuw m")
  10.  
  11. term.clear()
  12. term.write("Downloading Text API.")
  13. sleep(1)
  14. term.write(".")
  15. sleep(1)
  16. term.write(".")
  17. sleep(1)
  18. term.write(" Success")
  19. term.setCursorPos(1, 2)
  20. os.loadAPI("m")
  21. shell.run("m")
  22. end
  23. function Ters()
  24. term.setBackgroundColor(colors.gray)
  25. term.clear()
  26. term.setCursorPos(1, 1)
  27. term.write("Running: Towny Info")
  28. end
  29. function mon2()
  30.  
  31. end
  32. -------------------
  33. mon = peripheral.wrap("front")
  34. mon2 = peripheral.wrap("monitor_4")
  35. monX, monY = mon.getSize()
  36. mon.setTextScale(1)
  37. -------------------
  38. function page1()
  39. m.clearScreen(colors.black, colors.black)
  40. m.drawBars(colors.gray, 1)
  41. m.writeText(monX/2-7, 1, colors.gray, colors.white, "Towny Plugin Tutorial")
  42. --m.writeText(46, 18, colors.lightGray, colors.red, " V ")
  43. m.writeText(2, 3, colors.black, colors.red, "What is it? -")
  44. m.writeText(17, 3, colors.black, colors.white, "Towny is a Grief Prevention and")
  45. m.writeText(2, 4, colors.black, colors.white, " Plot Management plugin, which allows complete")
  46. m.writeText(2, 5, colors.black, colors.white, " control and protection of your base.")
  47. m.writeText(2, 6, colors.black, colors.red, "Claiming: ")
  48. m.writeText(3, 7, colors.black, colors.white, "Towny is a chunk based claiming system. Each")
  49. m.writeText(3, 8, colors.black, colors.white, "claim costs 1 town block, and $1000. Town")
  50. m.writeText(3, 9, colors.black, colors.white, "blocks are the amount of chunks you can")
  51. m.writeText(3, 10, colors.black, colors.white, "claim. For each resident, the town gets")
  52. m.writeText(3, 11, colors.black, colors.white, "8 town blocks. You can purchase up to 100")
  53. m.writeText(3, 12, colors.black, colors.white, "bonus town blocks.")
  54. m.writeText(2, 13, colors.black, colors.red, "Daily Upkeep and Taxes:")
  55. m.writeText(3, 14, colors.black, colors.white, "Daily Upkeep is the required amount per real")
  56. m.writeText(3, 15, colors.black, colors.white, "day to run the town. Each chunk adds $10 ")
  57. m.writeText(3, 17, colors.black, colors.white, "If upkeep isn't paid, the town will dissolve.")
  58. m.writeText(3, 16, colors.black, colors.white, "These funds are taken from the town Bank. ")
  59. m.writeText(3, 18, colors.black, colors.white, "Taxes, however, are set by the town mayor,")
  60. m.writeText(3, 19, colors.black, colors.white, "and are collected from all residents Daily.")
  61. monx, mony = mon2.getSize()
  62. mon2.setBackgroundColor(colors.black)
  63. mon2.clear()
  64. mon2.setTextColor(colors.white)
  65. mon2.setTextScale(1)
  66. mon2.setCursorPos(1, 1)
  67. mon2.setBackgroundColor(colors.gray)
  68. mon2.write(string.rep(" ", monx))
  69. mon2.setCursorPos(1, mony)
  70. mon2.write(string.rep(" ", monx))
  71. mon2.setBackgroundColor(colors.black)
  72. mon2.setTextColor(colors.red)
  73. mon2.setCursorPos(1, 3)
  74. mon2.write("------>")
  75. event, side, xpos, ypos = os.pullEvent("monitor_touch")
  76. if side == "front" then
  77.   page2()
  78. end
  79. end
  80. function page2()
  81. m.clearScreen(colors.black, colors.black)
  82. m.drawBars(colors.gray, 1)
  83. m.writeText(monX/2-7, 1, colors.gray, colors.white, "  Towny Commands")
  84.  
  85. m.writeText(2, 2, colors.black, colors.red, "Commands: M - Mayor A - Assistant")
  86. m.writeText(3, 3, colors.black, colors.yellow, "Create Town: ")
  87. m.writeText(15, 3, colors.black, colors.white, " /t create <name>")
  88. m.writeText(3, 4, colors.black, colors.yellow, "Town Stats:")
  89. m.writeText(14, 4, colors.black, colors.white, " /t or /t <towname>")
  90. m.writeText(3, 5, colors.black, colors.yellow, "Add Residents: ")
  91. m.writeText(17, 5, colors.black, colors.white, " /t add <username>")
  92. m.writeText(3, 6, colors.black, colors.yellow, "Deposit $: ")
  93. m.writeText(14, 6, colors.black, colors.white, "/t deposit <amount>")
  94. m.writeText(3, 7, colors.black, colors.yellow, "Toggle Settings: ")
  95. m.writeText(20, 7, colors.black, colors.white, "/t toggle <setting>")
  96. m.writeText(3, 8, colors.black, colors.yellow, "Outposts: ")
  97. m.writeText(13, 8, colors.black, colors.white, "/t claim outpost and /t outpost")
  98. m.writeText(3, 9, colors.black, colors.red, "(MA)")
  99. m.writeText(7, 9, colors.black, colors.yellow, "Withdraw $: ")
  100. m.writeText(19, 9, colors.black, colors.white, "/t withdraw <$>")
  101. m.writeText(3, 10, colors.black, colors.red, "(MA)")
  102. m.writeText(7, 10, colors.black, colors.yellow, "Claim Chunks: ")
  103. m.writeText(21, 10, colors.black, colors.white, "/town claim")
  104. monx, mony = mon2.getSize()
  105. mon2.setBackgroundColor(colors.black)
  106. mon2.clear()
  107. mon2.setTextColor(colors.white)
  108. mon2.setTextScale(1)
  109. mon2.setCursorPos(1, 1)
  110. mon2.setBackgroundColor(colors.gray)
  111. mon2.write(string.rep(" ", monx))
  112. mon2.setCursorPos(1, mony)
  113. mon2.write(string.rep(" ", monx))
  114. mon2.setBackgroundColor(colors.black)
  115. mon2.setTextColor(colors.red)
  116. mon2.setCursorPos(1, 3)
  117. mon2.write("<------")
  118. event, side, xpos, ypos = os.pullEvent("monitor_touch")
  119. if side == "monitor_4" then
  120.  page1()
  121. end
  122. end
  123. page1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement