$(Enc $name)
전적 상세를 받지 못해 게임 시작 때 받은 명단만 남았어요.
$(Enc (Local-Time $c.startedAt).ToString('g', $Ko)) · 판 번호 $($c.gameId)
팀 1: $t1
팀 2: $t2
# 증바GG 내전 기록기 (PowerShell판). 윈도우에 기본으로 있는 Windows PowerShell 5.1에서 돈다. Node나 다른 설치가 필요 없다. 설치: PowerShell에 `irm https://jeungba.gg/rec | iex` (이 파일을 %LOCALAPPDATA%\JeungbaRecorder에 받고 -Install로 실행) 삭제: `irm https://jeungba.gg/rec-remove | iex` - 롤 클라이언트를 읽기만 한다. 게임이나 클라이언트에 아무것도 보내지 않는다. - 사설 방 게임이 시작되면 방 이름, 판 번호, 팀 명단을 적어 두고, 끝나면 그 판의 전적 상세를 records/에 저장한다. 끝난 판 전적에는 방 이름이 없어서(2026-11-13 확인) 게임 중에 받아 둔다. 사설 방 판은 그 판에 들어간 계정의 전적에만 보여서 방마다 그 방에 들어간 사람 한 명의 PC에서 돌아야 한다. - 사이트 연결: 처음 켜면 연결 코드를 받아 브라우저를 연다. 사이트에서 '이 기록기 연결'을 누르면 열쇠를 받아 state/token.json에 둔다. 방 이름에 내전 코드(JB4821, 예전 JB-XXXX)가 있는 판만 사이트로 올린다. 열쇠는 판 올리기와 연결 확인만 할 수 있다. - Node판(tools/naejeon-recorder/recorder.mjs)과 같은 동작이다. 사이트 API와 응답 처리는 그 README의 표와 같다. 스위치: -Install, -Uninstall, -Unlink, -NoTray(창에 기록을 찍음, 시험용), -RunSeconds N(N초 뒤 끝남, 시험용) #> [CmdletBinding()] param( [switch]$Install, [switch]$Uninstall, [switch]$Unlink, [switch]$NoTray, [int]$RunSeconds = 0 ) $Version = '0.4.0' $ErrorActionPreference = 'Continue' $ProgressPreference = 'SilentlyContinue' $Here = Split-Path -Parent $MyInvocation.MyCommand.Path $Self = $MyInvocation.MyCommand.Path $InstallDir = Join-Path $env:LOCALAPPDATA 'JeungbaRecorder' $AppName = '증바 내전 기록기' $Utf8 = New-Object System.Text.UTF8Encoding($false) $PowerShellExe = Join-Path $env:WINDIR 'System32\WindowsPowerShell\v1.0\powershell.exe' $UA = "JeungbaRecorder/$Version-ps (+https://jeungba.gg)" if ($NoTray) { try { [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 } catch { } } # ---- 파일 ---------------------------------------------------------------------------------- function Write-Text([string]$Path, [string]$Text) { [System.IO.File]::WriteAllText($Path, $Text, $Utf8) } function Read-Text([string]$Path) { [System.IO.File]::ReadAllText($Path, [System.Text.Encoding]::UTF8) } function To-Json($Obj) { ConvertTo-Json -InputObject $Obj -Depth 20 -Compress } function Save-Json([string]$Path, $Obj) { $tmp = "$Path.tmp" Write-Text $tmp (To-Json $Obj) Move-Item -LiteralPath $tmp -Destination $Path -Force } function Read-Json([string]$Path) { if (-not (Test-Path -LiteralPath $Path)) { return $null } try { return (ConvertFrom-Json (Read-Text $Path)) } catch { return $null } } # ConvertFrom-Json은 배열을 통째로 한 덩어리로 내보내서, 원소를 하나씩 담은 목록으로 바꾼다. function To-List($Value) { $list = New-Object System.Collections.ArrayList if ($null -ne $Value) { foreach ($x in $Value) { [void]$list.Add($x) } } return , $list } function To-Hashtable($Obj) { $h = @{} if ($null -ne $Obj) { foreach ($p in $Obj.PSObject.Properties) { $h[$p.Name] = $p.Value } } return $h } function Now-Ms { [DateTimeOffset]::UtcNow.ToUnixTimeMilliseconds() } # ---- 설치·삭제 ------------------------------------------------------------------------------- function Get-ShortcutPaths { $programs = Join-Path $env:APPDATA 'Microsoft\Windows\Start Menu\Programs' @((Join-Path $programs "$AppName.lnk"), (Join-Path (Join-Path $programs 'Startup') "$AppName.lnk")) } # 돌고 있는 기록기에 끝내라고 알리고(state/stop.flag) 끝날 때까지 기다린다. function Stop-Running([string]$Dir, [string]$MutexName) { $stateDir = Join-Path $Dir 'state' if (-not (Test-Path -LiteralPath $stateDir)) { return } $m = $null try { $m = [System.Threading.Mutex]::OpenExisting($MutexName) } catch { return } $m.Dispose() Write-Text (Join-Path $stateDir 'stop.flag') 'stop' for ($i = 0; $i -lt 40; $i++) { Start-Sleep -Milliseconds 250 try { $m = [System.Threading.Mutex]::OpenExisting($MutexName); $m.Dispose() } catch { return } } # 10초 안에 안 끝나면 이 스크립트를 돌리는 PowerShell만 골라 끈다. $target = Join-Path $Dir 'recorder.ps1' Get-CimInstance Win32_Process -Filter "name='powershell.exe'" -ErrorAction SilentlyContinue | Where-Object { $_.CommandLine -and $_.CommandLine.Contains($target) -and $_.ProcessId -ne $PID } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue } } function New-TrayIcon { Add-Type -AssemblyName System.Drawing $bmp = New-IconBitmap [System.Drawing.Icon]::FromHandle($bmp.GetHicon()) } # 바로가기 아이콘 파일(PNG를 담은 .ico, 윈도우 비스타 이후 지원) function Save-IconFile([string]$Path) { Add-Type -AssemblyName System.Drawing $ms = New-Object System.IO.MemoryStream (New-IconBitmap).Save($ms, [System.Drawing.Imaging.ImageFormat]::Png) $png = $ms.ToArray() $fs = [System.IO.File]::Create($Path) $w = New-Object System.IO.BinaryWriter ($fs) $w.Write([uint16]0); $w.Write([uint16]1); $w.Write([uint16]1) $w.Write([byte]32); $w.Write([byte]32); $w.Write([byte]0); $w.Write([byte]0) $w.Write([uint16]1); $w.Write([uint16]32); $w.Write([uint32]$png.Length); $w.Write([uint32]22) $w.Write($png) $w.Close() } function New-IconBitmap { Add-Type -AssemblyName System.Drawing $bmp = New-Object System.Drawing.Bitmap 32, 32 $g = [System.Drawing.Graphics]::FromImage($bmp) $g.SmoothingMode = [System.Drawing.Drawing2D.SmoothingMode]::AntiAlias $g.TextRenderingHint = [System.Drawing.Text.TextRenderingHint]::AntiAliasGridFit $g.Clear([System.Drawing.Color]::Transparent) $brush = New-Object System.Drawing.SolidBrush ([System.Drawing.Color]::FromArgb(255, 0x2B, 0x6E, 0xF2)) $g.FillEllipse($brush, 1, 1, 30, 30) $font = New-Object System.Drawing.Font ('Malgun Gothic', 15, [System.Drawing.FontStyle]::Bold, [System.Drawing.GraphicsUnit]::Pixel) $sf = New-Object System.Drawing.StringFormat $sf.Alignment = [System.Drawing.StringAlignment]::Center $sf.LineAlignment = [System.Drawing.StringAlignment]::Center $g.DrawString('내', $font, [System.Drawing.Brushes]::White, (New-Object System.Drawing.RectangleF (0, 1, 32, 32)), $sf) $g.Dispose() return $bmp } if ($Install) { $target = Join-Path $InstallDir 'recorder.ps1' New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null if ([System.IO.Path]::GetFullPath($Self) -ne [System.IO.Path]::GetFullPath($target)) { Copy-Item -LiteralPath $Self -Destination $target -Force } Write-Host "$AppName $Version 설치 중..." Stop-Running $InstallDir 'Local\JeungbaNaejeonRecorder' # 바로가기 아이콘 $ico = Join-Path $InstallDir 'icon.ico' try { Save-IconFile $ico } catch { $ico = $PowerShellExe } $shell = New-Object -ComObject WScript.Shell foreach ($lnkPath in (Get-ShortcutPaths)) { New-Item -ItemType Directory -Force -Path (Split-Path -Parent $lnkPath) | Out-Null $lnk = $shell.CreateShortcut($lnkPath) $lnk.TargetPath = $PowerShellExe $lnk.Arguments = "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$target`"" $lnk.WorkingDirectory = $InstallDir $lnk.IconLocation = "$ico,0" $lnk.Description = $AppName $lnk.Save() } Write-Host '시작 메뉴와 시작 프로그램에 바로가기를 만들었어요. 윈도우를 켜면 같이 켜져요.' Start-Process -FilePath $PowerShellExe -ArgumentList @('-NoProfile', '-ExecutionPolicy', 'Bypass', '-WindowStyle', 'Hidden', '-File', "`"$target`"") -WindowStyle Hidden Write-Host '기록기를 켰어요. 화면 오른쪽 아래 알림 영역에 파란 동그라미로 있어요.' if (-not (Test-Path -LiteralPath (Join-Path $InstallDir 'state\token.json'))) { Write-Host "곧 브라우저가 열려요. 브라우저에서 '이 기록기 연결'만 누르면 끝이에요." } else { Write-Host '이미 사이트에 연결돼 있어요. 이제 이 창은 닫아도 돼요.' } exit 0 } if ($Uninstall) { Set-Location -LiteralPath $env:TEMP Write-Host "$AppName 지우는 중..." Stop-Running $InstallDir 'Local\JeungbaNaejeonRecorder' foreach ($lnkPath in (Get-ShortcutPaths)) { Remove-Item -LiteralPath $lnkPath -Force -ErrorAction SilentlyContinue } if (Test-Path -LiteralPath $InstallDir) { Remove-Item -LiteralPath $InstallDir -Recurse -Force -ErrorAction SilentlyContinue } if (Test-Path -LiteralPath $InstallDir) { Write-Host "일부 파일을 지우지 못했어요. 이 폴더를 직접 지워 주세요: $InstallDir" } else { Write-Host '다 지웠어요. 사이트 연결은 jeungba.gg 내 기록방의 "연결된 내전 기록기"에서 끊을 수 있어요.' } exit 0 } # ---- 설정 ------------------------------------------------------------------------------------ $Records = Join-Path $Here 'records' $State = Join-Path $Here 'state' New-Item -ItemType Directory -Force -Path $Records | Out-Null New-Item -ItemType Directory -Force -Path $State | Out-Null $cfg = @{ lockfile = '' # 방 이름에서 찾을 내전 코드. 새 코드 JB4821(뒤에 '2경기'), 예전 코드 JB-TAMN(뒤에 '-2'). 뒤에 글자·숫자가 더 붙은 코드는 버린다. codePattern = 'JB-?[A-Z0-9]{4}(?:(?:-|\s+)[0-9]{1,2}(?:경기)?)?(?![A-Z0-9])' onlyCustom = $true pollSeconds = 3 retrySeconds = 20 giveUpMinutes = 30 siteUrl = 'https://jeungba.gg' openBrowser = $true uploadRetrySeconds = 300 augmentsUrl = 'https://jeungba.gg/recorder/augments.json' mutexName = 'Local\JeungbaNaejeonRecorder' } $userCfg = Read-Json (Join-Path $Here 'config.json') if ((Test-Path -LiteralPath (Join-Path $Here 'config.json')) -and -not $userCfg) { Write-Host 'config.json을 읽지 못해 기본 설정으로 켜요.' } if ($userCfg) { foreach ($p in $userCfg.PSObject.Properties) { $cfg[$p.Name] = $p.Value } } $Code = New-Object System.Text.RegularExpressions.Regex ($cfg.codePattern, [System.Text.RegularExpressions.RegexOptions]::IgnoreCase) $SiteBase = ([string]$cfg.siteUrl).TrimEnd('/') $SiteOn = [bool]$SiteBase $StopFlag = Join-Path $State 'stop.flag' $LogFile = Join-Path $State 'recorder.log' if ($Unlink) { Remove-Item -LiteralPath (Join-Path $State 'token.json') -Force -ErrorAction SilentlyContinue Write-Host '사이트 연결을 지웠어요. 다음에 켜면 새 연결 코드를 받아요.' exit 0 } # 사이트는 TLS 1.2 이상으로만 받는다. try { [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12 } catch { } [System.Net.ServicePointManager]::Expect100Continue = $false # ---- 기록과 알림 ----------------------------------------------------------------------------- $script:tray = $null $script:status = '시작하는 중' function Write-Log([string]$Msg) { $line = "$((Get-Date).ToString('HH:mm:ss')) $Msg" if ($NoTray) { Write-Host $line } try { if ((Test-Path -LiteralPath $LogFile) -and ((Get-Item -LiteralPath $LogFile).Length -gt 1MB)) { Move-Item -LiteralPath $LogFile -Destination "$LogFile.1" -Force } [System.IO.File]::AppendAllText($LogFile, "$((Get-Date).ToString('yyyy-MM-dd')) $line`r`n", $Utf8) } catch { } } function Set-Status([string]$Text) { $script:status = $Text if ($script:tray) { $t = "$AppName · $Text" if ($t.Length -gt 63) { $t = $t.Substring(0, 63) } $script:tray.Text = $t } } function Show-Note([string]$Title, [string]$Text) { if ($script:tray) { try { $script:tray.ShowBalloonTip(6000, $Title, $Text, [System.Windows.Forms.ToolTipIcon]::Info) } catch { } } } # ---- HTTP ------------------------------------------------------------------------------------ # 응답: @{ status; text; json }. 닿지 않으면 status 0. 4xx·5xx도 본문을 읽는다. # -Lcu면 그 요청 하나에만 롤 클라이언트의 자체 서명 인증서를 허용한다(사이트 요청은 정상 검사). function Invoke-Http { param([string]$Method, [string]$Url, [hashtable]$Headers, [string]$Body, [switch]$Lcu, [int]$TimeoutSec = 20, [switch]$Bytes) $r = @{ status = 0; text = ''; json = $null; bytes = $null } try { $req = [System.Net.HttpWebRequest]::Create($Url) $req.Method = $Method $req.Timeout = $TimeoutSec * 1000 $req.ReadWriteTimeout = $TimeoutSec * 1000 $req.UserAgent = $UA $req.Accept = 'application/json' $req.AllowAutoRedirect = $false if ($Lcu) { $req.ServerCertificateValidationCallback = { $true } $req.Proxy = $null } if ($Headers) { foreach ($k in $Headers.Keys) { $req.Headers[$k] = $Headers[$k] } } if ($PSBoundParameters.ContainsKey('Body') -and $null -ne $Body) { $data = [System.Text.Encoding]::UTF8.GetBytes($Body) $req.ContentType = 'application/json; charset=utf-8' $req.ContentLength = $data.Length $s = $req.GetRequestStream() $s.Write($data, 0, $data.Length) $s.Close() } elseif ($Method -eq 'POST') { $req.ContentLength = 0 } $res = $null try { $res = $req.GetResponse() } catch { $e = $_.Exception while ($e -and -not ($e -is [System.Net.WebException])) { $e = $e.InnerException } if ($e -and $e.Response) { $res = $e.Response } else { return $r } } $r.status = [int]$res.StatusCode $stream = $res.GetResponseStream() $ms = New-Object System.IO.MemoryStream $stream.CopyTo($ms) $res.Close() $raw = $ms.ToArray() if ($Bytes) { $r.bytes = $raw } $r.text = [System.Text.Encoding]::UTF8.GetString($raw) if ($r.text) { try { $r.json = ConvertFrom-Json $r.text } catch { } } } catch { } return $r } # ---- 롤 클라이언트(LCU) ---------------------------------------------------------------------- function Read-LockfileAt([string]$Path) { try { if (-not (Test-Path -LiteralPath $Path)) { return $null } $fs = New-Object System.IO.FileStream ($Path, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, ([System.IO.FileShare]::ReadWrite -bor [System.IO.FileShare]::Delete)) $sr = New-Object System.IO.StreamReader ($fs, [System.Text.Encoding]::UTF8) $text = $sr.ReadToEnd() $sr.Close() $parts = $text.Split(':') if ($parts.Count -ge 4 -and [int]$parts[2] -gt 0 -and $parts[3]) { return @{ port = [int]$parts[2]; password = $parts[3] } } } catch { } return $null } function Find-Lcu { # 설정에 lockfile을 적었으면 그것만 본다(시험할 때 진짜 클라이언트에 붙지 않게). if ($cfg.lockfile) { return (Read-LockfileAt $cfg.lockfile) } foreach ($p in @('C:/Riot Games/League of Legends/lockfile', 'D:/Riot Games/League of Legends/lockfile')) { $found = Read-LockfileAt $p if ($found) { return $found } } # 설치 경로가 다르면 실행 중인 클라이언트의 실행 인자에서 찾는다. try { $cl = (Get-CimInstance Win32_Process -Filter "name='LeagueClientUx.exe'" -ErrorAction Stop | Select-Object -First 1).CommandLine if ($cl) { $port = [regex]::Match($cl, '--app-port=(\d+)').Groups[1].Value $pw = [regex]::Match($cl, '--remoting-auth-token=([\w-]+)').Groups[1].Value if ($port -and $pw) { return @{ port = [int]$port; password = $pw } } } } catch { } return $null } function Get-Lcu([hashtable]$L, [string]$Path) { $auth = 'Basic ' + [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("riot:$($L.password)")) Invoke-Http -Method GET -Url "https://127.0.0.1:$($L.port)$Path" -Headers @{ Authorization = $auth } -Lcu -TimeoutSec 15 } # ---- 기록 중인 판 ----------------------------------------------------------------------------- $PendingFile = Join-Path $State 'pending.json' $script:pending = To-List (Read-Json $PendingFile) function Save-Pending { Save-Json $PendingFile ([object[]]$script:pending.ToArray()) } $script:saved = New-Object 'System.Collections.Generic.HashSet[string]' foreach ($f in (Get-ChildItem -LiteralPath $Records -Filter '*.json' -ErrorAction SilentlyContinue)) { [void]$script:saved.Add($f.BaseName.Split('_')[-1]) } $InGame = @('GameStart', 'InProgress', 'Reconnect') function Pick-Player($p) { $name = $p.gameName if (-not $name) { $name = $p.summonerName } [ordered]@{ puuid = [string]$p.puuid; name = [string]$name; tagLine = [string]$p.tagLine; championId = $(if ($p.championId) { $p.championId } else { 0 }) } } function New-Capture($Session, $LastLobby) { $gd = $Session.gameData $lobbyName = [string]$gd.gameName if (-not $lobbyName -and $LastLobby) { $lobbyName = $LastLobby.name } $m = $Code.Match($lobbyName) $code = '' if ($m.Success) { $code = $m.Value.ToUpper() } $queueId = 0; $gameMode = ''; $mapId = 0 if ($gd.queue) { $queueId = $gd.queue.id; $gameMode = $gd.queue.gameMode; $mapId = $gd.queue.mapId } if (-not $gameMode -and $Session.map) { $gameMode = $Session.map.gameMode } if (-not $mapId -and $Session.map) { $mapId = $Session.map.id } $one = @(); foreach ($p in $gd.teamOne) { $one += , (Pick-Player $p) } $two = @(); foreach ($p in $gd.teamTwo) { $two += , (Pick-Player $p) } $seen = '' if ($LastLobby) { $seen = $LastLobby.name } [pscustomobject][ordered]@{ gameId = $gd.gameId lobbyName = $lobbyName lobbyNameSeenInLobby = $seen code = $code isCustomGame = [bool]$gd.isCustomGame queueId = $queueId gameMode = [string]$gameMode mapId = $mapId teamOne = $one teamTwo = $two startedAt = (Now-Ms) endedAt = 0 lastTry = 0 eog = $null } } function Find-Pending($GameId) { foreach ($p in $script:pending) { if ("$($p.gameId)" -eq "$GameId") { return $p } } return $null } # ---- 이름(챔피언·아이템·주문·증강)과 HTML ---------------------------------------------------- $script:names = $null function Get-Names { if ($script:names) { return $script:names } $cache = Join-Path $State 'names.json' $old = Read-Json $cache $n = $null try { $vr = Invoke-Http -Method GET -Url 'https://ddragon.leagueoflegends.com/api/versions.json' -TimeoutSec 10 $v = @($vr.json)[0] if (-not $v) { throw 'no version' } if ($old -and $old.version -eq $v -and $old.augs -and @($old.augs.PSObject.Properties).Count -gt 0) { $n = $old } else { $dd = { param($f) (Invoke-Http -Method GET -Url "https://ddragon.leagueoflegends.com/cdn/$v/data/ko_KR/$f.json" -TimeoutSec 20).json.data } $champs = @{}; foreach ($c in (& $dd 'champion').PSObject.Properties) { $champs[[string]$c.Value.key] = $c.Value.name } $items = @{}; foreach ($c in (& $dd 'item').PSObject.Properties) { $items[[string]$c.Name] = $c.Value.name } $spells = @{}; foreach ($c in (& $dd 'summoner').PSObject.Properties) { $spells[[string]$c.Value.key] = $c.Value.name } $augs = @{} $ar = Invoke-Http -Method GET -Url $cfg.augmentsUrl -TimeoutSec 15 if ($ar.status -eq 200 -and $ar.json) { foreach ($c in $ar.json.PSObject.Properties) { $augs[[string]$c.Name] = @($c.Value) } } if ($champs.Count -eq 0) { throw 'no champions' } $n = [pscustomobject]@{ version = $v; champs = $champs; items = $items; spells = $spells; augs = $augs } Save-Json $cache $n $n = Read-Json $cache } } catch { $n = $old } if (-not $n) { $n = [pscustomobject]@{ champs = @{}; items = @{}; spells = @{}; augs = @{} } } $script:names = [pscustomobject]@{ champs = (To-Hashtable $n.champs); items = (To-Hashtable $n.items); spells = (To-Hashtable $n.spells); augs = (To-Hashtable $n.augs) } return $script:names } function Enc($s) { [System.Net.WebUtility]::HtmlEncode([string]$s) } $Ko = [System.Globalization.CultureInfo]::GetCultureInfo('ko-KR') function N0($v) { if ($null -eq $v) { $v = 0 }; ([double]$v).ToString('N0', $Ko) } function Local-Time([long]$Ms) { [DateTimeOffset]::FromUnixTimeMilliseconds($Ms).LocalDateTime } $Style = @' :root{--bg:#f6f6f4;--card:#fff;--ink:#1b1b1b;--sub:#6b6b6b;--line:#e3e3df;--blue:#2b6ef2;--red:#c2453d} @media (prefers-color-scheme:dark){:root{--bg:#141414;--card:#1e1e1e;--ink:#eee;--sub:#9a9a9a;--line:#333}} body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 "Pretendard","Malgun Gothic",system-ui,sans-serif} main{max-width:1240px;margin:0 auto;padding:28px 16px 60px}h1{font-size:24px;margin:0 0 6px}.lead{color:var(--sub);margin:0 0 20px} a{color:var(--blue)}.meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:24px} .meta div{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 12px}.meta b{display:block;font-size:16px}.meta span{color:var(--sub);font-size:13px} h2{font-size:17px;margin:24px 0 10px;padding-left:10px;border-left:4px solid}h2.t100{border-color:var(--blue)}h2.t200{border-color:var(--red)} .scroll{overflow-x:auto;background:var(--card);border:1px solid var(--line);border-radius:10px} table{border-collapse:collapse;width:100%;min-width:1100px}th,td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top} th{font-size:12px;color:var(--sub);font-weight:600;white-space:nowrap}tr:last-child td{border-bottom:0} td.n,td.kda{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}td.kda{font-weight:600} .who b{display:block;white-space:nowrap}.who span,.sub{display:block;color:var(--sub);font-size:12px}td.ch{white-space:nowrap} .tags i{display:inline-block;font-style:normal;font-size:12px;border:1px solid var(--line);border-radius:6px;padding:1px 6px;margin:0 4px 4px 0;white-space:nowrap} .tags i.r-prism{border-color:#b77ce8}.tags i.r-gold{border-color:#d9a93a}.tags i.r-silver{border-color:#9aa3ad}.sp{font-size:13px;white-space:nowrap} .ok{color:var(--blue);font-weight:600}.no{color:var(--sub)} '@ function Head([string]$Title) { "
전적 상세를 받지 못해 게임 시작 때 받은 명단만 남았어요.
$(Enc (Local-Time $c.startedAt).ToString('g', $Ko)) · 판 번호 $($c.gameId)
팀 1: $t1
팀 2: $t2
내전 코드 $(Enc $c.code)
") } else { [void]$sb.Append('방 이름에 내전 코드가 없어요
') } $created = Local-Time $g.gameCreation $mode = $g.gameMode; if ($g.queueId -eq 3270) { $mode = '사설 증바람' } $size100 = @($g.participants | Where-Object { $_.teamId -eq 100 }).Count $size200 = @($g.participants | Where-Object { $_.teamId -eq 200 }).Count $patch = (([string]$g.gameVersion).Split('.') | Select-Object -First 2) -join '.' [void]$sb.Append('") foreach ($teamId in 100, 200) { $ps = @($g.participants | Where-Object { $_.teamId -eq $teamId }) if (-not $ps.Count) { continue } $won = [bool]$ps[0].stats.win $kills = 0; foreach ($p in $ps) { $kills += [int]$p.stats.kills } $side = '레드'; if ($teamId -eq 100) { $side = '블루' } $result = '패배'; if ($won) { $result = '승리' } [void]$sb.Append("| 플레이어 | 챔피언 | K / D / A | 챔피언 피해 | 받은 피해 | 회복 | 골드 | CS | 증강 | 아이템 | 주문 |
|---|---|---|---|---|---|---|---|---|---|---|
| $(Enc $wn)#$(Enc $who.tagLine) | $(Enc $champ)레벨 $($s.champLevel) | $([int]$s.kills) / $([int]$s.deaths) / $([int]$s.assists) | $(N0 $s.totalDamageDealtToChampions) | $(N0 $s.totalDamageTaken) | $(N0 $s.totalHeal) | $(N0 $s.goldEarned) | $cs | $augHtml | $itemHtml | $(Enc $sp1) $(Enc $sp2) |