SHOW:
|
|
- or go back to the newest paste.
| 1 | m = peripheral.wrap("top")
| |
| 2 | - | x,y = term.getSize() |
| 2 | + | m.clear() |
| 3 | - | x1,y1 = term.getCursorPos() |
| 3 | + | m.setCursorPos(1,1) |
| 4 | - | term.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1) |
| 4 | + | |
| 5 | - | term.write(text) |
| 5 | + | |
| 6 | - | end |
| 6 | + | x,y = m.getSize() |
| 7 | x1,y1 = m.getCursorPos() | |
| 8 | m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1) | |
| 9 | m.write(text) | |
| 10 | end | |
| 11 | ||
| 12 | --Call function "centerText("")" to set text
| |
| 13 | --Use m.setCursorPos(1,y) to choose placement on screen | |
| 14 | m.setCursorPos(1,1) | |
| 15 | m.setTextScale(2) | |
| 16 | m.setTextColor(colors.red) | |
| 17 | centerText(" Welcome to Maddyncraft FTB Unleashed")
| |
| 18 | ||
| 19 | m.setCursorPos(1,3) | |
| 20 | m.setTextColor(colors.white) | |
| 21 | centerText("Register and vote for daily")
| |
| 22 | ||
| 23 | m.setCursorPos(1,4) | |
| 24 | m.setTextColor(colors.white) | |
| 25 | centerText("rewards @ our website")
| |
| 26 | ||
| 27 | m.setCursorPos(1,5) | |
| 28 | m.setTextColor(colors.white) | |
| 29 | centerText("www.maddyncraft.enjin.com/ftb")
| |
| 30 | ||
| 31 | m.setCursorPos(1,7) | |
| 32 | m.setTextColor(colors.orange) | |
| 33 | centerText("The Rules")
| |
| 34 | ||
| 35 | m.setCursorPos(1,9) | |
| 36 | m.setTextColor(colors.orange) | |
| 37 | m.write("1. No hacking,cheating or unapproved mods")
| |
| 38 | ||
| 39 | m.setCursorPos(1,10) | |
| 40 | m.setTextColor(colors.orange) | |
| 41 | m.write("2. No griefing allowed")
| |
| 42 | ||
| 43 | m.setCursorPos(1,11) | |
| 44 | m.setTextColor(colors.orange) | |
| 45 | m.write("3. No surface mining unless you build on it")
| |
| 46 | ||
| 47 | m.setCursorPos(1,12) | |
| 48 | m.setTextColor(colors.orange) | |
| 49 | m.write("4. No Racism, Sexism or any other ism :p")
| |
| 50 | ||
| 51 | m.setCursorPos(1,13) | |
| 52 | m.setTextColor(colors.orange) | |
| 53 | m.write("5. Obey staff and respect other players")
| |
| 54 | ||
| 55 | m.setCursorPos(1,15) | |
| 56 | m.setTextColor(colors.red) | |
| 57 | centerText("STAFF")
| |
| 58 | ||
| 59 | m.setCursorPos(1,17) | |
| 60 | m.setTextColor(colors.red) | |
| 61 | centerText("Owner: Maddyn99")
| |
| 62 | ||
| 63 | m.setCursorPos(1,18) | |
| 64 | m.setTextColor(colors.red) | |
| 65 | centerText("Lead Admin:ComeNgetUsome")
| |
| 66 | ||
| 67 | m.setCursorPos(1,19) | |
| 68 | m.setTextColor(colors.red) | |
| 69 | centerText("Admin:The_WolfPack")
| |
| 70 | ||
| 71 | ||
| 72 | ||
| 73 | ||
| 74 | --[[ | |
| 75 | EXAMPLE | |
| 76 | y2 = 7 | |
| 77 | m.setCursorPos(1, y2) | |
| 78 | m.setTextColor(colors.red) | |
| 79 | centerText("Welcome to TheSommer's Base!")
| |
| 80 | m.setCursorPos(1, y2 + 1) | |
| 81 | centerText("If you need anything, you're welcome to borrow.")
| |
| 82 | m.setCursorPos(1, y2 + 3) | |
| 83 | m.setTextColor(colors.lightBlue) | |
| 84 | centerText("youtube.com/TheSommersMC")
| |
| 85 | m.setCursorPos(1, y2 + 5) | |
| 86 | m.setTextColor(colors.lime) | |
| 87 | centerText("<3 Sommer")
| |
| 88 | --]] |