This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Deathknight0897's profile picture

Automatic Scrolling Rule Board

Started by Deathknight0897, 05 July 2012 - 05:15 AM
Deathknight0897 #1
Posted 05 July 2012 - 07:15 AM
This is a really simple scrolling up rule board for servers you can even use it as a service announcer or anything that needs to print text

Put this in startup "edit startup"

shell.run ("monitor", "top", "rules")
change top to where the monitors are in comparison to the computer
ie
Key
C computer
M monitor

[m][m][m]
[m][m][m]
[m][m][m]
[ ][c ][ ]

put this in "edit rules"

repeat
sleep(5)
print ("RULE 1")
print ("---------------------------")
sleep(5)
print ("RULE 2")
print ("---------------------------")
sleep(5)
print ("RULE 3")
print ("---------------------------")
sleep(5)
print ("RULE 4")
print ("---------------------------")
sleep(5)
print ("RULE 5")
print ("---------------------------")
sleep(5)
print ("RULE 6")
print ("---------------------------")
sleep(5)
print ("RULE 7")
print ("---------------------------")
until a -- 1

if you have more than seven rules just keep adding these


sleep(5) -- change the number to change the speed
print ("RULE 7") -- edit the text within ("")
print ("---------------------------") -- you may have to add more if your screen is wider than 3 monitors

just make sure this is at the bottom

until a -- 1

any questions please ask me

Or if you want a alternate version



local tRules = {
"Rule 1",--edit the text within ("")
"Rule 2",--edit the text within ("")
"Rule 3",--edit the text within ("")
}
while true do
  for i, sRule in ipairs(tRules) do
    sleep(5)--change the number to change the speed
    print(sRule)
    print("---------------------------")-- you may have to add more if your screen is wider than 3 monitors
  end
end


if you want more than 3 rules simply



local tRules = {
"Rule 1",--edit the text within ("")
"Rule 2",--edit the text within ("")
"Rule 3",--edit the text within ("")
-- add another line here in the same format as above
}
ardera #2
Posted 05 July 2012 - 01:41 PM
would be easier to use tables…
Deathknight0897 #3
Posted 05 July 2012 - 01:47 PM
How do you mean please give example :P/>/>
would be easier to use tables…
inventor2514 #4
Posted 05 July 2012 - 02:42 PM
I think ardera meant something like this:


local tRules = {"Rule 1", "Rule 2", "Rule 3", "etc." }
repeat
for i, sRule in ipairs(tRules) do
sleep(5)
print(sRule)
print("---------------------------")
end
until a -- 1
Deathknight0897 #5
Posted 05 July 2012 - 02:53 PM
ah i see that's clever i will attempt to implement know only problem i see with it if you need to change one of the rules going to be a pain to find on that first line if u got like 50:D
I think ardera meant something like this:


local tRules = {"Rule 1", "Rule 2", "Rule 3", "etc." }
repeat
for i, sRule in ipairs(tRules) do
sleep(5)
print(sRule)
print("---------------------------")
end
until a -- 1
MysticT #6
Posted 05 July 2012 - 02:57 PM
ah i see that's clever i will attempt to implement know only problem i see with it if you need to change one of the rules going to be a pain to find on that first line if u got like 50:D
I think ardera meant something like this:


local tRules = {"Rule 1", "Rule 2", "Rule 3", "etc." }
repeat
for i, sRule in ipairs(tRules) do
sleep(5)
print(sRule)
print("---------------------------")
end
until a -- 1
Then just put them in separate lines:

local tRules = {
"Rule 1",
"Rule 2",
"Rule 3",
"etc."
}

while true do
  for i, sRule in ipairs(tRules) do
    sleep(5)
    print(sRule)
    print("---------------------------")
  end
end
Deathknight0897 #7
Posted 05 July 2012 - 03:01 PM
Mystic T your an angel i will re post the alternate version to give people the option of either
Deathknight0897 #8
Posted 05 July 2012 - 03:07 PM
Alternate version is up for those who prefer that method much easier if you have a mass load of rules you rule whore u
mikekrason #9
Posted 27 July 2012 - 11:46 PM
Ummm, How exactly do you stop it? I'm a noob with CC :)/>/>