bocaj1234567 Posted January 9, 2013 Posted January 9, 2013 Basically, I want my rules to show on monitors. How do I save my script? Could I make the script out of game? How do I make the script run on that specific computer on startup? Quote
disconsented Posted January 9, 2013 Posted January 9, 2013 C = 0 sTime = 1 function PrintMessage(message) print(message) sleep(sTime) end while C ~= 0 do PrintMessage("1") PrintMessage("2") PrintMessage("3") PrintMessage("4") end Just change the sTime to the delay between messages Change 1,2,3 and 4 to your rules. If you want extra rules just copy and paste the PrintMessage("1") function and change the message to print. Quote
bocaj1234567 Posted January 10, 2013 Author Posted January 10, 2013 C = 0 sTime = 1 function PrintMessage(message) print(message) sleep(sTime) end while C ~= 0 do PrintMessage("1") PrintMessage("2") PrintMessage("3") PrintMessage("4") end Just change the sTime to the delay between messages Change 1,2,3 and 4 to your rules. If you want extra rules just copy and paste the PrintMessage("1") function and change the message to print. Would that make the code run at restart? How do I save that? Where do I write it? Thank you. Quote
Portablejim Posted January 10, 2013 Posted January 10, 2013 The code exists on the server inside a 'computer' folder that is inside the world save, separated into the id of the computer/turtle the program is on (e.g. for the client on a single player world called "World", editing startup on the first computer they create: <tekkit folder>/saves/World/computer/0/startup). They are just text files, so open them with Notepad (I would recommend Notepad++ (Windows) or TextWrangler (OS X) instead of notepad). Quote
bocaj1234567 Posted January 10, 2013 Author Posted January 10, 2013 The code exists on the server inside a 'computer' folder that is inside the world save, separated into the id of the computer/turtle the program is on (e.g. for the client on a single player world called "World", editing startup on the first computer they create: <tekkit folder>/saves/World/computer/0/startup). They are just text files, so open them with Notepad (I would recommend Notepad++ (Windows) or TextWrangler (OS X) instead of notepad). How can I tell what number in the computer folder is the computer that I am using? Quote
theprolo Posted January 10, 2013 Posted January 10, 2013 Start up your computer, without starting a program type "lua", then type "os.getComputerID()", without the speech marks of course. If you get that in properly, it'll give you your computer number. Quote
bocaj1234567 Posted January 10, 2013 Author Posted January 10, 2013 Start up your computer, without starting a program type "lua", then type "os.getComputerID()", without the speech marks of course. If you get that in properly, it'll give you your computer number. OK thanks a lot. When I looked in the computer folders, though, I didn't find any startup files for any of the computers. Should I create the file? Quote
theprolo Posted January 10, 2013 Posted January 10, 2013 Yeah, just create the file in notepad etc. Quote
lukeb28 Posted January 10, 2013 Posted January 10, 2013 Using the edit start up, will it also re-run when the server is restarted? Quote
Portablejim Posted January 10, 2013 Posted January 10, 2013 Using the edit start up, will it also re-run when the server is restarted? Only if the chunk gets loaded. Quote
lukeb28 Posted January 11, 2013 Posted January 11, 2013 Only if the chunk gets loaded. That's great! I will use this in my server then! Quote
bocaj1234567 Posted January 11, 2013 Author Posted January 11, 2013 That's great! I will use this in my server then! What's your server? Quote
lukeb28 Posted January 11, 2013 Posted January 11, 2013 Its industrial age. Its coming up soon for white list and eventually public. we have one more slot for beta testers if your interested. Quote
bocaj1234567 Posted January 11, 2013 Author Posted January 11, 2013 Its industrial age. Its coming up soon for white list and eventually public. we have one more slot for beta testers if your interested. Oh OK. I own the server zeus.tekkithost.com:25573. I would like to be a beta tester... Quote
bocaj1234567 Posted January 11, 2013 Author Posted January 11, 2013 T Its industrial age. Its coming up soon for white list and eventually public. we have one more slot for beta testers if your interested. There is no one on the server ATM cause it just crashed (if you go on about now) but there were 27. Quote
lukeb28 Posted January 11, 2013 Posted January 11, 2013 T There is no one on the server ATM cause it just crashed (if you go on about now) but there were 27. Not us. We haven't even posted on the forum yet. I'm actually trying to do that now. just Pm me like a normal whitelist app and I'll see what I can do. Quote
bocaj1234567 Posted January 12, 2013 Author Posted January 12, 2013 C = 0 sTime = 1 function PrintMessage(message) print(message) sleep(sTime) end while C ~= 0 do PrintMessage("1") PrintMessage("2") PrintMessage("3") PrintMessage("4") end Just change the sTime to the delay between messages Change 1,2,3 and 4 to your rules. If you want extra rules just copy and paste the PrintMessage("1") function and change the message to print. Wait a second.... don't I have to specify the monitor? Quote
lukeb28 Posted January 12, 2013 Posted January 12, 2013 Wait a second.... don't I have to specify the monitor? Looking at it now... Your Right! What kind of code is this? This just won't do for my server! Quote
bocaj1234567 Posted January 12, 2013 Author Posted January 12, 2013 Looking at it now... Your Right! What kind of code is this? This just won't do for my server! ... It "won't do"? It just requires a simple change I think. Quote
lukeb28 Posted January 12, 2013 Posted January 12, 2013 ... It "won't do"? It just requires a simple change I think. I have no clue how to code with LUA. If you know the mod that needs to be made to it, why don't you post it? Quote
theprolo Posted January 12, 2013 Posted January 12, 2013 I'll post one for you, which will hopefully work better. Don't make this one your startup command: print("Message 1") print("Message 2") print ("etc.") Then there's your startup function: side = "right"--change to whatever side your monitor is on shell.run("monitor", side, "Original program name") That should work for you. Copy the print statements in the first one to add more rules, and remember to change the last part of the shell.run to your original programs name. Quote
lukeb28 Posted January 12, 2013 Posted January 12, 2013 That should work for you. Copy the print statements in the first one to add more rules, and remember to change the last part of the shell.run to your original programs name. Thanks for the help. Funny thing is a little while ago I made a thread asking this same question and never got a response. Quote
theprolo Posted January 12, 2013 Posted January 12, 2013 I must have not been online If that hits an error, just post it here. Quote
lukeb28 Posted January 12, 2013 Posted January 12, 2013 I must have not been online If that hits an error, just post it here. I can't do it now but I will ASAP. 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.