human vs bot and clickable to pubg.op.gg #119
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 "[2D replay](<$2D_replay_url>)"
|
||||||
|
send-discord -content "More match details [DTCH_STATS](https://dtch.online/matchinfo.php?matchid=$($winmatches[0].id))"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
write-output "Something went wrong (more then 10 matches to report)"
|
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 "<table class='sortable'>";
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
<th>Player Name</th>
|
<th>Player Name</th>
|
||||||
|
<th>Sort</th>
|
||||||
<th>Kills</th>
|
<th>Kills</th>
|
||||||
<th>Damage Dealt</th>
|
<th>Damage Dealt</th>
|
||||||
<th>Time Survived</th>
|
<th>Time Survived</th>
|
||||||
|
|
@ -155,12 +156,31 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
||||||
<th>DBNOs</th>
|
<th>DBNOs</th>
|
||||||
<th>Headshot Kills</th>
|
<th>Headshot Kills</th>
|
||||||
<th>Assists</th>
|
<th>Assists</th>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
foreach ($jsonData['included'] as $includedItem) {
|
foreach ($jsonData['included'] as $includedItem) {
|
||||||
if ($includedItem['type'] == "participant") {
|
if ($includedItem['type'] == "participant") {
|
||||||
$playerStats = $includedItem['attributes']['stats'];
|
$playerStats = $includedItem['attributes']['stats'];
|
||||||
|
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 "<tr>";
|
||||||
echo "<td>" . htmlspecialchars($playerStats['name']) . "</td>";
|
echo "<td>" . htmlspecialchars($playerStats['name']) . "</td>";
|
||||||
|
echo "<td>Bot</a></td>";
|
||||||
echo "<td>" . htmlspecialchars($playerStats['kills']) . "</td>";
|
echo "<td>" . htmlspecialchars($playerStats['kills']) . "</td>";
|
||||||
echo "<td>" . htmlspecialchars($playerStats['damageDealt']) . "</td>";
|
echo "<td>" . htmlspecialchars($playerStats['damageDealt']) . "</td>";
|
||||||
echo "<td>" . htmlspecialchars($playerStats['timeSurvived']) . "</td>";
|
echo "<td>" . htmlspecialchars($playerStats['timeSurvived']) . "</td>";
|
||||||
|
|
@ -173,6 +193,7 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@ function get-killstats {
|
||||||
matchType = $matchType
|
matchType = $matchType
|
||||||
dbno = ($attacks | where-object { $_.dBNOMaker.name -eq $player_name }).count
|
dbno = ($attacks | where-object { $_.dBNOMaker.name -eq $player_name }).count
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue