Jump to content




No Disk Drive Allowed!


  • You cannot reply to this topic
33 replies to this topic

#1 odd_kid

  • New Members
  • 35 posts
  • LocationProfessional Bug Finder, In San Antonio

Posted 05 August 2012 - 06:30 PM

Im writing code for logging in, and i need to know how to make it so you CANT boot from a floppy when a disk drive is placed.

Ive heard just place obbby around it, but it looks so ugly to me, id rather just program it in.

#2 Zalerinian

  • New Members
  • 68 posts
  • LocationThe Internet

Posted 05 August 2012 - 06:47 PM

That can't be done on a server, unless you're the server operator. You'll need to modify the shell file inside of the ROM folder, which cannot be edited inside of the game. Another way to stop disks is to simply surround the computer in any material on all sides except for one so that you can use it, but you can't put a disk drive on it.

If you need a disk drive, however, then put it on one of the sides that is inaccessible without breaking a block, preferably protected ones.

#3 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 05 August 2012 - 09:43 PM

If you use a disk drive you'll want to place it on top of the computer. That is the first side in the boot priority. If you dont someone else can still put a drive on top and boot off of the disk.

#4 odd_kid

  • New Members
  • 35 posts
  • LocationProfessional Bug Finder, In San Antonio

Posted 06 August 2012 - 12:00 AM

Thankyou for the info, sad to know i cant.

#5 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 01:45 AM

If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine

#6 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 06 August 2012 - 04:00 AM

View PostPharap, on 06 August 2012 - 01:45 AM, said:

If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine

Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.

#7 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 04:13 AM

View Postluanub, on 06 August 2012 - 04:00 AM, said:

View PostPharap, on 06 August 2012 - 01:45 AM, said:

If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine

Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.

In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.

#8 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 06 August 2012 - 04:36 AM

View PostPharap, on 06 August 2012 - 04:13 AM, said:

View Postluanub, on 06 August 2012 - 04:00 AM, said:

View PostPharap, on 06 August 2012 - 01:45 AM, said:

If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine

Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.

In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.
Its a delayer.
It makes it so people think they can't shutdown your computer (I had same idea).. It's clever.

#9 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 06 August 2012 - 05:46 AM

View PostPharap, on 06 August 2012 - 04:13 AM, said:

View Postluanub, on 06 August 2012 - 04:00 AM, said:

View PostPharap, on 06 August 2012 - 01:45 AM, said:

If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine

Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.

In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.

You cannot block or avoid Ctrl-R. The computer will reboot if that combination is held down for a certain time, period. Even if you eject the disk as soon as the Control key is pressed, all they have to do is shut it down instead, put the disk in the drive, and then turn the machine on. You can't get around it without making the sides inaccessible or editing the ROM.

#10 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 06 August 2012 - 05:49 AM

You can...
You just need to use lockette signs so the blocks are un-breakable.
It will "delay" it. You can continue to hold it down and for the same amount of time it will shutoff but its a brain trick. If it says you cannot shutdown this computer, it will, but you might let go of the buttons because you're confused or you actually think he created a block.

#11 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 06:16 AM

View PostLyqyd, on 06 August 2012 - 05:46 AM, said:

View PostPharap, on 06 August 2012 - 04:13 AM, said:

View Postluanub, on 06 August 2012 - 04:00 AM, said:

View PostPharap, on 06 August 2012 - 01:45 AM, said:

If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine

Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.

In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.

You cannot block or avoid Ctrl-R. The computer will reboot if that combination is held down for a certain time, period. Even if you eject the disk as soon as the Control key is pressed, all they have to do is shut it down instead, put the disk in the drive, and then turn the machine on. You can't get around it without making the sides inaccessible or editing the ROM.

If you remap the ctrl-r event to something else and put it in a loop, it should get stuck on that loop and perform that code instead, just like how in real world computers you can override ctrl alt delete by making a program fire an event and process something when the keys are pressed.

#12 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 06 August 2012 - 07:39 AM

But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.

#13 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 06 August 2012 - 09:23 AM

View PostPharap, on 06 August 2012 - 06:16 AM, said:

If you remap the ctrl-r event to something else and put it in a loop, it should get stuck on that loop and perform that code instead, just like how in real world computers you can override ctrl alt delete by making a program fire an event and process something when the keys are pressed.
Wrong, its hardcoded... It will shutdown no matter what.

#14 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 10:35 AM

View PostNoodle, on 06 August 2012 - 09:23 AM, said:

View PostPharap, on 06 August 2012 - 06:16 AM, said:

If you remap the ctrl-r event to something else and put it in a loop, it should get stuck on that loop and perform that code instead, just like how in real world computers you can override ctrl alt delete by making a program fire an event and process something when the keys are pressed.
Wrong, its hardcoded... It will shutdown no matter what.
I did say should.

#15 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 10:38 AM

View Postluanub, on 06 August 2012 - 07:39 AM, said:

But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
Hrm, that is where CraftOS differs from real world operating systems. It would be handy if you could override them. I did read somewhere on the forums here once someone who said a way to do it through editing code files, but then it wouldn't be much use with a server unless you are the one hosting it.

#16 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 10:52 AM

According to one of the virus posts, using:
os.pullEvent = os.pullEventRaw
should block the ctrl commands, but you still need to test for the keydowns to accept typed input.

#17 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 06 August 2012 - 10:54 AM

View PostPharap, on 06 August 2012 - 10:38 AM, said:

View Postluanub, on 06 August 2012 - 07:39 AM, said:

But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
Hrm, that is where CraftOS differs from real world operating systems. It would be handy if you could override them. I did read somewhere on the forums here once someone who said a way to do it through editing code files, but then it wouldn't be much use with a server unless you are the one hosting it.
1: Don't double post
2: Real World Operating systems have a shutdown button.. On the computer. CTRL + S is like that button.
3: Boot Disks works, but you need to be a server owner.

#18 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 11:02 AM

View PostNoodle, on 06 August 2012 - 10:54 AM, said:

View PostPharap, on 06 August 2012 - 10:38 AM, said:

View Postluanub, on 06 August 2012 - 07:39 AM, said:

But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
Hrm, that is where CraftOS differs from real world operating systems. It would be handy if you could override them. I did read somewhere on the forums here once someone who said a way to do it through editing code files, but then it wouldn't be much use with a server unless you are the one hosting it.
1: Don't double post
2: Real World Operating systems have a shutdown button.. On the computer. CTRL + S is like that button.
3: Boot Disks works, but you need to be a server owner.
I know what it's intended for, but then again real computers actually have a power source which the button cuts out.
That last one made little sense.

#19 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 06 August 2012 - 11:05 AM

Yes, but Minecraft doesn't have power sources. Its simulating the power.

#20 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 11:15 AM

View PostNoodle, on 06 August 2012 - 11:05 AM, said:

Yes, but Minecraft doesn't have power sources. Its simulating the power.
Exactly, hence, the comparison to real computers is a difficult one.
If we are going to use real computer comparisons, both startup scripts should fire, with the computer's coming first.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users