Skip to content

Commit

Permalink
Inlude karma & money when calculating HoF best players scores
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Dec 11, 2022
1 parent f111ee3 commit d1f8b19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/script/halloffame.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-- X XP
-- B Best (xp and online age)
-- @ Achievement score
-- R Role play score (xp and achievement)
-- R Role play score (xp, achievement, karma, & money) (TODO: add maze score, deathmatch score, visited zones, & completed quests)
-- O
-- 0
-- 3,4,5,6,7,8,9 Paper Chase 2013 and newer
Expand Down Expand Up @@ -108,7 +108,7 @@ ORDER BY points DESC, nmb DESC, xp DESC) As scoretable,
INSERT INTO halloffame_archive_recent (charname, fametype, halloffame_archive_recent.rank, points, day)
SELECT scoretable.name, 'R', @rownum:=@rownum+1 as rankX, scoretable.points, CURRENT_DATE()
FROM (
SELECT name, round(ln(xp*(ifnull(sum(1/reached)*1000,0)+0.0001))*1000) As points, sum(1/reached)
SELECT name, round(ln((xp+karma+money)*(ifnull(sum(1/reached)*1000,0)+0.0001))*1000) As points, sum(1/reached)
FROM achievement
JOIN reached_achievement ra ON (ra.achievement_id=achievement.id)
RIGHT JOIN character_stats ON name = charname
Expand Down Expand Up @@ -207,7 +207,7 @@ ORDER BY points DESC, nmb DESC, xp DESC) As scoretable,
INSERT INTO halloffame_archive_alltimes (charname, fametype, halloffame_archive_alltimes.rank, points, day)
SELECT scoretable.name, 'R', @rownum:=@rownum+1 as rankX, scoretable.points, CURRENT_DATE()
FROM (
SELECT name, round(ln(xp*(ifnull(sum(1/reached)*1000,0)+0.0001))*1000) As points, sum(1/reached)
SELECT name, round(ln((xp+karma+money)*(ifnull(sum(1/reached)*1000,0)+0.0001))*1000) As points, sum(1/reached)
FROM achievement
JOIN reached_achievement ra ON (ra.achievement_id=achievement.id)
RIGHT JOIN character_stats ON name = charname
Expand Down

0 comments on commit d1f8b19

Please sign in to comment.