Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- H4X API v1.0
- -- Author: fail_FTW
- function color( str )
- code = "color." .. str
- term.setTextColor( code )
- end
- function pC( str )
- local x, z = term.getSize()
- if z == 1 then
- x = math.floor( x )
- z = math.floor( z )
- z = z / 2
- x = x - string.len( str )
- term.setCursorPos( x, z )
- else
- term.scroll( 1 )
- local Cx, Cz = term.getCursorPos()
- term.setCursorPos( x, Cz )
- end
- print( str )
- end
- function sPC( str )
- local x, z = term.getSize()
- if z == 1 then
- x = math.floor( x )
- z = math.floor( z )
- z = z / 2
- x = x - string.len( str )
- term.setCursorPos( x, z )
- else
- term.scroll( 1 )
- local Cx, Cz = term.getCursorPos()
- term.setCursorPos( x, Cz )
- end
- textutils.slowPrint( str )
- end
- function wC( str )
- local x, z = term.getSize()
- if z == 1 then
- x = math.floor( x )
- z = math.floor( z )
- z = z / 2
- x = x - string.len( str )
- term.setCursorPos( x, z )
- else
- term.scroll( 1 )
- local Cx, Cz = term.getCursorPos()
- term.setCursorPos( x, Cz )
- end
- term.write( str )
- end
Advertisement
Add Comment
Please, Sign In to add comment