diff --git a/CONNECT TO LAN.bat b/CONNECT TO LAN.bat
new file mode 100644
index 00000000..adf83941
--- /dev/null
+++ b/CONNECT TO LAN.bat
@@ -0,0 +1,136 @@
+@echo off
+setlocal enabledelayedexpansion
+echo -----------------------
+echo IntWars Solo Launcher
+echo -----------------------
+set RADS_PATH=
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKLM\Software\Wow6432Node\Riot Games\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKLM\Software\Wow6432Node\Riot Games\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKLM\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKLM\Software /V /F "LocalRootFolder" /S /E ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+echo ===================
+echo Finding another LoL directory path..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKLM\Software /s ^| %systemroot%\system32\find.exe "LocalRootFolder" ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+echo ===================
+echo Finding another LoL directory path..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKCU\Software /V /F "LocalRootFolder" /S /E ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+echo ===================
+echo Finding another LoL directory path again..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKCU\Software /s ^| %systemroot%\system32\find.exe "LocalRootFolder" ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+goto cannotFind
+:runApp
+set RADS_PATH=%RADS_PATH:/=\%
+@cd /d "%RADS_PATH%\solutions\lol_game_client_sln\releases"
+
+set init=0
+set v0=0&set v1=0&set v2=0&set v3=0
+for /f "delims=" %%F in ('dir * /b ^| findstr ^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$') do (
+ for /F "tokens=1,2,3,4 delims=." %%i in ("%%F") do (
+ if !init! equ 0 ( set init=1&set flag=1 ) else (
+ set flag=0
+
+ if %%i gtr !v0! ( set flag=1 ) else (
+ if %%j gtr !v1! ( set flag=1 ) else (
+ if %%k gtr !v2! ( set flag=1 ) else (
+ if %%l gtr !v3! ( set flag=1 )
+ )
+ )
+ )
+ )
+
+ if !flag! gtr 0 (
+ set v0=%%i&set v1=%%j&set v2=%%k&set v3=%%l
+ )
+ )
+)
+
+if !init! equ 0 goto cannotFind
+set lolver=!v0!.!v1!.!v2!.!v3!
+
+@cd /d "!RADS_PATH!\solutions\lol_game_client_sln\releases\!lolver!\deploy"
+if exist "League of Legends.exe" (
+ @start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "127.0.0.1 5119 17BLOhi6KZsTtldTsizvHg== 47917791"
+ goto exit
+)
+:cannotFind
+echo ===================
+echo Cannot find LoL path automatically :(
+echo ===================
+@pause
+goto exit
+:exit
diff --git a/bin/VC120_Debug/error.txt b/bin/VC120_Debug/error.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/bin/VC120_Debug/output.txt b/bin/VC120_Debug/output.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/common.h b/common.h
index cbb1fe87..96a46f7c 100644
--- a/common.h
+++ b/common.h
@@ -20,73 +20,77 @@ along with this program. If not, see .
enum GameCmd : uint8
{
- PKT_S2C_MoveAns = 0x60,
+PKT_S2C_MoveAns = 0x61,
};
//Currently attuned to Live 4.5.0.264
enum PacketCmd : uint8
-{ //Channel //Type
- PKT_KeyCheck = 0x00, //0 //UPDATED
-
- PKT_S2C_EndSpawn = 0x11, //? //UPDATED
- PKT_C2S_QueryStatusReq = 0x14, //1 //UPDATED
- PKT_S2C_SkillUp = 0x15, //3 //UPDATED
- PKT_C2S_Ping_Load_Info = 0x16, //1 //UPDATED
-
- PKT_S2C_ViewAns = 0x2B, //3 //UPDATED
- PKT_C2S_ViewReq = 0x2D, //1 //UPDATED
-
- PKT_C2S_SkillUp = 0x38, //1 //UPDATED
- PKT_S2C_AttentionPing = 0x3F, //3 //UPDATED
-
- PKT_S2C_Emotion = 0x41, //3 UPDATED
- PKT_C2S_Emotion = 0x47, //1 UPDATED
- PKT_S2C_HeroSpawn = 0x4B, //3 UPDATED
- PKT_S2C_Announce = 0x4C, //3
-
- PKT_S2C_GameTimer = 0xC0,
- PKT_S2C_GameTimerUpdate = 0xC1,
-
- PKT_C2S_StartGame = 0x51, //1 //UPDATED
- PKT_S2C_SynchVersion = 0x53, //3 //UPDATED
- PKT_C2S_ScoreBord = 0x55, //1 //UPDATED
- PKT_C2S_AttentionPing = 0x56, //1 //UPDATED
- PKT_S2C_StartGame = 0x5B, //? //UPDATED
-
- PKT_S2C_StartSpawn = 0x61, //? //UPDATED
- //PKT_C2S_OpenShop = 0x63, //1 - DEPRECATED
- PKT_C2S_ClientReady = 0x64, //6 //UPDATED ?
- PKT_S2C_LoadHero = 0x65, //6 //UPDATED
- PKT_S2C_LoadName = 0x66, //6 //UPDATED
- PKT_S2C_LoadScreenInfo = 0x67, //6 //UPDATED
- PKT_ChatBoxMessage = 0x68, //5 //UPDATED
- PKT_S2C_BuyItemAns = 0x6E, //3 //UPDATED
-
- PKT_C2S_MoveReq = 0x71, //1 //UPDATED
- PKT_C2S_MoveConfirm = 0x76, //1 //UPDATED
-
- PKT_C2S_LockCamera = 0x80, //1 //UPDATED
- PKT_C2S_BuyItemReq = 0x81, //1 //UPDATED
- PKT_S2C_QueryStatusAns = 0x87, //? //UPDATED
- PKT_C2S_Exit = 0x8E, //1 //UPDATED
-
- PKT_World_SendGameNumber = 0x91, //3 //UPDATED
- PKT_S2C_Ping_Load_Info = 0x94, //4 //UPDATED
- PKT_S2C_TurretSpawn = 0x9C, //3 UPDATED
-
- PKT_C2S_Surrender = 0xA3, //1 //UPDATED
- //PKT_C2S_GameNumberReq = 0xA6, //1 //DEPRECATED
- PKT_C2S_StatsConfirm = 0xA7, //1 UPDATED
- PKT_C2S_Click = 0xAE, //1 //UPDATED
-
- PKT_C2S_SynchVersion = 0xBC, //1 //UPDATED
- PKT_C2S_CharLoaded = 0xBD, //1 //UPDATED
-
- PKT_S2C_CharStats = 0xC3, //4 //UPDATED
- PKT_S2C_FogUpdate2 = 0x23, //3 //UPDATED?
- PKT_S2C_LevelPropSpawn = 0xCF, //3 UPDATED
-
- PKT_Batch = 0xFF, //3
+{ //Channel //Type
+PKT_KeyCheck = 0x00, //0 //UPDATED
+PKT_C2S_ClientConnect_NamedPipe = 0x01,
+
+PKT_S2C_EndSpawn = 0x11, //? //UPDATED
+PKT_C2S_QueryStatusReq = 0x14, //1 //UPDATED
+PKT_S2C_SkillUp = 0x16, //3 //UPDATED
+PKT_C2S_Ping_Load_Info = 0x16, //1 //UPDATED
+
+PKT_S2C_ViewAns = 0x2C, //3 //UPDATED
+PKT_C2S_ViewReq = 0x2E, //1 //UPDATED
+
+PKT_C2S_SkillUp = 0x39, //1 //UPDATED
+PKT_S2C_AttentionPing = 0x3F, //3 //UPDATED
+
+PKT_S2C_Emotion = 0x42, //3 UPDATED
+PKT_C2S_Emotion = 0x48, //1 UPDATED
+PKT_S2C_HeroSpawn = 0x4C, //3 UPDATED
+PKT_S2C_Announce = 0x4D, //3
+
+PKT_S2C_GameTimer = 0xC0,
+PKT_S2C_GameTimerUpdate = 0xC1,
+
+PKT_C2S_StartGame = 0x52, //1 //UPDATED
+PKT_S2C_SynchVersion = 0x54, //3 //UPDATED
+PKT_C2S_ScoreBord = 0x56, //1 //UPDATED
+PKT_C2S_AttentionPing = 0x57, //1 //UPDATED
+PKT_S2C_StartGame = 0x5C, //? //UPDATED
+
+PKT_S2C_StartSpawn = 0x62, //? //UPDATED
+//PKT_C2S_OpenShop = 0x63, //1 - DEPRECATED
+PKT_C2S_ClientReady = 0x64, //6 //UPDATED ?
+PKT_S2C_LoadHero = 0x65, //6 //UPDATED
+PKT_S2C_LoadName = 0x66, //6 //UPDATED
+PKT_S2C_LoadScreenInfo = 0x67, //6 //UPDATED
+PKT_ChatBoxMessage = 0x68, //5 //UPDATED
+PKT_S2C_BuyItemAns = 0x6F, //3 //UPDATED
+
+PKT_C2S_MoveReq = 0x72, //1 //UPDATED
+PKT_C2S_MoveConfirm = 0x77, //1 //UPDATED
+
+PKT_C2S_LockCamera = 0x81, //1 //UPDATED
+PKT_C2S_BuyItemReq = 0x82, //1 //UPDATED
+PKT_S2C_QueryStatusAns = 0x88, //? //UPDATED
+PKT_C2S_Exit = 0x8F, //1 //UPDATED
+
+PKT_World_SendGameNumber = 0x92, //3 //UPDATED
+PKT_S2C_Ping_Load_Info = 0x95, //4 //UPDATED
+PKT_S2C_UpdateModel = 0x97,
+PKT_S2C_TurretSpawn = 0x9D, //3 UPDATED
+
+PKT_C2S_Surrender = 0xA4, //1 //UPDATED
+//PKT_C2S_GameNumberReq = 0xA6, //1 //DEPRECATED
+PKT_C2S_StatsConfirm = 0xA8, //1 UPDATED
+PKT_S2C_HeroSpawnUnk3 = 0xAE,
+PKT_C2S_Click = 0xAF, //1 //UPDATED
+
+PKT_S2C_HeroSpawnUnk2 = 0xBA,
+PKT_C2S_SynchVersion = 0xBD, //1 //UPDATED
+PKT_C2S_CharLoaded = 0xBE, //1 //UPDATED
+
+PKT_S2C_CharStats = 0xC4, //4 //UPDATED
+PKT_S2C_FogUpdate2 = 0x23, //3 //UPDATED?
+PKT_S2C_LevelPropSpawn = 0xD0, //3 UPDATED
+
+PKT_Batch = 0xFF, //3
};
enum MoveType : uint8
diff --git a/gamed/Client.h b/gamed/Client.h
index 2aae0eaa..de4453de 100644
--- a/gamed/Client.h
+++ b/gamed/Client.h
@@ -27,7 +27,7 @@ struct ClientInfo
keyChecked = false;
name = type = NULL;
ticks = 0;
- skinNo = 0;
+ skinNo = 1;
}
~ClientInfo()
diff --git a/gamed/Handlers.cpp b/gamed/Handlers.cpp
index 9630bf3f..0bab8e2a 100644
--- a/gamed/Handlers.cpp
+++ b/gamed/Handlers.cpp
@@ -18,6 +18,17 @@ along with this program. If not, see .
#include "stdafx.h"
#include "PacketHandler.h"
#include "NetworkListener.h"
+#include
+#include
+
+int log(int argc, char* argv[])
+{
+ using namespace std;
+ freopen("output.txt", "w", stdout);
+ freopen("error.txt", "w", stderr);
+ return true;
+
+}
bool PacketHandler::handleNull(HANDLE_ARGS) {
return true;
@@ -37,8 +48,9 @@ bool PacketHandler::handleKeyCheck(ENetPeer *peer, ENetPacket *packet) {
PDEBUG_LOG_LINE(Logging," Enc id: %s\n", buffer);*/
if(userId == keyCheck->userId) {
PDEBUG_LOG_LINE(Logging, " User got the same key as i do, go on!\n");
- peerInfo(peer)->keyChecked = true;
- peerInfo(peer)->userId = userId;
+ peerInfo(peer)->keyChecked = true;
+ peerInfo(peer)->userId = userId;
+ peerInfo(peer)->userId = userId;
} else {
Logging->errorLine(" WRONG KEY, GTFO!!!\n");
return false;
@@ -54,7 +66,7 @@ bool PacketHandler::handleKeyCheck(ENetPeer *peer, ENetPacket *packet) {
bool PacketHandler::handleGameNumber(ENetPeer *peer, ENetPacket *packet) {
WorldSendGameNumber world;
world.gameId = 1;
- strcpy((char *)world.data1, "EUW1");
+ strcpy((char *)world.data1, "NA1");
memcpy(world.data, peerInfo(peer)->name, peerInfo(peer)->nameLen);
return sendPacket(peer, reinterpret_cast(&world), sizeof(WorldSendGameNumber), CHL_S2C);
}
@@ -63,10 +75,10 @@ bool PacketHandler::handleSynch(ENetPeer *peer, ENetPacket *packet) {
SynchVersion *version = reinterpret_cast(packet->data);
Logging->writeLine("Client version: %s\n", version->version);
SynchVersionAns answer;
- answer.mapId = 1;
+ answer.mapId = 1;
answer.players[0].userId = peerInfo(peer)->userId;
- answer.players[0].skill1 = SPL_Ignite;
- answer.players[0].skill2 = SPL_Flash;
+ answer.players[0].skill1 = SPL_Teleport;
+ answer.players[0].skill2 = SPL_Flash;
return sendPacket(peer, reinterpret_cast(&answer), sizeof(SynchVersionAns), 3);
}
@@ -78,9 +90,30 @@ bool PacketHandler::handleMap(ENetPeer *peer, ENetPacket *packet) {
playerHero->skinId = peerInfo(peer)->skinNo;
//Builds team info
LoadScreenInfo screenInfo;
- screenInfo.bluePlayerNo = 1;
- screenInfo.redPlayerNo = 0;
- screenInfo.bluePlayerIds[0] = peerInfo(peer)->userId;
+ screenInfo.bluePlayerNo = 10;
+ screenInfo.redPlayerNo = 10;
+ int z = 0;
+ int blueid = 0;
+ int redid = 0;
+ if (z%2 == 0)
+ {
+ screenInfo.bluePlayerIds[blueid] = peerInfo(peer)->userId;
+ printf("New blue player connected, team ID is %i\n", blueid);
+ z = z++;
+ blueid = blueid++;
+ }
+ if (z % 2 != 0)
+ {
+ if (z > 0)
+ {
+ screenInfo.redPlayerIds[redid] = peerInfo(peer)->userId;
+ printf("New red player connected, team ID is %i\n", redid);
+ z = z++;
+ redid = redid++;
+ }
+ }
+ screenInfo.redPlayerIds[0] = peerInfo(peer)->userId;
+ printf("Info: %i\n", peerInfo(peer)->userId);
bool pInfo = sendPacket(peer, reinterpret_cast(&screenInfo), sizeof(LoadScreenInfo), CHL_LOADING_SCREEN);
//For all players send this info
bool pName = sendPacket(peer, reinterpret_cast(playerName), playerName->getPacketLength(), CHL_LOADING_SCREEN);
@@ -96,9 +129,9 @@ bool PacketHandler::handleSpawn(ENetPeer *peer, ENetPacket *packet) {
StatePacket2 start(PKT_S2C_StartSpawn);
bool p1 = sendPacket(peer, reinterpret_cast(&start), sizeof(StatePacket2), CHL_S2C);
printf("Spawning map\r\n");
- HeroSpawn spawn;
+ HeroSpawn spawn;
spawn.netId = peerInfo(peer)->netId;
- spawn.gameId = 0;
+ spawn.gameId = 0; // 0
memcpy(spawn.name, peerInfo(peer)->name, peerInfo(peer)->nameLen);
memcpy(spawn.type, peerInfo(peer)->type, peerInfo(peer)->typeLen);
bool p2 = sendPacket(peer, reinterpret_cast(&spawn), sizeof(HeroSpawn), CHL_S2C);
@@ -142,6 +175,7 @@ bool PacketHandler::handleSpawn(ENetPeer *peer, ENetPacket *packet) {
sendPacket(peer, reinterpret_cast(&turretSpawn), sizeof(TurretSpawn), CHL_S2C);
}
//Spawn Props
+
LevelPropSpawn lpSpawn;
lpSpawn.SetProp("LevelProp_Yonkey", "Yonkey");
lpSpawn.header.netId = 0;
@@ -160,18 +194,17 @@ bool PacketHandler::handleSpawn(ENetPeer *peer, ENetPacket *packet) {
lpSpawn.netId = GetNewNetID();
lpSpawn.x = 13374;
lpSpawn.y = 194;
- sendPacket(peer, reinterpret_cast(&lpSpawn), sizeof(LevelPropSpawn), CHL_S2C);
- lpSpawn.SetProp("LevelProp_ShopMale1", "ShopMale");
- lpSpawn.header.netId = 0;
- lpSpawn.netId = GetNewNetID();
- lpSpawn.x = -99;
- lpSpawn.y = 191;
- sendPacket(peer, reinterpret_cast(&lpSpawn), sizeof(LevelPropSpawn), CHL_S2C);
+ sendPacket(peer, reinterpret_cast(&lpSpawn), sizeof(LevelPropSpawn), CHL_S2C);
+ lpSpawn.SetProp("LevelProp_ShopMale1", "ShopMale");
+ lpSpawn.header.netId = 0;
+ lpSpawn.netId = GetNewNetID();
+ lpSpawn.x = -99;
+ lpSpawn.y = 191;
StatePacket end(PKT_S2C_EndSpawn);
bool p3 = sendPacket(peer, reinterpret_cast(&end), sizeof(StatePacket), CHL_S2C);
BuyItemAns recall;
recall.header.netId = peerInfo(peer)->netId;
- recall.itemId = 2001;
+ recall.itemId = 2001; //2001
recall.slotId = 7;
recall.stack = 1;
bool p4 = sendPacket(peer, reinterpret_cast(&recall), sizeof(BuyItemAns), CHL_S2C); //activate recall slot
@@ -182,10 +215,16 @@ bool PacketHandler::handleSpawn(ENetPeer *peer, ENetPacket *packet) {
GameTimerUpdate timer3(0.4); //0xC1
sendPacket(peer, reinterpret_cast(&timer3), sizeof(GameTimerUpdate), CHL_S2C);
//lvl 1 R for elise
- for(int i = 0; i < 4; i++) {
- SpellSet spell(peerInfo(peer)->netId, i, 1);
- sendPacket(peer, reinterpret_cast(&spell), sizeof(SpellSet), CHL_S2C);
- }
+// for(int i = 0; i < 4; i++) {
+ int i;
+ i = 1;
+ if (i > 0)
+ {
+ i = i++;
+ SpellSet spell(peerInfo(peer)->netId, 1, 1);
+ sendPacket(peer, reinterpret_cast(&spell), sizeof(SpellSet), CHL_S2C);
+ }
+// }
return p1 & p2 & p3;
}
@@ -199,13 +238,13 @@ bool PacketHandler::handleStartGame(HANDLE_ARGS) {
test.unk1 = 2;
//uint8 p[] = {0xC5, 0x19, 0x00, 0x00, 0x40, 0x00, 0x00, 0x50};
//sendPacket(peer, reinterpret_cast(p), sizeof(p), 3);
- sendPacket(peer, reinterpret_cast(&test), sizeof(FogUpdate2), 3);
+// sendPacket(peer, reinterpret_cast(&test), sizeof(FogUpdate2), 3);
//playing around 8-)
- /*
- CharacterStats movement;
- movement.netId = peerInfo(peer)->netId;
- movement.statType = STI_Movement;
- movement.statValue = 800;
+ /*
+ CharacterStats movement;
+ CharacterStats *stats = CharacterStats::create(STI_Movement, 0, 0, 0, 0);
+ stats->netId = peerInfo(peer)->netId;
+ stats->setValue(1, STI_Movement, 800);
sendPacket(peer,reinterpret_cast(&movement),sizeof(movement), 4);*/
return true;
}
@@ -276,19 +315,40 @@ std::vector readWaypoints(byte *buffer, int coordCount) {
bool PacketHandler::handleMove(ENetPeer *peer, ENetPacket *packet) {
MovementReq *request = reinterpret_cast(packet->data);
+ std::vector vMoves = readWaypoints(&request->moveData, request->vectorNo);
switch(request->type) {
//TODO, Implement stop commands
- case STOP:
- Logging->writeLine("Move stop\n");
- return true;
+ case STOP:
+ {
+ MovementAns *answer = MovementAns::create(request->vectorNo);
+ answer->ok = 1;
+ answer->vectorNo = request->vectorNo;
+ answer->netId = peerInfo(peer)->netId;
+
+ float x = ((request->x) - MAP_WIDTH) / 2;
+
+ float y = ((request->y) - MAP_HEIGHT) / 2;
+
+ for (int i = 0; i < vMoves.size(); i++){
+ answer->getVector(i)->x = x;
+ answer->getVector(i)->y = y;
+
+ }
+
+
+ bool bRet = broadcastPacket(reinterpret_cast(answer), answer->size(), 4);
+ MovementAns::destroy(answer);
+ return bRet;
+ }
case EMOTE:
Logging->writeLine("Emotion\n");
return true;
}
- std::vector vMoves = readWaypoints(&request->moveData, request->vectorNo);
Logging->writeLine("Move to(normal): x:%f, y:%f, type: %i, vectorNo: %i\n", request->x, request->y, request->type, vMoves.size());
for(int i = 0; i < vMoves.size(); i++)
- { printf(" Vector %i, x: %f, y: %f\n", i, 2.0 * vMoves[i].x + MAP_WIDTH, 2.0 * vMoves[i].y + MAP_HEIGHT); }
+ {
+ printf(" Vector %i, x: %f, y: %f\n", i, 2.0 * vMoves[i].x + MAP_WIDTH, 2.0 * vMoves[i].y + MAP_HEIGHT);
+ }
MovementAns *answer = MovementAns::create(request->vectorNo);
answer->ok = 1;
answer->vectorNo = request->vectorNo;
@@ -324,128 +384,131 @@ bool PacketHandler::handleQueryStatus(HANDLE_ARGS) {
}
bool PacketHandler::handleChatBoxMessage(HANDLE_ARGS) {
- ChatMessage *message = reinterpret_cast(packet->data);
- //Lets do commands
- if(message->msg == '.') {
- const char *cmd[] = { ".set", ".gold", ".speed", ".health", ".xp", ".ap", ".ad", ".mana", ".model", ".help" };
- //Set field
- if(strncmp(message->getMessage(), cmd[0], strlen(cmd[0])) == 0) {
- uint32 blockNo = atoi(&message->getMessage()[strlen(cmd[0]) + 1]);
- uint32 fieldNo = atoi(&message->getMessage()[strlen(cmd[0]) + 3]);
- float value = (float)atoi(&message->getMessage()[strlen(cmd[0]) + 5]);
- uint32 mask = 1 << abs(((int)fieldNo - 1));
- CharacterStats *stats = CharacterStats::create(blockNo, mask);
- stats->netId = peerInfo(peer)->netId;
- stats->setValue(blockNo, mask, value);
- Logging->writeLine("Setting to %f in block: %i, field: %i\n", value, blockNo, fieldNo);
- sendPacket(peer, reinterpret_cast(stats), stats->getSize(), CHL_LOW_PRIORITY, 2);
- stats->destroy();
- return true;
- }
- // Set Gold
- if(strncmp(message->getMessage(), cmd[1], strlen(cmd[1])) == 0) {
- float gold = (float)atoi(&message->getMessage()[strlen(cmd[1]) + 1]);
- CharacterStats *stats = CharacterStats::create(FM1_Gold, 0, 0, 0, 0);
- stats->netId = peerInfo(peer)->netId;
- stats->setValue(1, FM1_Gold, gold);
- Logging->writeLine("Set gold to %f\n", gold);
- sendPacket(peer, reinterpret_cast(stats), stats->getSize(), CHL_LOW_PRIORITY, 2);
- stats->destroy();
- return true;
- }
- /*
-
- //movement
- if(strncmp(message->getMessage(), cmd[2], strlen(cmd[2])) == 0)
- {
- float data = (float)atoi(&message->getMessage()[strlen(cmd[2])+1]);
-
- charStats.statType = STI_Movement;
- charStats.statValue = data;
- Logging->writeLine("set champ speed to %f\n", data);
- sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
- return true;
- }
- //health
- if(strncmp(message->getMessage(), cmd[3], strlen(cmd[3])) == 0)
- {
- float data = (float)atoi(&message->getMessage()[strlen(cmd[3])+1]);
-
- charStats.statType = STI_Health;
- charStats.statValue = data;
- Logging->writeLine("set champ health to %f\n", data);
- sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
- return true;
- }
- //experience
- if(strncmp(message->getMessage(), cmd[4], strlen(cmd[4])) == 0)
- {
- float data = (float)atoi(&message->getMessage()[strlen(cmd[4])+1]);
-
- charStats.statType = STI_Exp;
- charStats.statValue = data;
- Logging->writeLine("set champ exp to %f\n", data);
- sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
- return true;
- }
- //AbilityPower
- if(strncmp(message->getMessage(), cmd[5], strlen(cmd[5])) == 0)
- {
- float data = (float)atoi(&message->getMessage()[strlen(cmd[5])+1]);
-
- charStats.statType = STI_AbilityPower;
- charStats.statValue = data;
- Logging->writeLine("set champ abilityPower to %f\n", data);
- sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
- return true;
- }
- //Attack damage
- if(strncmp(message->getMessage(), cmd[6], strlen(cmd[6])) == 0)
- {
- float data = (float)atoi(&message->getMessage()[strlen(cmd[6])+1]);
-
- charStats.statType = STI_AttackDamage;
- charStats.statValue = data;
- Logging->writeLine("set champ attack damage to %f\n", data);
- sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
- return true;
- }
- //Mana
- if(strncmp(message->getMessage(), cmd[7], strlen(cmd[7])) == 0)
- {
- float data = (float)atoi(&message->getMessage()[strlen(cmd[7])+1]);
-
- charStats.statType = STI_Mana;
- charStats.statValue = data;
- Logging->writeLine("set champ mana to %f\n", data);
- sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
- return true;
- }
- */
- //Model
- if(strncmp(message->getMessage(), cmd[8], strlen(cmd[8])) == 0) {
- std::string sModel = (char *)&message->getMessage()[strlen(cmd[8]) + 1];
- UpdateModel modelPacket(peerInfo(peer)->netId, (char *)sModel.c_str()); //96
- broadcastPacket(reinterpret_cast(&modelPacket), sizeof(UpdateModel), CHL_S2C);
- return true;
- }
- }
- switch(message->type) {
- case CMT_ALL:
- return broadcastPacket(packet->data, packet->dataLength, CHL_COMMUNICATION);
- break;
- case CMT_TEAM:
- //!TODO make a team class and foreach player in the team send the message
- return sendPacket(peer, packet->data, packet->dataLength, CHL_COMMUNICATION);
- break;
- default:
- Logging->errorLine("Unknown ChatMessageType\n");
- return sendPacket(peer, packet->data, packet->dataLength, CHL_COMMUNICATION);
- break;
- }
- return false;
-}
+ ChatMessage *message = reinterpret_cast(packet->data);
+ //Lets do commands
+
+ if (message->msg == '.') {
+ const char *cmd[] = { ".set", ".gold", ".speed", ".health", ".xp", ".ap", ".ad", ".mana", ".model", ".help" };
+ //Set field
+
+ if (strncmp(message->getMessage(), cmd[0], strlen(cmd[0])) == 0) {
+ uint32 blockNo = atoi(&message->getMessage()[strlen(cmd[0]) + 1]);
+ uint32 fieldNo = atoi(&message->getMessage()[strlen(cmd[0]) + 3]);
+ float value = (float)atoi(&message->getMessage()[strlen(cmd[0]) + 5]);
+ uint32 mask = 1 << abs(((int)fieldNo - 1));
+ CharacterStats *stats = CharacterStats::create(blockNo, mask);
+ stats->netId = peerInfo(peer)->netId;
+ stats->setValue(blockNo, mask, value);
+ Logging->writeLine("Setting to %f in block: %i, field: %i\n", value, blockNo, fieldNo);
+ sendPacket(peer, reinterpret_cast(stats), stats->getSize(), CHL_LOW_PRIORITY, 2);
+ stats->destroy();
+ return true;
+ }
+ // Set Gold
+ if (strncmp(message->getMessage(), cmd[1], strlen(cmd[1])) == 0) {
+ float gold = (float)atoi(&message->getMessage()[strlen(cmd[1]) + 1]);
+ CharacterStats *stats = CharacterStats::create(FM1_Gold, 0, 0, 0, 0);
+ stats->netId = peerInfo(peer)->netId;
+ stats->setValue(1, FM1_Gold, gold);
+ Logging->writeLine("Set gold to %f\n", gold);
+ sendPacket(peer, reinterpret_cast(stats), stats->getSize(), CHL_LOW_PRIORITY, 2);
+ stats->destroy();
+ return true;
+ }
+ /*
+ //movement
+ if(strncmp(message->getMessage(), cmd[2], strlen(cmd[2])) == 0)
+ {
+ float data = (float)atoi(&message->getMessage()[strlen(cmd[2])+1]);
+
+ CharacterStats.statType = STI_Movement;
+ CharacterStats.statValue = data;
+ Logging->writeLine("set champ speed to %f\n", data);
+ sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
+ return true;
+ }
+
+ //health
+ if(strncmp(message->getMessage(), cmd[3], strlen(cmd[3])) == 0)
+ {
+ float data = (float)atoi(&message->getMessage()[strlen(cmd[3])+1]);
+
+ CharacterStats.statType = STI_Health;
+ CharacterStats.statValue = data;
+ Logging->writeLine("set champ health to %f\n", data);
+ sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
+ return true;
+ }
+ //experience
+ if(strncmp(message->getMessage(), cmd[4], strlen(cmd[4])) == 0)
+ {
+ float data = (float)atoi(&message->getMessage()[strlen(cmd[4])+1]);
+
+ CharacterStats.statType = STI_Exp;
+ CharacterStats.statValue = data;
+ Logging->writeLine("set champ exp to %f\n", data);
+ sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
+ return true;
+ }
+
+ //AbilityPower
+ if(strncmp(message->getMessage(), cmd[5], strlen(cmd[5])) == 0)
+ {
+ float data = (float)atoi(&message->getMessage()[strlen(cmd[5])+1]);
+
+ charStats.statType = STI_AbilityPower;
+ charStats.statValue = data;
+ Logging->writeLine("set champ abilityPower to %f\n", data);
+ sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
+ return true;
+ }
+ //Attack damage
+ if(strncmp(message->getMessage(), cmd[6], strlen(cmd[6])) == 0)
+ {
+ float data = (float)atoi(&message->getMessage()[strlen(cmd[6])+1]);
+
+ charStats.statType = STI_AttackDamage;
+ charStats.statValue = data;
+ Logging->writeLine("set champ attack damage to %f\n", data);
+ sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
+ return true;
+ }
+ //Mana
+ if(strncmp(message->getMessage(), cmd[7], strlen(cmd[7])) == 0)
+ {
+ float data = (float)atoi(&message->getMessage()[strlen(cmd[7])+1]);
+
+ charStats.statType = STI_Mana;
+ charStats.statValue = data;
+ Logging->writeLine("set champ mana to %f\n", data);
+ sendPacket(peer,reinterpret_cast(&charStats),sizeof(charStats), CHL_LOW_PRIORITY, 2);
+ return true;
+ }
+ */
+ //Model
+ if (strncmp(message->getMessage(), cmd[8], strlen(cmd[8])) == 0) {
+ std::string sModel = (char *)&message->getMessage()[strlen(cmd[8]) + 1];
+ UpdateModel modelPacket(peerInfo(peer)->netId, (char *)sModel.c_str()); //96
+ broadcastPacket(reinterpret_cast(&modelPacket), sizeof(UpdateModel), CHL_S2C);
+ return true;
+ }
+ }
+ switch (message->type) {
+ case CMT_ALL:
+ return broadcastPacket(packet->data, packet->dataLength, CHL_COMMUNICATION);
+ break;
+ case CMT_TEAM:
+ //!TODO make a team class and foreach player in the team send the message
+ return sendPacket(peer, packet->data, packet->dataLength, CHL_COMMUNICATION);
+ break;
+ default:
+ Logging->errorLine("Unknown ChatMessageType\n");
+ return sendPacket(peer, packet->data, packet->dataLength, CHL_COMMUNICATION);
+ break;
+ }
+ return false;
+}
bool PacketHandler::handleSkillUp(HANDLE_ARGS) {
SkillUpPacket *skillUpPacket = reinterpret_cast(packet->data);
//!TODO Check if can up skill? :)
@@ -473,19 +536,19 @@ bool PacketHandler::handleEmotion(HANDLE_ARGS) {
switch(emotion->id) {
case 0:
//dance
- Logging->writeLine("dance");
+ Logging->writeLine("dance\n");
break;
case 1:
//taunt
- Logging->writeLine("taunt");
+ Logging->writeLine("taunt\n");
break;
case 2:
//laugh
- Logging->writeLine("laugh");
+ Logging->writeLine("laugh\n");
break;
case 3:
//joke
- Logging->writeLine("joke");
+ Logging->writeLine("joke\n");
break;
}
EmotionResponse response;
diff --git a/gamed/NetworkListener.cpp b/gamed/NetworkListener.cpp
index 418bfd30..5381cd33 100644
--- a/gamed/NetworkListener.cpp
+++ b/gamed/NetworkListener.cpp
@@ -18,6 +18,9 @@ along with this program. If not, see .
#include "stdafx.h"
#include "NetworkListener.h"
#include "Log.h"
+#include
+#define NAME "%id%"
+#define CHAMP "%ch%"
uint32 GetNewNetID() {
static DWORD dwStart = 0x40000019;
@@ -63,40 +66,38 @@ void NetworkListener::netLoop()
{
ENetEvent event;
- while(enet_host_service(_server, & event, 10) >= 0 && _isAlive)
+ while (enet_host_service(_server, &event, 10) >= 0 && _isAlive)
{
switch (event.type)
{
- case ENET_EVENT_TYPE_CONNECT:
- Logging->writeLine("A new client connected: %i.%i.%i.%i:%i \n", event.peer->address.host & 0xFF, (event.peer->address.host >> 8) & 0xFF, (event.peer->address.host >> 16) & 0xFF, (event.peer->address.host >> 24) & 0xFF, event.peer->address.port);
-
- /* Set some defaults */
- event.peer->mtu = PEER_MTU;
-
- event.peer->data = new ClientInfo();
- peerInfo(event.peer)->setName("Test");
- peerInfo(event.peer)->setType("Teemo");
- peerInfo(event.peer)->skinNo = 6;
- peerInfo(event.peer)->netId = GetNewNetID();
-
+ case ENET_EVENT_TYPE_CONNECT:
+
+ Logging->writeLine("A new client connected: %i.%i.%i.%i:%i \n", event.peer->address.host & 0xFF, (event.peer->address.host >> 8) & 0xFF, (event.peer->address.host >> 16) & 0xFF, (event.peer->address.host >> 24) & 0xFF, event.peer->address.port);
+ /* Set some defaults */
+ event.peer->mtu = PEER_MTU;
+ event.peer->data = new ClientInfo();
+ peerInfo(event.peer)->setName("coolman");
+ peerInfo(event.peer)->setType("Braum");
+ peerInfo(event.peer)->skinNo = 0;
+ peerInfo(event.peer)->netId = GetNewNetID();
break;
case ENET_EVENT_TYPE_RECEIVE:
- if(!_handler->handlePacket(event.peer, event.packet,event.channelID))
+ if (!_handler->handlePacket(event.peer, event.packet, event.channelID))
{
//enet_peer_disconnect(event.peer, 0);
}
/* Clean up the packet now that we're done using it. */
- enet_packet_destroy (event.packet);
- break;
+ enet_packet_destroy(event.packet);
+ break;
case ENET_EVENT_TYPE_DISCONNECT:
Logging->writeLine("Client disconnected: %i.%i.%i.%i:%i \n", event.peer->address.host & 0xFF, (event.peer->address.host >> 8) & 0xFF, (event.peer->address.host >> 16) & 0xFF, (event.peer->address.host >> 24) & 0xFF, event.peer->address.port);
/* Cleanup */
delete (ClientInfo*)event.peer->data;
- break;
+ break;
}
}
}
\ No newline at end of file
diff --git a/gamed/Packets.h b/gamed/Packets.h
index c770db8d..05dd47a6 100644
--- a/gamed/Packets.h
+++ b/gamed/Packets.h
@@ -81,8 +81,8 @@ typedef struct _SynchVersionAns {
_SynchVersionAns() {
header.cmd = PKT_S2C_SynchVersion;
ok = ok2 = 1;
- memcpy(version, "Version 4.5.0.264 [PUBLIC]", 27);
- memcpy(gameMode, "CLASSIC", 8);
+ memcpy(version, "SANDBOX WOO", 27);
+ memcpy(gameMode, "COOLMAN", 8); //8
memset(zero, 0, 2232);
end1 = 0xE2E0;
end2 = 0xA0;
@@ -91,11 +91,11 @@ typedef struct _SynchVersionAns {
PacketHeader header;
uint8 ok;
uint32 mapId;
- SynchBlock players[12];
+ SynchBlock players[20];
uint8 version[27]; //Ending zero so size 26+0x00
uint8 ok2; //1
uint8 unknown[228]; //Really strange shit
- uint8 gameMode[8];
+ uint8 gameMode[1]; // 8
uint8 zero[2232];
uint16 end1; //0xE2E0
uint8 end2; //0xA0 || 0x08
@@ -117,16 +117,16 @@ typedef struct _LoadScreenInfo {
//Zero this complete buffer
memset(this, 0, sizeof(_LoadScreenInfo));
cmd = PKT_S2C_LoadScreenInfo;
- blueMax = redMax = 6;
+ blueMax = redMax = 10;
}
uint8 cmd;
uint32 blueMax;
uint32 redMax;
- uint64 bluePlayerIds[6]; //Team 1, 6 players max
- uint8 blueData[144];
- uint64 redPlayersIds[6]; //Team 2, 6 players max
- uint8 redData[144];
+ uint64 bluePlayerIds[10]; //Team 1, 10 players max
+ uint8 blueData[400];
+ uint64 redPlayerIds[10]; //Team 2, 10 players max
+ uint8 redData[400];
uint32 bluePlayerNo;
uint32 redPlayerNo;
} LoadScreenInfo;
@@ -141,8 +141,8 @@ typedef struct _LoadScreenPlayer {
_LoadScreenPlayer *packet = (_LoadScreenPlayer *)buf;
packet->cmd = cmd;
packet->length = size;
- packet->userId = 0;
- packet->skinId = 0;
+ packet->userId = 1;
+ packet->skinId = 0;
memcpy(packet->getDescription(), str, packet->length);
return packet;
}
@@ -488,7 +488,7 @@ struct ChatMessage {
typedef struct _UpdateModel {
_UpdateModel(DWORD netID, const char *szModel) {
ZeroMemory(this, sizeof(_UpdateModel));
- header.cmd = (PacketCmd)0x96;
+ header.cmd = (PacketCmd)0x97;
header.netId = netID;
id = netID & ~0x40000000;
bOk = 1;
@@ -548,7 +548,7 @@ struct HeroSpawn {
} ;
struct HeroSpawn2 {
HeroSpawn2() {
- header.cmd = (PacketCmd)0xB9;
+ header.cmd = (PacketCmd)0xBA;
ZeroMemory(unk, 30);
unk[15] = 0x80;
unk[16] = 0x3F;
@@ -571,10 +571,10 @@ struct HeroSpawn2 {
};
struct HeroSpawn3 {
HeroSpawn3() {
- header.cmd = (PacketCmd)0xAD;
+ header.cmd = (PacketCmd)0xAE;
unk = 0;
- health = 1337;
- maxHealth = 666;
+ health = 1000;
+ maxHealth = 1000;
}
PacketHeader header;
@@ -671,9 +671,9 @@ typedef struct _SkillUpPacket {
typedef struct _SkillUpResponse {
_SkillUpResponse() {
header.cmd = PKT_S2C_SkillUp;
- skill = 0;
- level = 0;
- pointsLeft = 0;
+ skill = 1;
+ level = 1;
+ pointsLeft = 1;
}
PacketHeader header;
uint8 skill;
diff --git a/gamed/main.cpp b/gamed/main.cpp
index 20058463..fc9844c2 100644
--- a/gamed/main.cpp
+++ b/gamed/main.cpp
@@ -4,7 +4,7 @@ Copyright (C) 2012 Intline9
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 3 of the License, orlth
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/local.bat b/local.bat
index adf83941..17f615db 100644
--- a/local.bat
+++ b/local.bat
@@ -1,4 +1,9 @@
@echo off
+set /P id=Enter username: %=%
+set /P ch=Enter champion: %=%
+set /P ip=Enter IP: %=%
+
+pause
setlocal enabledelayedexpansion
echo -----------------------
echo IntWars Solo Launcher
@@ -124,7 +129,7 @@ set lolver=!v0!.!v1!.!v2!.!v3!
@cd /d "!RADS_PATH!\solutions\lol_game_client_sln\releases\!lolver!\deploy"
if exist "League of Legends.exe" (
- @start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "127.0.0.1 5119 17BLOhi6KZsTtldTsizvHg== 47917791"
+ @start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "%ip% 5119 17BLOhi6KZsTtldTsizvHg== 47917791"
goto exit
)
:cannotFind
diff --git a/localz.bat b/localz.bat
new file mode 100644
index 00000000..0dee6e14
--- /dev/null
+++ b/localz.bat
@@ -0,0 +1,137 @@
+@echo off
+
+setlocal enabledelayedexpansion
+echo -----------------------
+echo IntWars Solo Launcher
+echo -----------------------
+set RADS_PATH=
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKLM\Software\Wow6432Node\Riot Games\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKLM\Software\Wow6432Node\Riot Games\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKCU\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+FOR /f "usebackq skip=2 tokens=3,4,5,6,7,8,9" %%i in (`%systemroot%\system32\REG.EXE QUERY "HKLM\SOFTWARE\RIOT GAMES\RADS" /v "LOCALROOTFOLDER"`) DO (
+ SET RADS_PATH=%%i %%j %%k %%l %%m %%n %%o
+ goto runApp
+)
+cls
+echo ===================
+echo Finding other LoL directory path..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKLM\Software /V /F "LocalRootFolder" /S /E ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+echo ===================
+echo Finding another LoL directory path..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKLM\Software /s ^| %systemroot%\system32\find.exe "LocalRootFolder" ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+echo ===================
+echo Finding another LoL directory path..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKCU\Software /V /F "LocalRootFolder" /S /E ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+echo ===================
+echo Finding another LoL directory path again..
+echo ===================
+for /f "Tokens=3,4,5,6,7,8,9,10,11,12,13,14,15" %%a in ('%systemroot%\system32\REG.EXE Query HKCU\Software /s ^| %systemroot%\system32\find.exe "LocalRootFolder" ^| %systemroot%\system32\find.exe "RADS"') do (
+ set RADS_PATH=%%a %%b %%c %%d %%e %%f %%g %%h %%i %%j %%k %%l %%m
+ goto runApp
+)
+cls
+goto cannotFind
+:runApp
+set RADS_PATH=%RADS_PATH:/=\%
+@cd /d "%RADS_PATH%\solutions\lol_game_client_sln\releases"
+
+set init=0
+set v0=0&set v1=0&set v2=0&set v3=0
+for /f "delims=" %%F in ('dir * /b ^| findstr ^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$') do (
+ for /F "tokens=1,2,3,4 delims=." %%i in ("%%F") do (
+ if !init! equ 0 ( set init=1&set flag=1 ) else (
+ set flag=0
+
+ if %%i gtr !v0! ( set flag=1 ) else (
+ if %%j gtr !v1! ( set flag=1 ) else (
+ if %%k gtr !v2! ( set flag=1 ) else (
+ if %%l gtr !v3! ( set flag=1 )
+ )
+ )
+ )
+ )
+
+ if !flag! gtr 0 (
+ set v0=%%i&set v1=%%j&set v2=%%k&set v3=%%l
+ )
+ )
+)
+
+if !init! equ 0 goto cannotFind
+set lolver=!v0!.!v1!.!v2!.!v3!
+
+@cd /d "!RADS_PATH!\solutions\lol_game_client_sln\releases\!lolver!\deploy"
+if exist "League of Legends.exe" (
+ @start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "127.0.0.1 5119 17BLOhi6KZsTtldTsizvHg== 47917791"
+ goto exit
+)
+:cannotFind
+echo ===================
+echo Cannot find LoL path automatically :(
+echo ===================
+@pause
+goto exit
+:exit
diff --git a/win/VC100/enet-1.2.5.vcxproj b/win/VC100/enet-1.2.5.vcxproj
index 57507616..82c75e9d 100644
--- a/win/VC100/enet-1.2.5.vcxproj
+++ b/win/VC100/enet-1.2.5.vcxproj
@@ -1,5 +1,5 @@
-
+
Debug
@@ -19,10 +19,12 @@
StaticLibrary
Unicode
+ v120
StaticLibrary
Unicode
+ v120
diff --git a/win/VC100/gamed.vcxproj b/win/VC100/gamed.vcxproj
index 971f8623..3e433fec 100644
--- a/win/VC100/gamed.vcxproj
+++ b/win/VC100/gamed.vcxproj
@@ -1,5 +1,5 @@
-
+
Debug
@@ -19,10 +19,12 @@
Application
Unicode
+ v120
Application
Unicode
+ v120
diff --git a/win/VC100/intlib.vcxproj b/win/VC100/intlib.vcxproj
index 4bef66d9..27a2d44a 100644
--- a/win/VC100/intlib.vcxproj
+++ b/win/VC100/intlib.vcxproj
@@ -1,5 +1,5 @@
-
+
Debug
@@ -19,10 +19,12 @@
StaticLibrary
Unicode
+ v120
StaticLibrary
Unicode
+ v120