3RAD1CAT0R Posted July 10, 2012 Posted July 10, 2012 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!
Neowulf Posted July 10, 2012 Posted July 10, 2012 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.
HaoSs Posted July 10, 2012 Posted July 10, 2012 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.
Neowulf Posted July 10, 2012 Posted July 10, 2012 Renaming the program to startup does work, but my way teaches a valuable skill. Shell.run() will save you complexity and hours of typing in the long run.
3RAD1CAT0R Posted July 10, 2012 Author Posted July 10, 2012 but how do i get it to automatically put it up on a monitor?
HaoSs Posted July 10, 2012 Posted July 10, 2012 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
inkery Posted August 1, 2012 Posted August 1, 2012 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.
VideoBoy Posted August 1, 2012 Posted August 1, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now