Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Guides & Templates
You last visited: Today at 03:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++ How To] Make your own auto-login creator.

Discussion on [C++ How To] Make your own auto-login creator. within the Metin2 Guides & Templates forum part of the Metin2 category.

Reply
 
Old   #1
 
CantShutMyMouth's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 379
Received Thanks: 163
[C++ How To] Make your own auto-login creator.

Tired and bored to search on ePvP or anywhere else the logininfo.py file,to make your metin2 automaticaly login you?

If not,then don't waste your time. But maybe you want to learn some C++ BASICS

This is a step by step,easy to read and understand tutorial. It is for people who just started to learn C++ ,i think :-s



It is a basic program,with no GUI.

Let's Start!



1.First,we need our python code. Here you can find it:


Now,we have our code. I would copy it into a notepad and let it opened-up,cause we will need to use it many times.

2.Lets start up your C++ IDE. I like to use,for those basics programs, MinGW / Code::Blocks . You can use any. Now,start a new project file,with a c++ source file.you'd better make your proj file on a folder on desktop,so you will find your porgram easy.

3. Let's start the coding. First, we will need to include 2 libraries:
Code:
#include<iostream>
#include<fstream>
After that, you need to text these lines:
Code:
using namespace std;
int main()
4. Now we will start to write our code:
First,let's tell the program to create our file... ( it will be an empty file!)
Code:
fstream f("logininfo.py",ios::out);
Now you will find a "logininfo.py" in your program folder!



After this,we will need to define some variables and some characters:
Code:
int n,c,s,a,b,a2;
char pass[50],id[50];
You will see why!

5.Now,if you look at our code,we have something like
Code:
serverNum=
or
Code:
id=
and so on. We defined those variables to read them ,and then,write them inside the .py file...
Code:
cout<<"username=";
cin>>id;
Now,in the console,we have a line " username = " and then we can add a text,actually the "id" char

And so on:
Code:
        cout<<"password=";
	cin>>pass;
	cout<<"Server number=";
	cin>>n;
	cout<<"Channel=";
	cin>>c;
	cout<<"Character slot=";
	cin>>s;
	cout<<"If you want to be logged in automatically, tipe 1. Else, type 0 ";
	cin>>a;
	cout<<"If you want your character to be autoselected,type 1. Else, type 0";
	cin>>a2;

6.Now,the user has just entered all his data to create the .py .... now,let's enter them in the .py file....

The first code line was: fstream f()
now,we will use the "f" to read or write in our file.
to write something,actually the firrst line,we will type:
Code:
f<<"import serverInfo"<<endl;
endl = End Line . This will end the text line,just like you would hit the "enter" button


And,so on!
Code:
f<<"import serverInfo"<<endl;
	f<<"serverNum = "<<n<<endl;
	f<<"serverChannel = "<<c<<endl;
	f<<"id = "<<id<<endl;
	f<<"pwd = "<<pass<<endl;
	f<<"Slot = "<<s<<endl;
	f<<"autoLogin = "<<a<<endl;
	f<<"autoSelect = "<<a2<<endl;
	f<<"addr = serverInfo.REGION_DICT [0] [serverNum] ["channel"] [serverChannel] ["ip"]"<<endl;
	f<<"port = serverInfo.REGION_DICT [0] [serverNum] ["channel"] [serverChannel] ["tcp_port"]"<<endl;
	f<<"account_addr = serverInfo.REGION_AUTH_SERVER_DICT [0] [serverNum] ["ip"]"<<endl;
	f<<"account_port = serverInfo.REGION_AUTH_SERVER_DICT [0] [serverNum] ["port"]"<<endl;


But if you will compile it,you will see something is wrong.Actually,the mistake is here:
Code:
["channel"]
from the
Code:
f<<"addr = serverInfo.REGION_DICT [0] [serverNum] ["channel"] [serverChannel] ["ip"]"<<endl;
Actually,the first quote from the ["channel"] end the f<< ....
To write it with quotes,we will ned to add some " / "...
Like here:
Code:
[\"channel\"]
So our code will actually be:
Code:
f<<"import serverInfo"<<endl;
	f<<"serverNum = "<<n<<endl;
	f<<"serverChannel = "<<c<<endl;
	f<<"id = "<<"\""<<id<<"\""<<endl;
	f<<"pwd = "<<"\""<<pass<<"\""<<endl;
	f<<"Slot = "<<s<<endl;
	f<<"autoLogin = "<<a<<endl;
	f<<"autoSelect = "<<a2<<endl;
	f<<"addr = serverInfo.REGION_DICT [0] [serverNum] [\"channel\"] [serverChannel] [\"ip\"]"<<endl;
	f<<"port = serverInfo.REGION_DICT [0] [serverNum] [\"channel\"] [serverChannel] [\"tcp_port\"]"<<endl;
	f<<"account_addr = serverInfo.REGION_AUTH_SERVER_DICT [0] [serverNum] [\"ip\"]"<<endl;
	f<<"account_port = serverInfo.REGION_AUTH_SERVER_DICT [0] [serverNum] [\"port\"]"<<endl;

7. Now,let's just close the file:

Code:
f.close();
return 0;




Here is our final code:





8.After this,your compiled program will look like:





You can download it from here:




I really hope i helped you !
CantShutMyMouth is offline  
Thanks
7 Users
Old 01/18/2013, 15:09   #2
 
elite*gold: 0
Join Date: Mar 2012
Posts: 112
Received Thanks: 56
Nice one !

Gratz
EliteNMC is offline  
Old 01/18/2013, 15:40   #3

 
.QaDusch's Avatar
 
elite*gold: 206
The Black Market: 528/0/0
Join Date: Aug 2009
Posts: 9,154
Received Thanks: 1,156
Dürfte jedoch bei verschlüsselten Clients nicht möglich sein.
Ansonsten ganz nett.
.QaDusch is offline  
Old 01/18/2013, 19:06   #4
 
Seriouz :3's Avatar
 
elite*gold: 1
Join Date: Jun 2008
Posts: 731
Received Thanks: 224
You should remove the final code, so at least some users read this post.
good work, btw
Seriouz :3 is offline  
Old 01/18/2013, 20:36   #5
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
ernsthaft? warum muss das gute c++ für sonen **** verschwendet werden?
Tyrar is offline  
Thanks
2 Users
Old 01/18/2013, 20:45   #6
 
CantShutMyMouth's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 379
Received Thanks: 163
Whoo, is just a simple tutorial. I'm not a "Heavy Hacker",as you surely are. Go and rob some banks or something. And maybe learn some english :-s
CantShutMyMouth is offline  
Thanks
2 Users
Old 01/19/2013, 17:56   #7
 
marykillsjane's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 1,909
Received Thanks: 522
Quote:
Originally Posted by HeavyHacker View Post
ernsthaft? warum muss das gute c++ für sonen **** verschwendet werden?
Warum nicht?
Sowas ist doch ganz gut für Leute welche die Sprache neu lernen ,und sich mit dem Lesen /schreiben aus/in Dateien zu beschäftigen . Kann man doch machen jeder fängt mal klein an / und nicht jeder hat die lust jeden Tag Stunden lang zu lernen die Menschen sind halt unterschiedlich.
Ob man dafür nun ein Tutorial aufmacht is dann jedem selbst überlassen ,den thx zu Urteilen hat es aber doch schon ein paar geholfen also können doch alle glücklich und zufrieden sein
marykillsjane is offline  
Thanks
2 Users
Old 01/23/2013, 23:09   #8
 
elite*gold: 0
Join Date: Dec 2011
Posts: 11
Received Thanks: 0
Nice one
caparezzo is offline  
Reply


Similar Threads Similar Threads
[RELEASE] Auto-login Creator
11/20/2015 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 139 Replies
About M² Login Bot That software helps you to auto-login when you'll get kicked by lag or something else. This application works for GameForge and every P-Server. http://www.youtube.com/watch?v=jfvRYUd179g https://www.virustotal.com/static/img/logo-small. png "Jiangmin - Trojan/Generic.pklp", what the hell it's that antivirus? I've scanned it with Avast and Norton Internet Security and nothing found, and, a 'noob' antivirus see it as a virus?
Wie Speichert man die Login daten und macht nen Auto Login
07/15/2010 - Metin2 Private Server - 5 Replies
Souh ma wieder ne "Blöde Frage"... wie speichert man die login daten und macht nen autologin für den client wie es hier gemacht worden ist: http://www.elitepvpers.com/forum/metin2-pserver-dis cussions-questions/616285-my-new-client.html Über ne antwort würde ich mich freuen...
How can i make IG walker auto login
06/01/2008 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 0 Replies
Im playing a C6 interlude server and i am using ig walker. Because the server occasionally restarts i need to make an auto relog option that logs after some time. I saw the options that the walker has but if someone has succeeded that please let me know. Thanks.



All times are GMT +2. The time now is 03:42.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.