TacticalDeux / circuit-watcher

Auto-accept League of Legends queue (any)
MIT License
3 stars 0 forks source link

Does not support Chinese clients #1

Closed WZHER closed 1 year ago

WZHER commented 1 year ago

Your small software is very simple, I like it very much, but it is a pity that it does not support Chinese clients. (Google Translate)

TacticalDeux commented 1 year ago

Huh that's weird, unless you mean it doesn't support Chinese character (which at the moment I'm not planning to implement), in theory it should support any client since all the program really does is POST and GET requests to the LCU api endpoints. Could you check if this program works for you and if it does can you send me the value you get from doing a get request to lol-gameflow-session inside a lobby on your league client? https://github.com/HextechDocs/lcu-explorer/releases. The response should look something like:

{
  "gameClient": {
    "observerServerIp": "string",
    "observerServerPort": 0,
    "running": true,
    "serverIp": "string",
    "serverPort": 0,
    "visible": true
  },
  "gameData": {
    "gameId": 0,
    "gameName": "string",
    "isCustomGame": true,
    "password": "string",
    "playerChampionSelections": [
      {
        "additionalProp1": {}
      }
    ],
    "queue": {
      "allowablePremadeSizes": [
        0
      ],
      "areFreeChampionsAllowed": true,
      "assetMutator": "string",
      "category": "None",
      "championsRequiredToPlay": 0,
      "description": "string",
      "detailedDescription": "string",
      "gameMode": "string",
      "gameTypeConfig": {
        "advancedLearningQuests": true,
        "allowTrades": true,
        "banMode": "string",
        "banTimerDuration": 0,
        "battleBoost": true,
        "crossTeamChampionPool": true,
        "deathMatch": true,
        "doNotRemove": true,
        "duplicatePick": true,
        "exclusivePick": true,
        "id": 0,
        "learningQuests": true,
        "mainPickTimerDuration": 0,
        "maxAllowableBans": 0,
        "name": "string",
        "onboardCoopBeginner": true,
        "pickMode": "string",
        "postPickTimerDuration": 0,
        "reroll": true,
        "teamChampionPool": true
      },
      "id": 0,
      "isRanked": true,
      "isTeamBuilderManaged": true,
      "isTeamOnly": true,
      "lastToggledOffTime": 0,
      "lastToggledOnTime": 0,
      "mapId": 0,
      "maxLevel": 0,
      "maxSummonerLevelForFirstWinOfTheDay": 0,
      "maximumParticipantListSize": 0,
      "minLevel": 0,
      "minimumParticipantListSize": 0,
      "name": "string",
      "numPlayersPerTeam": 0,
      "queueAvailability": "Available",
      "queueRewards": {
        "isChampionPointsEnabled": true,
        "isIpEnabled": true,
        "isXpEnabled": true,
        "partySizeIpRewards": [
          0
        ]
      },
      "removalFromGameAllowed": true,
      "removalFromGameDelayMinutes": 0,
      "shortName": "string",
      "showPositionSelector": true,
      "spectatorEnabled": true,
      "type": "string"
    },
    "spectatorsAllowed": true,
    "teamOne": [
      {
        "additionalProp1": {}
      }
    ],
    "teamTwo": [
      {
        "additionalProp1": {}
      }
    ]
  },
  "gameDodge": {
    "dodgeIds": [
      0
    ],
    "phase": "None",
    "state": "Invalid"
  },
  "map": {
    "assets": {
      "additionalProp1": {}
    },
    "categorizedContentBundles": {
      "additionalProp1": {}
    },
    "description": "string",
    "gameMode": "string",
    "gameModeName": "string",
    "gameModeShortName": "string",
    "gameMutator": "string",
    "id": 0,
    "isRGM": true,
    "mapStringId": "string",
    "name": "string",
    "perPositionDisallowedSummonerSpells": {
      "additionalProp1": {
        "spells": [
          0
        ]
      },
      "additionalProp2": {
        "spells": [
          0
        ]
      },
      "additionalProp3": {
        "spells": [
          0
        ]
      }
    },
    "perPositionRequiredSummonerSpells": {
      "additionalProp1": {
        "spells": [
          0
        ]
      },
      "additionalProp2": {
        "spells": [
          0
        ]
      },
      "additionalProp3": {
        "spells": [
          0
        ]
      }
    },
    "platformId": "string",
    "platformName": "string",
    "properties": {
      "additionalProp1": {}
    }
  },
  "phase": "None"
}

Step-by-step on how to get the GET request value: image image image image image

WZHER commented 1 year ago

Thank you, I didn't expect you to reply me. It is reasonable to say that the Chinese client also supports API, because there are many software similar to querying records in the Chinese market (I don't like them because they will charge or have too many functions). But I don't know why your software can't run correctly, the following is my picture according to your operation (maybe there is something wrong with my operation, I'm a novice). I used to use python to auto-accept games based on image recognition, but it was so dumb, I ditched it XD.Don't have to spend too much energy here, hope it doesn't bother you.

{ "gameClient": { "observerServerIp": "string", "observerServerPort": 0, "running": true, "serverIp": "string", "serverPort": 0, "visible": true }, "gameData": { "gameId": 0, "gameName": "string", "isCustomGame": true, "password": "string", "playerChampionSelections": [ { "additionalProp1": {} } ], "queue": { "allowablePremadeSizes": [ 0 ], "areFreeChampionsAllowed": true, "assetMutator": "string", "category": "None", "championsRequiredToPlay": 0, "description": "string", "detailedDescription": "string", "gameMode": "string", "gameTypeConfig": { "advancedLearningQuests": true, "allowTrades": true, "banMode": "string", "banTimerDuration": 0, "battleBoost": true, "crossTeamChampionPool": true, "deathMatch": true, "doNotRemove": true, "duplicatePick": true, "exclusivePick": true, "id": 0, "learningQuests": true, "mainPickTimerDuration": 0, "maxAllowableBans": 0, "name": "string", "onboardCoopBeginner": true, "pickMode": "string", "postPickTimerDuration": 0, "reroll": true, "teamChampionPool": true }, "id": 0, "isRanked": true, "isTeamBuilderManaged": true, "isTeamOnly": true, "lastToggledOffTime": 0, "lastToggledOnTime": 0, "mapId": 0, "maxLevel": 0, "maxSummonerLevelForFirstWinOfTheDay": 0, "maximumParticipantListSize": 0, "minLevel": 0, "minimumParticipantListSize": 0, "name": "string", "numPlayersPerTeam": 0, "queueAvailability": "Available", "queueRewards": { "isChampionPointsEnabled": true, "isIpEnabled": true, "isXpEnabled": true, "partySizeIpRewards": [ 0 ] }, "removalFromGameAllowed": true, "removalFromGameDelayMinutes": 0, "shortName": "string", "showPositionSelector": true, "spectatorEnabled": true, "type": "string" }, "spectatorsAllowed": true, "teamOne": [ { "additionalProp1": {} } ], "teamTwo": [ { "additionalProp1": {} } ] }, "gameDodge": { "dodgeIds": [ 0 ], "phase": "None", "state": "Invalid" }, "map": { "assets": { "additionalProp1": {} }, "categorizedContentBundles": { "additionalProp1": {} }, "description": "string", "gameMode": "string", "gameModeName": "string", "gameModeShortName": "string", "gameMutator": "string", "id": 0, "isRGM": true, "mapStringId": "string", "name": "string", "perPositionDisallowedSummonerSpells": { "additionalProp1": { "spells": [ 0 ] }, "additionalProp2": { "spells": [ 0 ] }, "additionalProp3": { "spells": [ 0 ] } }, "perPositionRequiredSummonerSpells": { "additionalProp1": { "spells": [ 0 ] }, "additionalProp2": { "spells": [ 0 ] }, "additionalProp3": { "spells": [ 0 ] } }, "platformId": "string", "platformName": "string", "properties": { "additionalProp1": {} } }, "phase": "None" } client session session_all software

TacticalDeux commented 1 year ago

It seems that it's not about it not being able to do the requests but just straight up not connecting to the League Client, and the LCU explorer application doesn't seem to be connecting to your client either. If I had to guess it's either the data that needs to be extracted to make this requests is encode in variables named in Chinese (which I doubt but could be) or the LeagueClient process is in named in Chinese (which I also doubt), the only real option would be for you to go and check the contents of your lockfile, you can do that by going to your Riot Games installation folder (usually at C:\Riot Games) go into the League of Legends folder and check the file named "lockfile", it should have 5 values each separated by a colon like this LeagueClient:12345:54321:password:https, is the first value (LeagueClient) still in English? if so, are the folders (riot games and league of legend) in English? if everything is as it normally would on non-Chinese clients then I don't really know what's the problem, and if you ever find a solution or a different way to get the LeagueClient's port and auth token for Chinese clients I can try and implement it into my program and make a separate Chinese supporting release.

WZHER commented 1 year ago

As you said, the software is not connected to the client. I know why. I searched for information today (https://github.com/XHXIAIEIN/LeagueCustomLobby) and found that the official Chinese version has changed the way of lockfile, and it is currently impossible to find the key with the previous method. Now it needs to be found by reading the process data. Just like the picture, so you can get the port and auth token anyway. Enter "wmic PROCESS WHERE name='LeagueClientUx.exe' GET commandline" at the command prompt to get the JSON file, and then you can get the port and authentication token. Thank you, I use the website to directly enter https://127.0.0.1:, and found that the account name is riot Snipaste_2023-07-20_21-41-36 Snipaste_2023-07-20_21-41-54 Snipaste_2023-07-20_21-42-03 QQ截图20230720215938

TacticalDeux commented 1 year ago

Okay so WMIC method does work which is really good. I'm going to try and fix this for next release, seems easy enough so I should be able to get it done by today or maybe tomorrow.

TacticalDeux commented 1 year ago

Should be fixed on the latest release