Jump to content

Computer Rule Board


Recommended Posts


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.

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites


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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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...