Merge pull request #119 from OpzekerIT/dev
human vs bot and clickable to pubg.op.gg
This commit is contained in:
commit
f1ac9cc58f
5 changed files with 34 additions and 13 deletions
|
|
@ -147,6 +147,7 @@ id $($winmatches[0].id)
|
|||
}
|
||||
|
||||
send-discord -content "[2D replay](<$2D_replay_url>)"
|
||||
send-discord -content "More match details [DTCH_STATS](https://dtch.online/matchinfo.php?matchid=$($winmatches[0].id))"
|
||||
}
|
||||
else {
|
||||
write-output "Something went wrong (more then 10 matches to report)"
|
||||
|
|
|
|||
BIN
images/logo.png
BIN
images/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 659 KiB |
BIN
images/logo_uncompressed.png
Normal file
BIN
images/logo_uncompressed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
|
|
@ -146,6 +146,7 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
|||
echo "<table class='sortable'>";
|
||||
echo "<tr>
|
||||
<th>Player Name</th>
|
||||
<th>Sort</th>
|
||||
<th>Kills</th>
|
||||
<th>Damage Dealt</th>
|
||||
<th>Time Survived</th>
|
||||
|
|
@ -155,22 +156,42 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
|||
<th>DBNOs</th>
|
||||
<th>Headshot Kills</th>
|
||||
<th>Assists</th>
|
||||
|
||||
</tr>";
|
||||
foreach ($jsonData['included'] as $includedItem) {
|
||||
if ($includedItem['type'] == "participant") {
|
||||
$playerStats = $includedItem['attributes']['stats'];
|
||||
echo "<tr>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['name']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['kills']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['damageDealt']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['timeSurvived']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['winPlace']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['revives']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['longestKill']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['DBNOs']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['headshotKills']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['assists']) . "</td>";
|
||||
echo "</tr>";
|
||||
if (substr($playerStats['playerId'], 0, 2) !== 'ai') {
|
||||
// Create links for each stat
|
||||
echo "<tr>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['name']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'> Human </a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['kills']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['damageDealt']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['timeSurvived']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['winPlace']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['revives']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['longestKill']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['DBNOs']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['headshotKills']) . "</a></td>";
|
||||
echo "<td><a href='https://pubg.op.gg/user/" . urlencode($playerStats['name']) . "' target='_blank'>" . htmlspecialchars($playerStats['assists']) . "</a></td>";
|
||||
echo "</tr>";
|
||||
} else {
|
||||
// Display without link
|
||||
echo "<tr>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['name']) . "</td>";
|
||||
echo "<td>Bot</a></td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['kills']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['damageDealt']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['timeSurvived']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['winPlace']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['revives']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['longestKill']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['DBNOs']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['headshotKills']) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($playerStats['assists']) . "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ function get-killstats {
|
|||
matchType = $matchType
|
||||
dbno = ($attacks | where-object { $_.dBNOMaker.name -eq $player_name }).count
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue