summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-08-05 14:39:23 -0300
committerJesusaves <cpntb1@ymail.com>2020-08-05 14:39:23 -0300
commite4413578a1a3ca912a0be44d4a03b2222dded234 (patch)
tree47e77422c4a1f6e58cbb8bb7f1a94980a65fffc3
parentfb2748cdecfeb2d71580e2da7d169e4ee9d82a71 (diff)
downloadserverdata-e4413578a1a3ca912a0be44d4a03b2222dded234.tar.gz
serverdata-e4413578a1a3ca912a0be44d4a03b2222dded234.tar.bz2
serverdata-e4413578a1a3ca912a0be44d4a03b2222dded234.tar.xz
serverdata-e4413578a1a3ca912a0be44d4a03b2222dded234.zip
Rewrite Hall of Referrals
-rw-r--r--npc/functions/scoreboards.txt42
1 files changed, 21 insertions, 21 deletions
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
index f6e7c875a..4983d54b5 100644
--- a/npc/functions/scoreboards.txt
+++ b/npc/functions/scoreboards.txt
@@ -17,6 +17,7 @@ function script ScoreboardsReload {
.@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='AFKING' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@afk_name$, $@afk_value);
.@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='HONOR' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@hof_name$, $@hof_value);
.@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='ACADEMIC_RANK' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@hoa_name$, $@hoa_value);
+ .@nb = query_sql("SELECT c.name, i.value FROM `mapreg` AS i, `char` AS c WHERE i.varname='$REFERRAL_IDS' AND i.index=c.account_id ORDER BY i.value DESC LIMIT 20", $@hor_name$, $@hor_value);
// Seasonal Scoreboards
if (season() == SUMMER || season() == AUTUMN) {
@@ -284,30 +285,29 @@ function script HallOfHonor {
function script HallOfReferral {
mes "";
- .@nb = query_sql("SELECT l.userid, COUNT(a.value) FROM `mapreg` AS a, `login` AS l WHERE a.varname='$REFERRAL_IDS' AND l.account_id=a.index ORDER BY COUNT(a.value) DESC LIMIT 20", .@name$, .@value);
mes "Referral Program Report - pg. 1";
- mes("1."+.@name$[0]+" ("+.@value[0]+")");
- mes("2."+.@name$[1]+" ("+.@value[1]+")");
- mes("3."+.@name$[2]+" ("+.@value[2]+")");
- mes("4."+.@name$[3]+" ("+.@value[3]+")");
- mes("5."+.@name$[4]+" ("+.@value[4]+")");
- mes("6."+.@name$[5]+" ("+.@value[5]+")");
- mes("7."+.@name$[6]+" ("+.@value[6]+")");
- mes("8."+.@name$[7]+" ("+.@value[7]+")");
- mes("9."+.@name$[8]+" ("+.@value[8]+")");
- mes("10."+.@name$[9]+" ("+.@value[9]+")");
+ mes("1."+$@hor_name$[0]+" ("+$@hor_value[0]+")");
+ mes("2."+$@hor_name$[1]+" ("+$@hor_value[1]+")");
+ mes("3."+$@hor_name$[2]+" ("+$@hor_value[2]+")");
+ mes("4."+$@hor_name$[3]+" ("+$@hor_value[3]+")");
+ mes("5."+$@hor_name$[4]+" ("+$@hor_value[4]+")");
+ mes("6."+$@hor_name$[5]+" ("+$@hor_value[5]+")");
+ mes("7."+$@hor_name$[6]+" ("+$@hor_value[6]+")");
+ mes("8."+$@hor_name$[7]+" ("+$@hor_value[7]+")");
+ mes("9."+$@hor_name$[8]+" ("+$@hor_value[8]+")");
+ mes("10."+$@hor_name$[9]+" ("+$@hor_value[9]+")");
next;
mes "Referral Program Report - pg. 2";
- mes("11."+.@name$[10]+" ("+.@value[10]+")");
- mes("12."+.@name$[11]+" ("+.@value[11]+")");
- mes("13."+.@name$[12]+" ("+.@value[12]+")");
- mes("14."+.@name$[13]+" ("+.@value[13]+")");
- mes("15."+.@name$[14]+" ("+.@value[14]+")");
- mes("16."+.@name$[15]+" ("+.@value[15]+")");
- mes("17."+.@name$[16]+" ("+.@value[16]+")");
- mes("18."+.@name$[17]+" ("+.@value[17]+")");
- mes("19."+.@name$[18]+" ("+.@value[18]+")");
- mes("20."+.@name$[19]+" ("+.@value[19]+")");
+ mes("11."+$@hor_name$[10]+" ("+$@hor_value[10]+")");
+ mes("12."+$@hor_name$[11]+" ("+$@hor_value[11]+")");
+ mes("13."+$@hor_name$[12]+" ("+$@hor_value[12]+")");
+ mes("14."+$@hor_name$[13]+" ("+$@hor_value[13]+")");
+ mes("15."+$@hor_name$[14]+" ("+$@hor_value[14]+")");
+ mes("16."+$@hor_name$[15]+" ("+$@hor_value[15]+")");
+ mes("17."+$@hor_name$[16]+" ("+$@hor_value[16]+")");
+ mes("18."+$@hor_name$[17]+" ("+$@hor_value[17]+")");
+ mes("19."+$@hor_name$[18]+" ("+$@hor_value[18]+")");
+ mes("20."+$@hor_name$[19]+" ("+$@hor_value[19]+")");
next;
return;
}