Jump to content

Tekkit server Computer Craft Rules Board


Recommended Posts

Hello, i started my own tekkit public server the other day and decided that i was going to use monitors to display my rules and information boards, i have them programmed and everything displaying exactly how i want them to, the only problem is that when ever the server restarts, the displays wipe and i have to manually tell the monitor to display the rules again. i was wondering is there any type of code i can put in the startup program so it will automatically run the rules so i dont have to keep manually doing it every time the server restarts? if there is such a code could you please tell me. Thanks!

Link to comment
Share on other sites

Computers will run the "startup" program when the computer loads. It first checks for one on a disk in a connected disk drive, then checks the computer's local storage.

Easiest way, assuming you have a program called "rules" that has a hardcoded side to attach to:

edit startup <enter>

shell.run("rules") <enter>

<ctrl> Choose save.

<ctrl> Choose exit.

Link to comment
Share on other sites

have you seen the basic spotlight of the monitors ?

Or if i remember correctly you can just use: shell.run("monitor" "right" "program")

IF you have a monitor on the right side of the computer.and where " program" is the name of the program you put your rules in. don't forget to scale the text and center it

Link to comment
Share on other sites

  • 3 weeks later...

Hello this is inkery i was kicked for advertising , i didn't know telling your friend the ip for your server in private chat was advertising so i'm sorry for that wont happen again i was just asking him if he would go on it so i would know if it worked i won't do it again i promise. Sincerely: Inkery. i would really like to be able to get back on the server today plz reply back.

Link to comment
Share on other sites

This is how I do it. Simplified version; the actual one loads two different files and displays them on two different monitors. If you want the full thing, Paypal me $5. Note the dual startup files - that's to prevent Ctrl+T (terminate program) and Ctrl+R (restart computer). If you want to disable Ctrl+S (shutdown computer) you have to cover the computer in bedrock. Enjoy! :)

file startup:

while true do

  shell.run("startup2")

end



 

file startup2:


hFile = io.open("rules.txt")

 

sLine = hFile:read()

 

term.redirect(peripheral.wrap("left"))

term.clear()

term.setCursorPos(1,1)

while sLine do

  print(sLine)

  sLine = hFile:read()

end

 

hFile:close()

 

while true do sleep(10) end



 

file rules.txt:


Rule 1: no hax

Rule 2: no grief

Rule 3: no bumsex

Rule 4: embrace communism

Rule 5: always say "ALL HEIL 3RAD1CAT0R" when he logs on

All rules are worthy of ban on violation.

Guilty until proven innocent.

Ban first and ask questions never.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...