hey i was just wondering around with cc a bit and i was wondering if any of you guys could make a script for me with like
welcome to the server
rules info
ranks
____________________________
if it might be asked to much i'm sorry i just wanne have something for the new people on the server thank you for helping me or at least reading it
If you just want this put up on a big monitor that's pretty simple. Start by wrapping the monitor i.e.
Code:
mon = peripheral.wrap("top")
if the monitor is on top of the computer. From there you can go one of two ways: 1) Use
Code:
mon.setCursorPos(1,[line #])
to change lines and
to write text on those lines.
2) after wrapping the monitor use
and use
to write each line.
print() automatically goes to the next line whereas write() doesn't, however since print() isn't part of the term API, it's not directly usable by the monitor so we have to use the redirect() function instead. I prefer the redirect() route for simple lists like these, though it's not quite as flexible in some slightly more advanced applications.
If you want to get fancy with colors on an advanced monitor you can use mon.setTextColor() and mon.setBackgroundColor()
Giving the monitor a nice layout is possible to code so it handles different monitor sizes dynamically, but it's MUCH easier to just manually add a bunch of spaces (or hyphens, whatever - filler characters) to your print() lines so that it fits your needs.
Also, make sure the program is saved as "startup" so that it will automatically be running even after server restarts/chunks unloading, etc.
Here's the CC wiki page for
monitors as well as the page for the
term API (the functions you can call on the monitor).
Overall your code should look something like
Code:
mon = peripheral.wrap("top")
term.redirect(mon)
print("Welcome to the Server!")
print("Rules:")
print("1. blah blah blah")
--rest of your rules/info enclosed in print() functions (remember to include the quotes as well)
term.restore()
that restore() at the end just returns message printouts to the computer terminal rather than the monitor so you can mess with stuff without screwing up your sign.