diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-02 20:13:57 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-02 20:13:57 -0300 |
commit | 5a7befddd57f2a0870734ff60d249947c961f842 (patch) | |
tree | 4a46cf1ac9ab0e853d3f07e0da3afa10be55eda8 /npc | |
parent | 30ec30060bcba99d9587c1aeadc01c98f64ff090 (diff) | |
download | serverdata-5a7befddd57f2a0870734ff60d249947c961f842.tar.gz serverdata-5a7befddd57f2a0870734ff60d249947c961f842.tar.bz2 serverdata-5a7befddd57f2a0870734ff60d249947c961f842.tar.xz serverdata-5a7befddd57f2a0870734ff60d249947c961f842.zip |
[skip ci] Experiment with referral program report.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/commands/super-menu.txt | 4 | ||||
-rw-r--r-- | npc/functions/scoreboards.txt | 35 |
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; +} + + |