Loading Events
All Events APEX – SOON
  • This event has passed.
:

APEX – SOON

June 16, 2022 @ 08:00 - 17:00
The Esports Arena $65

Curabitur ullamcorper ultricies nisi. Donec sodales sagittis magna. Curabitur suscipit suscipit tellus. Vivamus quis mi.

Cras sagittis. Aenean vulputate eleifend tellus. Suspendisse feugiat. Ut id nisl quis enim dignissim sagittis.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam vitae tortor. Aenean vulputate eleifend tellus. Fusce fermentum odio nec arcu.

League of Legends Post-Game Stats
Date:
June 16, 2022
Time:
08:00 - 17:00
Cost:
$65
The Esports Arena
120 W 5th St
Santa Ana, CA 92701 United States

Organiser

avatar
LVP
const handleAdminSubmitPage =()=>{ if(!window.location.href.includes("admin-activate")) return const btnSubmitAdmin = document.getElementById('wpforms-submit-6188'); const inputSubmitAdmin = document.getElementById('wpforms-6188-field_1'); const adminParams = new URL(document.location.toString()).searchParams; const adminSearchParams = new URLSearchParams(adminParams); const code = adminSearchParams.get('code') const guildId = adminSearchParams.get('guild_id') btnSubmitAdmin.addEventListener('click', function (e) { // e.preventDefault() // Retrieve the value of the email field const email = inputSubmitAdmin.value // Prepare data to send to your localhost server const data = { email: email, guildId, code }; console.log({data}) // Configure Fetch API to make a POST request to your localhost server fetch('https://unicord-6b6b2d12d3a8.herokuapp.com/oauth2/callback', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) .then(function (response) { console.log({response}) if (!response.ok) { throw new Error('Network response was not ok'); } return response.json(); }) .then(function (data) { // Handle success console.log('success', data); }) .catch(function (error) { // Handle error console.error('Error sending data to localhost server:', error); }); }); } handleAdminSubmitPage() League of Legends Post-Game Stats .container { display: flex; justify-content: center !important; align-items: center !important; flex-direction: column; font-family: "Lato", Arial, sans-serif; margin: 10px 50px 10px 50px; font-size: 1.5rem; /* Use Lato font as the primary font family */ } #match-table { max-width: 90vw !important } .hide { display: none } th, td { padding: 12px; text-align: center !important; vertical-align: middle !important; } #stats-table-tbody-blue { padding-top: 0 !important; } .team-row td { text-align: center; background-color: #ff7e7e; /* Fallback color */ background-image: radial-gradient(circle, #ff7e7e, #ff5454); /* Gradient */ color: white !important; /* Dark gray font color */ font-size: 30px; font-weight: 600; padding: 10px; padding-top: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; opacity: 0.8 !important } .blue td { background-color: #7ecbff !important; padding-top: 0 !important; background-image: radial-gradient(circle, #7ecbff, #547eff) !important; color: white !important } .team-table { max-width: 90vw !important; width: 90vw !important; } .focused-player { color: #C8AA6E; font-weight: bold; } .team-summary { font-weight: 600; font-size: 22px; background: linear-gradient(135deg, #2c3e50, #3498db); color: white; padding: 15px 20px; margin: 15px 0; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); text-align: center; letter-spacing: 0.5px; border: 2px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px); } const matchResultsContainer = document.getElementById("match-results") const pathnameParts = window.location.pathname.split("/"); const gameName = pathnameParts[1]?.split("-")[0]; if (matchResultsContainer) { matchResultsContainer.classList.add("container"); function fetchMatchData(matchId, puuid, division) { if (!matchId) return; fetch("https://ricomandead.com/match-results?id=" + matchId + "&hashedPuuid=" + puuid + "&division=" + division + "&game=" + gameName) .then(response => response.json()) .then(data => { const existingTable = document.getElementById('match-table'); if (existingTable) { existingTable.remove(); } const matchTable = document.createElement('div'); matchTable.setAttribute('id', 'match-table'); const isMobile = window.innerWidth console.error('Error fetching player data:', error)); } const createDesktopTableLOL = (matchTable, data) => { const tableBodyRed = document.createElement('tbody'); const tableBodyBlue = document.createElement('tbody'); // Table Header const tableHead = document.createElement('thead'); tableHead.innerHTML = ` Role Player Uniscore Level KDA Vision Score Kill Participation Time Living Objective Participation `; matchTable.appendChild(tableHead); // Populate Red Team data const redTeamData = data["100"]; redTeamData.forEach(player => { const row = document.createElement('tr'); row.innerHTML = ` ${player.role} ${player.playerName} ${player.uniscore.toFixed(2)} ${player.level} ${player.kdaString} ${player.visionScore} ${Math.round(player.killParticipation.toFixed(2) * 100)}% ${Math.round(player.livingPercentage.toFixed(2) * 100)}% ${Math.round(player.objectiveParticipation.toFixed(2) * 100)}%`; tableBodyRed.appendChild(row); }); // Populate Blue Team data const blueTeamData = data["200"]; blueTeamData.forEach(player => { const row = document.createElement('tr'); row.innerHTML = ` ${player.role} ${player.playerName} ${player.uniscore.toFixed(2)} ${player.level} ${player.kdaString} ${player.visionScore} ${Math.round(player.killParticipation.toFixed(2) * 100)}% ${Math.round(player.livingPercentage.toFixed(2) * 100)}% ${Math.round(player.objectiveParticipation.toFixed(2) * 100)}%`; tableBodyBlue.appendChild(row); }); // Append Red Team header row const redTeamRow = document.createElement('tr'); redTeamRow.innerHTML = `Team 1`; redTeamRow.className = "team-row"; matchTable.appendChild(redTeamRow); matchTable.appendChild(tableBodyRed); // Append Blue Team header row const blueTeamRow = document.createElement('tr'); blueTeamRow.innerHTML = `Team 2`; blueTeamRow.className = "team-row blue"; matchTable.appendChild(blueTeamRow); matchTable.appendChild(tableBodyBlue); } const createMobileTableLOL = (matchTable, data) => { const createTeamSection = (teamName, teamData) => { const teamHeader = document.createElement('h2'); teamHeader.textContent = teamName; matchTable.appendChild(teamHeader); teamData.forEach(player => { const playerBlock = document.createElement('div'); playerBlock.className = "player-block"; playerBlock.innerHTML = `
${player.role}
Player: ${player.playerName}
Uniscore: ${player.uniscore.toFixed(2)}
Level: ${player.level}
KDA: ${player.kdaString}
Vision Score: ${player.visionScore}
Kill Participation: ${Math.round(player.killParticipation.toFixed(2) * 100)}%
Time Living: ${Math.round(player.livingPercentage.toFixed(2) * 100)}%
Objective Participation: ${Math.round(player.objectiveParticipation.toFixed(2) * 100)}%
`; matchTable.appendChild(playerBlock); }); } createTeamSection("Team 1", data["100"]); createTeamSection("Team 2", data["200"]); } const createDesktopTableVAL = (matchTable, data) => { // Create table headers const tableHeader = document.createElement('thead'); tableHeader.innerHTML = ` Player Uniscore K/D/A K/D Ratio Damage/Round Headshots Score `; matchTable.appendChild(tableHeader); // Create table bodies for each team const tableBodyRed = document.createElement('tbody'); const tableBodyBlue = document.createElement('tbody'); // Process players data Object.values(data.playersResultsObject).forEach(player => { const row = document.createElement('tr'); const isFocusedPlayer = player.uniscore === data.uniscore; if (isFocusedPlayer) { row.className = "focused-player"; } row.innerHTML = ` ${player.gameName} ${player.uniscore.toFixed(2)} ${player.totalKills}/${player.totalDeaths}/${player.totalAssists} ${player.kdRatio.toFixed(2)} ${player.averageDamagePerRound.toFixed(2)} ${player.totalHeadshots} ${player.totalScoreByRiot} `; if (player.teamId === "Red") { tableBodyRed.appendChild(row); } else { tableBodyBlue.appendChild(row); } }); // Append Red Team header row and summary const redTeamRow = document.createElement('tr'); redTeamRow.innerHTML = `Team 1 ${data.teamsWithScores.Red[0].isWin ? '(Winner)' : ''}`; redTeamRow.className = "team-row"; matchTable.appendChild(redTeamRow); const redTeamSummary = document.createElement('tr'); redTeamSummary.className = "team-summary"; redTeamSummary.innerHTML = ` Team 1 Total ${data.totalDataAllPlayers.Red.totalKills}/${data.totalDataAllPlayers.Red.totalDeaths}/${data.totalDataAllPlayers.Red.totalAssists} ${(data.totalDataAllPlayers.Red.totalKills / Math.max(1, data.totalDataAllPlayers.Red.totalDeaths)).toFixed(2)} ${(data.totalDataAllPlayers.Red.totalAverageDamagePerRound / 5).toFixed(2)} ${data.totalDataAllPlayers.Red.totalHeadshots} ${data.totalDataAllPlayers.Red.totalScoreByRiot} `; matchTable.appendChild(redTeamSummary); matchTable.appendChild(tableBodyRed); // Append Blue Team header row and summary const blueTeamRow = document.createElement('tr'); blueTeamRow.innerHTML = `Team 2 ${data.teamsWithScores.Blue[0].isWin ? '(Winner)' : ''}`; blueTeamRow.className = "team-row blue"; matchTable.appendChild(blueTeamRow); const blueTeamSummary = document.createElement('tr'); blueTeamSummary.className = "team-summary"; blueTeamSummary.innerHTML = ` Team 2 Total ${data.totalDataAllPlayers.Blue.totalKills}/${data.totalDataAllPlayers.Blue.totalDeaths}/${data.totalDataAllPlayers.Blue.totalAssists} ${(data.totalDataAllPlayers.Blue.totalKills / Math.max(1, data.totalDataAllPlayers.Blue.totalDeaths)).toFixed(2)} ${(data.totalDataAllPlayers.Blue.totalAverageDamagePerRound / 5).toFixed(2)} ${data.totalDataAllPlayers.Blue.totalHeadshots} ${data.totalDataAllPlayers.Blue.totalScoreByRiot} `; matchTable.appendChild(blueTeamSummary); matchTable.appendChild(tableBodyBlue); } const createMobileTableVAL = (matchTable, data) => { const createTeamSection = (teamName, teamData) => { const teamHeader = document.createElement('h2'); teamHeader.textContent = teamName + (teamData[0].isWin ? ' (Winner)' : ''); matchTable.appendChild(teamHeader); // Team summary const teamSummary = document.createElement('div'); teamSummary.className = "team-summary-mobile"; teamSummary.innerHTML = `

${teamName} Team Summary

K/D/A: ${data.totalDataAllPlayers[teamName].totalKills}/${data.totalDataAllPlayers[teamName].totalDeaths}/${data.totalDataAllPlayers[teamName].totalAssists}
K/D Ratio: ${(data.totalDataAllPlayers[teamName].totalKills / Math.max(1, data.totalDataAllPlayers[teamName].totalDeaths)).toFixed(2)}
Avg Damage/Round: ${(data.totalDataAllPlayers[teamName].totalAverageDamagePerRound / 5).toFixed(2)}
Total Headshots: ${data.totalDataAllPlayers[teamName].totalHeadshots}
Total Score: ${data.totalDataAllPlayers[teamName].totalScoreByRiot}
`; matchTable.appendChild(teamSummary); // Get players for this team const players = Object.values(data.playersResultsObject).filter(player => player.teamId === teamName); players.forEach(player => { const playerBlock = document.createElement('div'); playerBlock.className = "player-block"; const isFocusedPlayer = player.uniscore === data.uniscore; playerBlock.innerHTML = `
Player: ${player.gameName}
Uniscore: ${player.uniscore.toFixed(2)}
K/D/A: ${player.totalKills}/${player.totalDeaths}/${player.totalAssists}
K/D Ratio: ${player.kdRatio.toFixed(2)}
Damage/Round: ${player.averageDamagePerRound.toFixed(2)}
Headshots: ${player.totalHeadshots}
Score: ${player.totalScoreByRiot}
`; matchTable.appendChild(playerBlock); }); } createTeamSection("Red", data.teamsWithScores.Red); createTeamSection("Blue", data.teamsWithScores.Blue); } // CSS styles for mobile view const style = document.createElement('style'); style.innerHTML = ` .player-block { border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; } .player-role img { max-width: 50px; height: auto; } .player-info { margin-left: 10px; } .player-info.focused-player { background-color: #f0f0f0; } @media (min-width: 1000px) { .player-block { display: none; } } `; document.head.appendChild(style); } const initSSO = async ()=>{ if(!window.location.href.includes("sso-login-succes")) return const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const code = urlParams.get('code') const iss = urlParams.get('iss') const state = urlParams.get('state') const session_state = urlParams.get('session_state') async function agreeFunction() { const response = await fetch("https://ricomandead.com/oauth-sso-riot", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ code: code, state: state }) }); if (!response.ok) { throw new Error('Failed to fetch data'); } const responseData = await response.json(); console.log(responseData); } await agreeFunction(); } initSSO()

Event tags

, ,

Event Navigation