irpas技术客

英雄联盟 LCUAPI_葬歌倾城

irpas 3386

前言

编写这个文件主要目的是为了方便大家更快乐的游玩英雄联盟游戏!学习并记录下来帮助更多的朋友们!

软件中使用的API为官方开放的API 地址:Riot Developer Portal (riotgames.com)

使用方法 获取Toke和端口

打开CMD输入

wmic PROCESS WHERE name='LeagueClientUx.exe' GET commandline

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-uPf8ywAR-1658645139271)(C:\Users\Administrator\AppData\Roaming\marktext\images\2022-07-21-15-08-15-image.png)]

“–remoting-auth-token=0hRbS_joi-c9x5ru26c8vA” “–app-port=54900”

我们需要的就是这两句

token:0hRbS_joi-c9x5ru26c8vA

账号:riot

port:54900

LCU-API-测试 网址:https://lcu.vivide.re 获取当前客户端地址 GET 发送: https://127.0.0.1:55847/data-store/v1/install-dir 接收: "e:\\program files (x86)\\lol(26)\\LeagueClient" 获取角色全部信息 GET 发送:https://127.0.0.1:55847/lol-summoner/v1/current-summoner 接收: { "accountId": 4105042909, "displayName": "XXXXXX", "internalName": "XXXXXX", "nameChangeFlag": false, "percentCompleteForNextLevel": 5, "privacy": "PUBLIC", "profileIconId": 7, "puuid": "99fdf73c-9cf3-5674-b7e2-abfb1087bf53", "rerollPoints": { ? "currentPoints": 468, ? "maxRolls": 2, ? "numberOfRolls": 1, ? "pointsCostToRoll": 250, ? "pointsToReroll": 32 }, "summonerId": 4105042909, "summonerLevel": 81, "unnamed": false, "xpSinceLastLevel": 171, "xpUntilNextLevel": 2880 } 创建或切换匹配模式 POST 发送:https://127.0.0.1:55847/lol-lobby/v2/lobby 数据:{"queueId":430 } 接收: {"canStartActivity":true,"chatRoomId":"2470930d-41da-42b9-9924-f281592fb563","chatRoomKey":"2470930d-41da-42b9-9924-f281592fb563","gameConfig":{"allowablePremadeSizes":[1,2,3,4,5],"customLobbyName":"Custom Lobby","customMutatorName":"","customRewardsDisabledReasons":[],"customSpectatorPolicy":"NotAllowed","customSpectators":[],"customTeam100":[],"customTeam200":[],"gameMode":"CLASSIC","isCustom":false,"isLobbyFull":false,"isTeamBuilderManaged":false,"mapId":11,"maxHumanPlayers":0,"maxLobbySize":5,"maxTeamSize":5,"pickType":"","premadeSizeAllowed":true,"queueId":430,"showPositionSelector":false},"invitations":[{"invitationId":"","invitationType":"invalid","state":"Accepted","timestamp":"0","toSummonerId":4105042909,"toSummonerName":"执念偏执狂666"}],"localMember":{"allowedChangeActivity":true,"allowedInviteOthers":true,"allowedKickOthers":true,"allowedStartActivity":true,"allowedToggleInvite":true,"autoFillEligible":false,"autoFillProtectedForPromos":false,"autoFillProtectedForSoloing":false,"autoFillProtectedForStreaking":true,"botChampionId":0,"botDifficulty":"NONE","botId":"","firstPositionPreference":"","isBot":false,"isLeader":true,"isSpectator":false,"puuid":"99fdf73c-9cf3-5674-b7e2-abfb1087bf53","ready":true,"secondPositionPreference":"","showGhostedBanner":false,"summonerIconId":7,"summonerId":4105042909,"summonerInternalName":"执念偏执狂666","summonerLevel":81,"summonerName":"执念偏执狂666","teamId":0},"members":[{"allowedChangeActivity":true,"allowedInviteOthers":true,"allowedKickOthers":true,"allowedStartActivity":true,"allowedToggleInvite":true,"autoFillEligible":false,"autoFillProtectedForPromos":false,"autoFillProtectedForSoloing":false,"autoFillProtectedForStreaking":true,"botChampionId":0,"botDifficulty":"NONE","botId":"","firstPositionPreference":"","isBot":false,"isLeader":true,"isSpectator":false,"puuid":"99fdf73c-9cf3-5674-b7e2-abfb1087bf53","ready":true,"secondPositionPreference":"","showGhostedBanner":false,"summonerIconId":7,"summonerId":4105042909,"summonerInternalName":"执念偏执狂666","summonerLevel":81,"summonerName":"执念偏执狂666","teamId":0}],"partyId":"2470930d-41da-42b9-9924-f281592fb563","partyType":"open","restrictions":[],"warnings":[]} 补充: 420 召唤师峡谷·排位赛 单排/双排·征召 430 召唤师峡谷·匹配模式·自选 440 召唤师峡谷·排位赛 灵活排位·征召 450 嚎哭深渊·极地大乱斗·随机 700 召唤师峡谷·冠军杯赛·征召 830 召唤师峡谷·入门·自选 840 召唤师峡谷·新手·自选 850 召唤师峡谷·一般·自选 1090 云顶之奕(匹配模式) 1400 召唤师峡谷·终极魔典·自选 2000 召唤师峡谷·新手教程 第一部分·自选 2010 召唤师峡谷·新手教程 第二部分·自选 2020 召唤师峡谷·新手教程 第三部分·自选 对局匹配成功 发送:/lol-matchmaking/v1/ready-check 对局开始匹配 发送:/lol-gameflow/v1/gameflow-phase 接受对局 发送:/lol-matchmaking/v1/ready-check/accept 技术开发

CommunityDragon/awesome-league: A list of apps that work with the League of Legends Client & In-Game API. (github.com)

这个网站有很多别人大佬开发的app 也有封装好的库 推荐使用

结语

希望结交更多有兴趣的编程大佬

ommunityDragon/awesome-league#developer-tools)

这个网站有很多别人大佬开发的app 也有封装好的库 推荐使用

结语

希望结交更多有兴趣的编程大佬

2022/7/24


1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。

标签: #英雄联盟 #LCUAPI