49 posts
Posted 18 November 2012 - 09:43 PM
The MagicalMysteryTour Hack? isn't really even a hack. Seriously! Try it out, it's funny! I hope. Really has no purpose other than to be funny. Also, the only way out is to go on the tour. Or termination. Only two ways. Might even make it so you have to go through it…
Here's the code!
--Settings
local input = t
--Code
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colours.lime)
print("MAGICAL MYSTERY TOUR!!! LOL!!!")
sleep(1)
write("Engage the Magical Mystery Tour? ")
t = read()
if t == "yes" then
print("LOL!!! WEEE!!! FUN!!! xD xD xD!!! MAGICAL!!!")
sleep(1)
print(" ")
sleep(1)
print("MAGICAL MYSTERY TOUR, AWAY!!!")
sleep(2)
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colours.yellow)
print("CraftOS 1.4")
term.setCursorPos(1,2)
else
print("Disengaging the Magical Mystery Tour...Goodbye")
sleep(1)
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colours.yellow)
print("CraftOS 1.4")
term.setCursorPos(1,2)
end
As you can see there, you can terminate it, and you can exit it - it isn't endless, thus it isn't really a hack. Or is it? Nah, I am not that experienced…yet.
pastebin get wfKfRBgp mmTh
Have fun going on Magical Mystery Tours!
222 posts
Location
Canada
Posted 18 November 2012 - 09:54 PM
You should really rethink this. What if someone who views this is an Epileptic?
Also, i belive this falls under Malicious. Not sure.
222 posts
Location
Canada
Posted 18 November 2012 - 09:58 PM
Nevermind. Its broken.
You need to add an 'end' at 44.
And try this.
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colours.lime)
print("MAGICAL MYSTERY TOUR!!! LOL!!!")
sleep(1)
write("Engage the Magical Mystery Tour?")
local t == read()
if t == ("yes")
then
print("LOL!!! WEEE!!! FUN!!! xD xD xD!!! MAGICAL!!!")
sleep(1)
print(" ")
sleep(1)
2088 posts
Location
South Africa
Posted 18 November 2012 - 10:05 PM
I laughed reading what gets printed :)/>/>
49 posts
Posted 18 November 2012 - 10:09 PM
Fixed. Also made it so if you input anything other than "yes" it reverts back to regular CraftOS. Also might make it delete itself if you input a certain command, not sure though. If still considered malicious, then I will remove this.
Again, have fun going on Magical Mystery Tours!
2088 posts
Location
South Africa
Posted 18 November 2012 - 10:25 PM
Don't put read() first, because then you will start it and then it wants you to input something so therefore it doesn't even ask if you want to start
write("Engage the Magical Mystery Tour?")
t = read()
49 posts
Posted 19 November 2012 - 08:58 AM
Fixed with your suggestions remiX. Now I am 100% sure that it works without fail. Also updated the pastebin code for the new program. Have fun going on Magical Mystery Tours!
222 posts
Location
Canada
Posted 20 November 2012 - 06:57 PM
Still dosen't work lol.
2088 posts
Location
South Africa
Posted 21 November 2012 - 07:07 AM
Fixed with your suggestions remiX. Now I am 100% sure that it works without fail. Also updated the pastebin code for the new program. Have fun going on Magical Mystery Tours!
Cool. Why not have it say a random thing if you type yes? :(/>/>
Still dosen't work lol.
What does it do? It should o_O
49 posts
Posted 21 November 2012 - 03:44 PM
If it doesn't work, what is it about it that doesn't? How am I too fix this so it does?
remiX - once I learn more LUA (both with CC and plain) I'll make it so you input a number. The number input is how many times mmTh? will repeat, with a limit of 10 times of course.
149 posts
Posted 22 November 2012 - 03:16 AM
As strange as this program is …. here is a small suggestion :
It will cause the program to loop endlessly unless you press enter or click mouse rapidly (eventually that will cancel it)
while true do
os.startTimer(0.1)
local gnb,keyr = os.pullEvent()
if gnb == "timer" then
--THE MAGICAL TOUR GOES HERE!
----
----
----
----
elseif gnb == "key" and keyr == 28 then
return false -- cancells the tour!
elseif gnb == "mouse_click" then
return false -- same but uses mouse too!
end
end
49 posts
Posted 22 November 2012 - 12:04 PM
I like your suggestion Arch - I may replace that and make a separate version for those who want to actually try to exit.
149 posts
Posted 22 November 2012 - 05:24 PM
funny how i made this code for the anotherOS suggestion but it will also work here :
it will check a 'config' file to see if the user set the pc to advanced computer compatible, if the file dont exist it creates and has user let program know what to set as.
this allows infinite loop idea on both tekkit-(or pre 1.4.5CC)- computers and 1.4.5+
-- [[ startup : check for advanced! ]] --
if fs.exists("mmthConfig") = true then
tempfile = fs.open("mmthConfig","r")
if tempfile.readLine() == "true" then
tempfile.close()
xifAdvanced()
elseif tempfile.readLine() == "false" then
tempfile.close()
xifBasic()
end
else
while true do
tempfile = fs.open("mmthConfig","w")
print("Is this an Advanced computer?")
print("Use 'Y' or 'N' ")
reads = read()
if reads == "Y" then
tempfile.writeLine("true")
tempfile.close()
xifAdvanced()
elseif reads == "N" then
tempfile.writeLine("false")
tempfile.close()
xifBasic()
end
end
end
-- [[ The magical tours! ]] --
function xifBasic()
while true do
os.startTimer(0.1)
local gnb,keyr = os.pullEvent()
if gnb == "timer" then
--THE MAGICAL TOUR GOES HERE!
----
----
----
----
elseif gnb == "key" and keyr == 28 then
return false -- cancells the tour!
end
end
end
function xifAdvanced()
while true do
os.startTimer(0.1)
local gnb,keyr = os.pullEvent()
if gnb == "timer" then
--THE MAGICAL TOUR GOES HERE!
----
----
----
----
elseif gnb == "key" and keyr == 28 then
return false -- cancells the tour!
elseif gnb == "mouse_click" then
return false -- same but uses mouse too!
end
end
end
perhaps tos in a extra config setup where :
CanExit = boolean
if true then can force close it
if not true its un closable
can be set by "edit CONFIG"
222 posts
Location
Canada
Posted 22 November 2012 - 05:52 PM
ArchAngle is an amazing coder. Take suggestions from him ;)/>/>
also, for those who don't know:
Magical Mystery Tour is a beetles song and movie.
49 posts
Posted 22 November 2012 - 08:54 PM
ArchAngle - I'd have to test out the code to see if its something I would like to implement. It may take a day or two though.
rhyleymaster - I did not know that. Now I do.
149 posts
Posted 23 November 2012 - 02:11 AM
haha its funny cause i JUST made that infinite loop with terminate for my program and saw that yours could benifit ;)/>/>
feel free to check Angel-TV, give suggestions! maybe make me a splash screen for the program!
anyways–
any other ideas i get ill push over, its random program but if you make it do some very "trippy" things then FUN -_-/>/>
some how i feel random colors jumping all over feels like a tour, hmm "click the red cube before it dissapears!" lol
-edit-
should i toss in that CanExit boolean in the code ? as i stated above post
1619 posts
Posted 23 November 2012 - 07:27 AM
This is really lame and useless, all it does is print a couple lines of text on the screen, then reverts to CraftOS. Or am I missing the point?
49 posts
Posted 23 November 2012 - 04:53 PM
dlcruz - it's mostly useless, to some degree. I might also make it delete itself at some point so then you have to redownload it just to use it again. Maybe do some other things too… It's mostly useless, as you said - but its only lame now.