Firestorm002

Essentials API

Jan 18th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. --Essentials API--
  2. w,h = term.getSize()
  3.  
  4. local function write(str,x,y)
  5.   term.setCursorPos(x,y)
  6.   term.write(str)
  7. end
  8.  
  9. local function cWrite(str,y)
  10.   if not y == nil then
  11.     term.setCursorPos(w/2 - #str/2,y)
  12.     term.write(str)
  13.   elseif y == nil then
  14.     term.setCursorPosw/2 - #str/2,h/2)
  15.   else
  16.     error("You did a bad...")
  17.   end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment