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! Quote
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. Quote
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. Quote
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. Quote
3RAD1CAT0R Posted July 10, 2012 Author Posted July 10, 2012 but how do i get it to automatically put it up on a monitor? Quote
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 Quote
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. Quote
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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.