|
You last visited: Today at 05:14
Advertisement
League of Legends Sandbox
Discussion on League of Legends Sandbox within the League of Legends Hacks, Bots, Cheats & Exploits forum part of the League of Legends category.
07/06/2014, 19:26
|
#241
|
elite*gold: 1
Join Date: Oct 2012
Posts: 840
Received Thanks: 339
|
Quote:
Originally Posted by noobasaurus
Yeah, I'm currently making one. I'm probably going to transfer over all of the stuff that the batch does into the launcher. Right now you set your name, champion, and then it asks you if you want to connect to the local server. If you say yes then it connects to 127.0.0.1 and if you say no then it will ask you for the IP of a different one.
And about the team...well, later. After I get this working.
|
Would you mind sharing the .bat file & your source, I hope I'll be able to learn from that! I'm pretty sure you'll help a lot of us out with that
|
|
|
07/06/2014, 19:30
|
#242
|
elite*gold: 0
Join Date: May 2012
Posts: 281
Received Thanks: 42
|
why all packet is named "PKT_" ??
|
|
|
07/06/2014, 19:32
|
#243
|
elite*gold: 4
Join Date: Jun 2010
Posts: 282
Received Thanks: 45
|
Quote:
Originally Posted by Joever11
Would you mind sharing the .bat file & your source, I hope I'll be able to learn from that! I'm pretty sure you'll help a lot of us out with that
|
Look my Signature its the latest source that is found on e*pvpers.
The repository inculed 2-4 .bat files to start the client.
Im trying to let this IntWars repository up to date. Chat and SkillUP is fixed too
|
|
|
07/06/2014, 19:32
|
#244
|
elite*gold: 1
Join Date: Oct 2012
Posts: 840
Received Thanks: 339
|
Quote:
Originally Posted by Rayfi
why all packet is named "PKT_" ??
|
I guess it's just a prefix for each packet. To describe it is a packet and not something else, it gives more structure to the code.
Quote:
Originally Posted by roflxd:-)
Look my Signature its the latest source that is found on e*pvpers.
The repository inculed 2-4 .bat files to start the client.
Im trying to let this IntWars repository up to date. Chat is fixed too
|
I'm looking for the source & bat from noobasaurus. As only with that one I'll be able to create a fully working client. Thanks anyways, I'll check it out.
|
|
|
07/06/2014, 19:34
|
#245
|
elite*gold: 0
Join Date: May 2010
Posts: 150
Received Thanks: 16
|
PKT = PacKeT
|
|
|
07/06/2014, 19:36
|
#246
|
elite*gold: 0
Join Date: Jun 2014
Posts: 68
Received Thanks: 6
|
The bat that I have is the same as yours. What I'm doing is translating everything in the bat into C++ so that it can be a simple exe where you enter your information.
The source that I have for the project is the same but I can give you my current launcher source. It has some working functions but doesn't connect yet.
In fact, I'll just post the launcher source here since it's only one small thing.
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
string champ;
string yesno;
string yes = ("yes");
string no = ("no");
string IP;
cout << "Enter a name: ";
getline(cin, name); //stores the name here
cout << "Enter a champion: ";
getline(cin, champ); //stores the champ here
cout << "Connect to local server? ";
getline(cin, yesno);
if (yesno.compare(no) == 0) //sees if they said no
{
cout << "Please enter a server IP to connect: ";
getline(cin, IP);
cout << "Connecting to " << IP << "...\n"; //todo actually make it connect
}
else if (yesno.compare(yes) == 0) //sees if they said yes
{
cout << "Connecting to 127.0.0.1...\n"; //todo actually make it connect
}
//todo search for the lol files (aka launcher) and do all the stuff the .bat does
system("pause"); //just here so it doesn't close instantly, will be removed
return 0;
}
|
|
|
07/06/2014, 19:42
|
#247
|
elite*gold: 1
Join Date: Oct 2012
Posts: 840
Received Thanks: 339
|
Quote:
Originally Posted by noobasaurus
The bat that I have is the same as yours. What I'm doing is translating everything in the bat into C++ so that it can be a simple exe where you enter your information.
The source that I have for the project is the same but I can give you my current launcher source. It has some working functions but doesn't connect yet.
In fact, I'll just post the launcher source here since it's only one small thing.
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
string champ;
string yesno;
string yes = ("yes");
string no = ("no");
string IP;
cout << "Enter a name: ";
getline(cin, name); //stores the name here
cout << "Enter a champion: ";
getline(cin, champ); //stores the champ here
cout << "Connect to local server? ";
getline(cin, yesno);
if (yesno.compare(no) == 0) //sees if they said no
{
cout << "Please enter a server IP to connect: ";
getline(cin, IP);
cout << "Connecting to " << IP << "...\n"; //todo actually make it connect
}
else if (yesno.compare(yes) == 0) //sees if they said yes
{
cout << "Connecting to 127.0.0.1...\n"; //todo actually make it connect
}
//todo search for the lol files (aka launcher) and do all the stuff the .bat does
system("pause"); //just here so it doesn't close instantly, will be removed
return 0;
}
|
Okay, although I don't understand a lot from C++, I can see that you are able to choose your username and stuff... One thing I don't understand is, how do you make your server know which username & champion you want?
I can only see a messagebox that says it's connecting to your localhost, but I cannot find any line where it is communicating with the server and letting your server know which champion you are going to play?
I'm kinda confused at the moment. I think, creating a new .bat file, where youc an declare username, champion and skin will be the best working and easiest option, especially because you can make a launcher in any coding language you want then.
|
|
|
07/06/2014, 19:48
|
#248
|
elite*gold: 0
Join Date: Jun 2014
Posts: 68
Received Thanks: 6
|
If you could make a new batch file that does that, then go for it.
How it'll connect with the server will come soon. Basically this line will be translated into c++:
Code:
@start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "127.0.0.1 5119 17BLOhi6KZsTtldTsizvHg== 47917791 \Braum/"
As you can see, this line basically starts the game with the port 8394, then starts LoLLauncher (I don't know why) then connects the the IP and the port of the IP, and then declares the key. The server checks the key and if it's the same then the person can come on. What I did was put a champion name between symbols and was working on getting whatever string was between those two symbols. I haven't gotten it working quite yet.
See, here's how the server does it. It defines the key and then checks to see if the client's is the same:
Code:
#include "stdafx.h"
#include "NetworkListener.h"
#include "Log.h"
#define SERVER_HOST ENET_HOST_ANY
#define SERVER_PORT 5119
#define SERVER_KEY "17BLOhi6KZsTtldTsizvHg=="
#define SERVER_VERSION "0.0.2"
int main(int argc, char ** argv)
{
Logging->writeLine("IntWars %s\n",SERVER_VERSION);
NetworkListener *listener = new NetworkListener();
ENetAddress address;
address.host = SERVER_HOST;
address.port = SERVER_PORT;
listener->initialize(&address, SERVER_KEY);
Logging->writeLine("Starting net loop\n");
listener->netLoop();
delete listener;
Logging->writeLine("Goodbye\n");
}
Now it actually doesn't check the client's server key there, but you get the point. I need to make it so the MODEL variable is defined as whatever is between two symbols.
|
|
|
07/06/2014, 19:48
|
#249
|
elite*gold: 4
Join Date: Jun 2010
Posts: 282
Received Thanks: 45
|
Quote:
Originally Posted by Joever11
Okay, although I don't understand a lot from C++, I can see that you are able to choose your username and stuff... One thing I don't understand is, how do you make your server know which username & champion you want?
I can only see a messagebox that says it's connecting to your localhost, but I cannot find any line where it is communicating with the server and letting your server know which champion you are going to play?
I'm kinda confused at the moment. I think, creating a new .bat file, where youc an declare username, champion and skin will be the best working and easiest option, especially because you can make a launcher in any coding language you want then.
|
Gamed/NetworkListener.cpp
peerInfo(event.peer)->setName("Riot MrPixel");
peerInfo(event.peer)->setType("Anivia");
peerInfo(event.peer)->skinNo = 3;
peerInfo(event.peer)->netId = GetNewNetID();
|
|
|
07/06/2014, 19:58
|
#250
|
elite*gold: 1
Join Date: Oct 2012
Posts: 840
Received Thanks: 339
|
Quote:
Originally Posted by noobasaurus
If you could make a new batch file that does that, then go for it.
How it'll connect with the server will come soon. Basically this line will be translated into c++:
Code:
@start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "127.0.0.1 5119 17BLOhi6KZsTtldTsizvHg== 47917791 \Braum/"
As you can see, this line basically starts the game with the port 8394, then starts LoLLauncher (I don't know why) then connects the the IP and the port of the IP, and then declares the key. The server checks the key and if it's the same then the person can come on. What I did was put a champion name between symbols and was working on getting whatever string was between those two symbols. I haven't gotten it working quite yet.
See, here's how the server does it. It defines the key and then checks to see if the client's is the same:
Code:
#include "stdafx.h"
#include "NetworkListener.h"
#include "Log.h"
#define SERVER_HOST ENET_HOST_ANY
#define SERVER_PORT 5119
#define SERVER_KEY "17BLOhi6KZsTtldTsizvHg=="
#define SERVER_VERSION "0.0.2"
int main(int argc, char ** argv)
{
Logging->writeLine("IntWars %s\n",SERVER_VERSION);
NetworkListener *listener = new NetworkListener();
ENetAddress address;
address.host = SERVER_HOST;
address.port = SERVER_PORT;
listener->initialize(&address, SERVER_KEY);
Logging->writeLine("Starting net loop\n");
listener->netLoop();
delete listener;
Logging->writeLine("Goodbye\n");
}
Now it actually doesn't check the client's server key there, but you get the point. I need to make it so the MODEL variable is defined as whatever is between two symbols.
|
Quote:
Originally Posted by roflxd:-)
Gamed/NetworkListener.cpp
peerInfo(event.peer)->setName("Riot MrPixel");
peerInfo(event.peer)->setType("Anivia");
peerInfo(event.peer)->skinNo = 3;
peerInfo(event.peer)->netId = GetNewNetID();
|
@Noobasaurus, how will this code look in your server?:
peerInfo(event.peer)->setName("Riot MrPixel");
peerInfo(event.peer)->setType("Braum");
peerInfo(event.peer)->skinNo = 1;
peerInfo(event.peer)->netId = GetNewNetID();
Because when you declare the champion (in this case Braum), the .bat will need to let the server know which champion you are using, and it should not need to be declared in the server itself anymore as the champion name. I'm really looking forward if you can make that .bat work so we can choose our champion in the bat!
|
|
|
07/06/2014, 19:59
|
#251
|
elite*gold: 0
Join Date: May 2010
Posts: 150
Received Thanks: 16
|
Uhm,I made up a quick .bat file that asks for user,champion and IP. Thought it may would be useful:
@echo off
set Output="C:\"
set /P id=Enter username: %=%
set /P ch=Enter champion: %=%
set /P ip=Enter IP: %=%
echo id = %id% >> %Output%\options.txt
echo ch = %ch% >> %Output%\options.txt
echo ip = %ip% >> %Output%\options.txt
pause
*Saves a file called "options.txt" in C:\ ,you can change that directory on "set Output="your directory"
|
|
|
07/06/2014, 20:09
|
#252
|
elite*gold: 4
Join Date: Jun 2010
Posts: 282
Received Thanks: 45
|
Hmm, still dont got any idea what
CM 8(8) CHANNEL 2(2)
08 00 00 00 00 CD CC CC 3E CD CC CC 3E
and
CMD 56(86) CHANNEL 1(1)
56 19 00 00 40 00 00 00 00 00 00 00 00 2B 82 97
C1
could be
|
|
|
07/06/2014, 20:19
|
#253
|
elite*gold: 0
Join Date: May 2010
Posts: 150
Received Thanks: 16
|
Uhm I think I've got what you guys wanted. I'll add the .bat code I did (2 posts above) to the gamed.exe,so it first asks you for username,champion and IP,then it starts the server on the desired IP,with the desired username and champion.
|
|
|
07/06/2014, 20:21
|
#254
|
elite*gold: 1
Join Date: Oct 2012
Posts: 840
Received Thanks: 339
|
Quote:
Originally Posted by ismailman123
Uhm I think I've got what you guys wanted. I'll add the .bat code I did (2 posts above) to the gamed.exe,so it first asks you for username,champion and IP,then it starts the server on the desired IP,with the desired username and champion.
|
Thats exactly what I am looking for! Would be great if you can share this with me and all the others!
|
|
|
07/06/2014, 20:21
|
#255
|
elite*gold: 0
Join Date: Jun 2014
Posts: 68
Received Thanks: 6
|
Quote:
Originally Posted by ismailman123
Uhm,I made up a quick .bat file that asks for user,champion and IP. Thought it may would be useful:
@echo off
set Output="C:\"
set /P id=Enter username: %=%
set /P ch=Enter champion: %=%
set /P ip=Enter IP: %=%
echo id = %id% >> %Output%\options.txt
echo ch = %ch% >> %Output%\options.txt
echo ip = %ip% >> %Output%\options.txt
pause
*Saves a file called "options.txt" in C:\ ,you can change that directory on "set Output="your directory"
|
That's really useful. Now I just need to make it so it reads that which should be much easier than editing the bat.
|
|
|
All times are GMT +2. The time now is 05:14.
|
|