Dive Into Tibia’s Timeless Adventures

Celebrating Tibia’s Legacy with Every Beat

<div id="players-online" style="font-family: Arial; font-size: 20px;">
  🟢 Players Online: Loading...
</div>

<script>
async function getPlayersOnline() {
  try {
    const res = await fetch("https://api.allorigins.win/raw?url=https://api.tibiadata.com/v3/worlds");
    const data = await res.json();

    let total = 0;

    data.worlds.regular_worlds.forEach(world => {
      total += world.players_online;
    });

    document.getElementById("players-online").innerText =
      "🟢 Players Online: " + total.toLocaleString();
  } catch (err) {
    document.getElementById("players-online").innerText =
      "⚠️ Failed to load player count";
  }
}

getPlayersOnline();
setInterval(getPlayersOnline, 60000);
</script>