Minecraft automatic server connect

Use this board to post your code snippets - tips and tricks
8 posts Page 1 of 1
Contributors
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

Hello

This is a quick snip how to make minecraft automatically join a server. Note that this code works only if you have legally bought minecraft. You need 2 textboxes and 1 button. The first textbox should be username, second should be password. You need to have minecraft.exe located on the desktop for this to work!!! Now for the code:
Code: Select all
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\minecraft.exe", TextBox1.Text & " " & TextBox2.Text & " " & "YourServer.ip" & " ")
I have made a fully functional example, called MCServers. Basically it lets you choose a server from the list or you can type another server. Right after the app will launch minecraft and close itself, minecraft will do all clicks for you until your connected to the server :D If you have a cracked copy, minecraft will tell you that you failed to log in and this code will be useless in that case. You also wont be able to join any of the servers listed as they are all premium only.

I hope you enjoy this little snip :P
Capture.PNG
MCServers.zip
You do not have the required permissions to view the files attached to this post.
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Nice snip! You could also use a socket to check if the server is on and launch minecraft when it successfully makes a connection.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

MrAksel wrote:
Nice snip! You could also use a socket to check if the server is on and launch minecraft when it successfully makes a connection.
Thanks :D And i don't know anything about socket stuff :S
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Cool stuff :D also i keep looking at ur theme what is it called :D
Image
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

Martin wrote:
Cool stuff :D also i keep looking at ur theme what is it called :D
Thanks :D The theme is called Iohanna edited: http://shafck.deviantart.com/art/Iohann ... -153242412
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Cool stuff :D Great job!
User avatar
AquuL
Just Registered
Just Registered
Posts: 8
Joined: Tue Aug 09, 2011 6:16 pm

Good job Vik.
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

I'm glad you like it guys. I'm gonna post some new tuts soon :D
8 posts Page 1 of 1
Return to “Quick Snips”