Advertisement
s3ptum

Tutorial

Mar 21st, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. m = peripheral.wrap("back")
  2. m.clear()
  3. m.setCursorPos(1,1)
  4. m.setTextScale(1)
  5.  
  6. local function centerText(text)
  7. x,y = m.getSize()
  8. x1,y1 = m.getCursorPos()
  9. m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
  10. m.write(text)
  11. end
  12.  
  13. --Call function "centerText("")" to set text
  14. --Use m.setCursorPos(1,y) to choose placement on screen
  15.  
  16. y2 = 1
  17. m.setCursorPos(1, y2 + 1)
  18. centerText("FINALCRAFT ONLINE")
  19.  
  20. m.setCursorPos(1, y2 + 2)
  21. centerText("RULES")
  22.  
  23. m.setCursorPos(1, y2 + 4)
  24. centerText("NO GREIFING")
  25.  
  26. m.setCursorPos(1, y2 + 5)
  27. centerText("BE NICE")
  28.  
  29. m.setCursorPos(1, y2 + 6)
  30. centerText("HAVE FUN")
  31.  
  32. m.setCursorPos(1, y2 + 8)
  33. centerText("Sign up at fco.enjin.com for member rank!")
  34.  
  35. m.setCursorPos(1, y2 + 9)
  36. centerText("To get to mining world use:")
  37.  
  38. m.setCursorPos(1, y2 + 10)
  39. centerText("/goto mine")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement