Jump to content

Recommended Posts

Posted

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!

Posted

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.

Posted

you can just rename the program you have made to staratup .then every time the PC starts it will load the rules. and will only stop if you stop it by force.

Posted

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

  • 3 weeks later...
Posted

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.

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...