summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/commands/super-menu.txt4
-rw-r--r--npc/functions/scoreboards.txt35
2 files changed, 38 insertions, 1 deletions
diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt
index 52ac7e0a8..ba4d64efd 100644
--- a/npc/commands/super-menu.txt
+++ b/npc/commands/super-menu.txt
@@ -17,7 +17,8 @@ function script SuperMenu {
l("Scheduled broadcasts"),
rif(is_admin(), l("MOTD")),
rif(is_gm(), l("Event management")),
- rif(is_admin(), l("Join teh Guild")),
+ rif(is_admin() && !getcharid(2), l("Join teh Guild")),
+ rif(is_admin(), l("Referral Program Report")),
l("Debug");
switch (@menu)
@@ -28,6 +29,7 @@ function script SuperMenu {
case 4:
query_sql("UPDATE `char` SET `guild_id`=1 WHERE `char_id`="+getcharid(0));
break;
+ case 6: HallOfReferral; break;
case 5: GlobalDebugMenu 1; break;
}
} while (1);
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
index 3158aea56..6a3eece1d 100644
--- a/npc/functions/scoreboards.txt
+++ b/npc/functions/scoreboards.txt
@@ -108,3 +108,38 @@ function script HallOfGMLog {
mes("15."+.@name$[14]+" ("+.@value$[14]+")");
return;
}
+
+
+
+
+
+function script HallOfReferral {
+ mes "";
+ .@nb = query_sql("SELECT l.userid, COUNT(a.value) FROM `acc_reg_num_db` AS a, `login` AS l WHERE a.key='REFERRAL_PROG' AND l.userid=a.value ORDER BY l.account_id 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]+")");
+ 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]+")");
+ return;
+}
+
+