• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC "Players online" & "Highscores" not displaying everyone who is online after server wipe

nugo

Australia OT Mapper
Joined
Apr 1, 2009
Messages
396
Solutions
4
Reaction score
194
So i wiped my server today. I wanted to keep all my old accounts. I took my first ever scheme backup where it was just my god account and re-added that to my database, i then took the exported accounts from my most recent backup and imported the accounts table only into my first backup. This seemed to work well, players are saving, website can track them and the database is recording the correct entry's but when i go into the website all of a sudden its only displaying characters of accounts that were created after the backup. So my server has 28 online but only displays the 8-9 players made on the brand new accounts. The high scores is the same also, it only displays characters created on new accounts after the database reset. Any ideas?

using znote ACC and Uniserver


9bc38ad2bf235dee55cd4adc0463419f.png

Gyazo (https://gyazo.com/9bc38ad2bf235dee55cd4adc0463419f)
 
Solution
Execute this SQL query (in etc phpmyadmin -> db -> SQL tab) to make sure all accounts and players are compatible with Znote AAC, and see if that work:

Note: Please do a backup of your database first!
phpmyadmin -> db -> export -> quick export to .sql

SQL:
INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `flag`)
SELECT
  `a`.`id` AS `account_id`,
  0 AS `ip`,
  UNIX_TIMESTAMP(CURDATE()) AS `created`,
  '' AS `flag`
FROM `accounts` AS `a`
LEFT JOIN `znote_accounts` AS `z`
  ON `a`.`id` = `z`.`account_id`
WHERE `z`.`created` IS NULL;

INSERT INTO `znote_players` (`player_id`, `created`, `hide_char`, `comment`)
SELECT
  `p`.`id` AS `player_id`...
Sounds like a problem with cache.
Can you search for a new character in view the characterprofile?

If so, try to delete the onlinelist.cache.php inside /engine/cache and replace it with the one from ZnoteAAC.
Cheers for the reply,

I have tried deleting that cache and nothing happend, i did it with the webserver still online though, not sure if that makes a difference.

yes i can see new characters in the character profile.

Heres the site Nutopia (http://nutopiaot.com/index.php)

The top 10 in the bottom right is displaying all characters new and old and you can inspect those characters when you click on them but they dont show on the players online page or the highscores.

Eg: This is a old character on an old account Nutopia (http://nutopiaot.com/characterprofile.php?name=Van%20Helsick)

The database is correctly displaying the right amount of players_online, some interface with znote acc is causing it.

btw i havent tried replacing the cache as for some reason onlinelist.cache.php isnt inside his repo unless im blind
 
Last edited:
Execute this SQL query (in etc phpmyadmin -> db -> SQL tab) to make sure all accounts and players are compatible with Znote AAC, and see if that work:

Note: Please do a backup of your database first!
phpmyadmin -> db -> export -> quick export to .sql

SQL:
INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `flag`)
SELECT
  `a`.`id` AS `account_id`,
  0 AS `ip`,
  UNIX_TIMESTAMP(CURDATE()) AS `created`,
  '' AS `flag`
FROM `accounts` AS `a`
LEFT JOIN `znote_accounts` AS `z`
  ON `a`.`id` = `z`.`account_id`
WHERE `z`.`created` IS NULL;

INSERT INTO `znote_players` (`player_id`, `created`, `hide_char`, `comment`)
SELECT
  `p`.`id` AS `player_id`,
  UNIX_TIMESTAMP(CURDATE()) AS `created`,
  0 AS `hide_char`,
  '' AS `comment`
FROM `players` AS `p`
LEFT JOIN `znote_players` AS `z`
  ON `p`.`id` = `z`.`player_id`
WHERE `z`.`created` IS NULL;

DELETE `d` FROM `znote_accounts` AS `d`
INNER JOIN (
  SELECT `i`.`account_id`,
  MAX(`i`.`id`) AS `retain`
  FROM `znote_accounts` AS `i`
  GROUP BY `i`.`account_id`
  HAVING COUNT(`i`.`id`) > 1
) AS `x`
  ON `d`.`account_id` = `x`.`account_id`
  AND `d`.`id` != `x`.`retain`;

DELETE `d` FROM `znote_players` AS `d`
INNER JOIN (
  SELECT `i`.`player_id`,
  MAX(`i`.`id`) AS `retain`
  FROM `znote_players` AS `i`
  GROUP BY `i`.`player_id`
  HAVING COUNT(`i`.`id`) > 1
) AS `x`
  ON `d`.`player_id` = `x`.`player_id`
  AND `d`.`id` != `x`.`retain`;

After this, give the website 30 seconds to clear the cache to see the results. (online list cache duration is quick)
 
Last edited:
Solution
Execute this SQL query (in etc phpmyadmin -> db -> SQL tab) to make sure all accounts and players are compatible with Znote AAC, and see if that work:

Note: Please do a backup of your database first!
phpmyadmin -> db -> export -> quick export to .sql

SQL:
INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `flag`)
SELECT
  `a`.`id` AS `account_id`,
  0 AS `ip`,
  UNIX_TIMESTAMP(CURDATE()) AS `created`,
  '' AS `flag`
FROM `accounts` AS `a`
LEFT JOIN `znote_accounts` AS `z`
  ON `a`.`id` = `z`.`account_id`
WHERE `z`.`created` IS NULL;

INSERT INTO `znote_players` (`player_id`, `created`, `hide_char`, `comment`)
SELECT
  `p`.`id` AS `player_id`,
  UNIX_TIMESTAMP(CURDATE()) AS `created`,
  0 AS `hide_char`,
  '' AS `comment`
FROM `players` AS `p`
LEFT JOIN `znote_players` AS `z`
  ON `p`.`id` = `z`.`player_id`
WHERE `z`.`created` IS NULL;

DELETE `d` FROM `znote_accounts` AS `d`
INNER JOIN (
  SELECT `i`.`account_id`,
  MAX(`i`.`id`) AS `retain`
  FROM `znote_accounts` AS `i`
  GROUP BY `i`.`account_id`
  HAVING COUNT(`i`.`id`) > 1
) AS `x`
  ON `d`.`account_id` = `x`.`account_id`
  AND `d`.`id` != `x`.`retain`;

DELETE `d` FROM `znote_players` AS `d`
INNER JOIN (
  SELECT `i`.`player_id`,
  MAX(`i`.`id`) AS `retain`
  FROM `znote_players` AS `i`
  GROUP BY `i`.`player_id`
  HAVING COUNT(`i`.`id`) > 1
) AS `x`
  ON `d`.`player_id` = `x`.`player_id`
  AND `d`.`id` != `x`.`retain`;

After this, give the website 30 seconds to clear the cache to see the results. (online list cache duration is quick)
That did the trick, cheers mate.
 
Back
Top