summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-15 10:59:23 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-15 10:59:23 -0300
commitd8daf7f7c31ff20552a761942b41fc678d2eea4b (patch)
tree1c669e91b4d229126397fcdfade18dcccd45df44 /npc/functions
parentf7735589f498c5119dd8430cc002d5626c1170b4 (diff)
downloadserverdata-d8daf7f7c31ff20552a761942b41fc678d2eea4b.tar.gz
serverdata-d8daf7f7c31ff20552a761942b41fc678d2eea4b.tar.bz2
serverdata-d8daf7f7c31ff20552a761942b41fc678d2eea4b.tar.xz
serverdata-d8daf7f7c31ff20552a761942b41fc678d2eea4b.zip
[Server Performance and Security] reload scoreboards at once, hourly.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/scoreboards.txt162
1 files changed, 98 insertions, 64 deletions
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
index ca79a2e63..7eb763dd7 100644
--- a/npc/functions/scoreboards.txt
+++ b/npc/functions/scoreboards.txt
@@ -4,10 +4,47 @@
// Description:
// Leaderboards + GM Command Log
+- script scoreboardsGen NPC_HIDDEN,{
+ end;
+OnHour00:
+OnHour01:
+OnHour02:
+OnHour03:
+OnHour04:
+OnHour05:
+OnHour06:
+OnHour07:
+OnHour08:
+OnHour09:
+OnHour10:
+OnHour11:
+OnHour12:
+OnHour13:
+OnHour14:
+OnHour15:
+OnHour16:
+OnHour17:
+OnHour18:
+OnHour19:
+OnHour20:
+OnHour21:
+OnHour22:
+OnHour23:
+OnInit:
+ debugmes "Reloading scoreboards...";
+ .@nb = query_sql("select name, zeny from `char` WHERE `guild_id`!=1 ORDER BY zeny DESC LIMIT 15", $@hofortune_name$, $@hofortune_value);
+ .@nb = query_sql("select name, base_level from `char` WHERE `guild_id`!=1 ORDER BY base_level DESC LIMIT 15", $@hoblvl_name$, $@hoblvl_value);
+ .@nb = query_sql("SELECT c.name, i.amount FROM `inventory` AS i, `char` AS c WHERE i.nameid="+StrangeCoin+" AND i.char_id=c.char_id ORDER BY i.amount DESC LIMIT 15", $@hoc_name$, $@hoc_value);
+ .@nb = query_sql("select char_name, command from `atcommandlog` ORDER BY atcommand_id DESC LIMIT 15", $@hogm_name$, $@hogm_value$);
+ debugmes "Scoreboards reloaded";
+ end;
+}
+
function script HallOfFame {
// Moved to event statues
return;
mes "";
+ /*
.@nb = query_sql("select name, karma from `char` WHERE `guild_id`!=1 ORDER BY karma DESC LIMIT 10", .@name$, .@value);
mes l("##BHall Of Fame: TOP10##b");
mes("1."+.@name$[0]+" ("+.@value[0]+")");
@@ -20,94 +57,91 @@ function script HallOfFame {
mes("8."+.@name$[7]+" ("+.@value[7]+")");
mes("9."+.@name$[8]+" ("+.@value[8]+")");
mes("10."+.@name$[9]+" ("+.@value[9]+")");
+ */
return;
}
function script HallOfFortune {
mes "";
- .@nb = query_sql("select name, zeny from `char` WHERE `guild_id`!=1 ORDER BY zeny DESC LIMIT 15", .@name$, .@value);
mes l("##BHall Of Fortune: TOP15##b");
- mes("1."+.@name$[0]+" ("+format_number(.@value[0])+" GP)");
- mes("2."+.@name$[1]+" ("+format_number(.@value[1])+" GP)");
- mes("3."+.@name$[2]+" ("+format_number(.@value[2])+" GP)");
- mes("4."+.@name$[3]+" ("+format_number(.@value[3])+" GP)");
- mes("5."+.@name$[4]+" ("+format_number(.@value[4])+" GP)");
- mes("6."+.@name$[5]+" ("+format_number(.@value[5])+" GP)");
- mes("7."+.@name$[6]+" ("+format_number(.@value[6])+" GP)");
- mes("8."+.@name$[7]+" ("+format_number(.@value[7])+" GP)");
- mes("9."+.@name$[8]+" ("+format_number(.@value[8])+" GP)");
- mes("10."+.@name$[9]+" ("+format_number(.@value[9])+" GP)");
- mes("11."+.@name$[10]+" ("+format_number(.@value[10])+" GP)");
- mes("12."+.@name$[11]+" ("+format_number(.@value[11])+" GP)");
- mes("13."+.@name$[12]+" ("+format_number(.@value[12])+" GP)");
- mes("14."+.@name$[13]+" ("+format_number(.@value[13])+" GP)");
- mes("15."+.@name$[14]+" ("+format_number(.@value[14])+" GP)");
+ mes("1."+$@hofortune_name$[0]+" ("+format_number($@hofortune_value[0])+" GP)");
+ mes("2."+$@hofortune_name$[1]+" ("+format_number($@hofortune_value[1])+" GP)");
+ mes("3."+$@hofortune_name$[2]+" ("+format_number($@hofortune_value[2])+" GP)");
+ mes("4."+$@hofortune_name$[3]+" ("+format_number($@hofortune_value[3])+" GP)");
+ mes("5."+$@hofortune_name$[4]+" ("+format_number($@hofortune_value[4])+" GP)");
+ mes("6."+$@hofortune_name$[5]+" ("+format_number($@hofortune_value[5])+" GP)");
+ mes("7."+$@hofortune_name$[6]+" ("+format_number($@hofortune_value[6])+" GP)");
+ mes("8."+$@hofortune_name$[7]+" ("+format_number($@hofortune_value[7])+" GP)");
+ mes("9."+$@hofortune_name$[8]+" ("+format_number($@hofortune_value[8])+" GP)");
+ mes("10."+$@hofortune_name$[9]+" ("+format_number($@hofortune_value[9])+" GP)");
+ mes("11."+$@hofortune_name$[10]+" ("+format_number($@hofortune_value[10])+" GP)");
+ mes("12."+$@hofortune_name$[11]+" ("+format_number($@hofortune_value[11])+" GP)");
+ mes("13."+$@hofortune_name$[12]+" ("+format_number($@hofortune_value[12])+" GP)");
+ mes("14."+$@hofortune_name$[13]+" ("+format_number($@hofortune_value[13])+" GP)");
+ mes("15."+$@hofortune_name$[14]+" ("+format_number($@hofortune_value[14])+" GP)");
return;
}
function script HallOfLevel {
mes "";
- .@nb = query_sql("select name, base_level from `char` WHERE `guild_id`!=1 ORDER BY base_level DESC LIMIT 15", .@name$, .@value);
mes l("##BHall Of Level: TOP15##b");
- 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("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("1."+$@hoblvl_name$[0]+" ("+$@hoblvl_value[0]+")");
+ mes("2."+$@hoblvl_name$[1]+" ("+$@hoblvl_value[1]+")");
+ mes("3."+$@hoblvl_name$[2]+" ("+$@hoblvl_value[2]+")");
+ mes("4."+$@hoblvl_name$[3]+" ("+$@hoblvl_value[3]+")");
+ mes("5."+$@hoblvl_name$[4]+" ("+$@hoblvl_value[4]+")");
+ mes("6."+$@hoblvl_name$[5]+" ("+$@hoblvl_value[5]+")");
+ mes("7."+$@hoblvl_name$[6]+" ("+$@hoblvl_value[6]+")");
+ mes("8."+$@hoblvl_name$[7]+" ("+$@hoblvl_value[7]+")");
+ mes("9."+$@hoblvl_name$[8]+" ("+$@hoblvl_value[8]+")");
+ mes("10."+$@hoblvl_name$[9]+" ("+$@hoblvl_value[9]+")");
+ mes("11."+$@hoblvl_name$[10]+" ("+$@hoblvl_value[10]+")");
+ mes("12."+$@hoblvl_name$[11]+" ("+$@hoblvl_value[11]+")");
+ mes("13."+$@hoblvl_name$[12]+" ("+$@hoblvl_value[12]+")");
+ mes("14."+$@hoblvl_name$[13]+" ("+$@hoblvl_value[13]+")");
+ mes("15."+$@hoblvl_name$[14]+" ("+$@hoblvl_value[14]+")");
return;
}
function script HallOfCoins {
mes "";
- .@nb = query_sql("SELECT c.name, i.amount FROM `inventory` AS i, `char` AS c WHERE i.nameid="+StrangeCoin+" AND i.char_id=c.char_id ORDER BY i.amount DESC LIMIT 15", .@name$, .@value);
mes l("##BHall Of @@: TOP15##b", getitemlink(StrangeCoin));
- 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("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("1."+$@hoc_name$[0]+" ("+$@hoc_value[0]+")");
+ mes("2."+$@hoc_name$[1]+" ("+$@hoc_value[1]+")");
+ mes("3."+$@hoc_name$[2]+" ("+$@hoc_value[2]+")");
+ mes("4."+$@hoc_name$[3]+" ("+$@hoc_value[3]+")");
+ mes("5."+$@hoc_name$[4]+" ("+$@hoc_value[4]+")");
+ mes("6."+$@hoc_name$[5]+" ("+$@hoc_value[5]+")");
+ mes("7."+$@hoc_name$[6]+" ("+$@hoc_value[6]+")");
+ mes("8."+$@hoc_name$[7]+" ("+$@hoc_value[7]+")");
+ mes("9."+$@hoc_name$[8]+" ("+$@hoc_value[8]+")");
+ mes("10."+$@hoc_name$[9]+" ("+$@hoc_value[9]+")");
+ mes("11."+$@hoc_name$[10]+" ("+$@hoc_value[10]+")");
+ mes("12."+$@hoc_name$[11]+" ("+$@hoc_value[11]+")");
+ mes("13."+$@hoc_name$[12]+" ("+$@hoc_value[12]+")");
+ mes("14."+$@hoc_name$[13]+" ("+$@hoc_value[13]+")");
+ mes("15."+$@hoc_name$[14]+" ("+$@hoc_value[14]+")");
return;
}
function script HallOfGMLog {
mes "";
- .@nb = query_sql("select char_name, command from `atcommandlog` ORDER BY atcommand_id DESC LIMIT 15", .@name$, .@value$);
mes l("##BLatest GM Commands##b");
- 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("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("1."+$@hogm_name$[0]+" ("+$@hogm_value$[0]+")");
+ mes("2."+$@hogm_name$[1]+" ("+$@hogm_value$[1]+")");
+ mes("3."+$@hogm_name$[2]+" ("+$@hogm_value$[2]+")");
+ mes("4."+$@hogm_name$[3]+" ("+$@hogm_value$[3]+")");
+ mes("5."+$@hogm_name$[4]+" ("+$@hogm_value$[4]+")");
+ mes("6."+$@hogm_name$[5]+" ("+$@hogm_value$[5]+")");
+ mes("7."+$@hogm_name$[6]+" ("+$@hogm_value$[6]+")");
+ mes("8."+$@hogm_name$[7]+" ("+$@hogm_value$[7]+")");
+ mes("9."+$@hogm_name$[8]+" ("+$@hogm_value$[8]+")");
+ mes("10."+$@hogm_name$[9]+" ("+$@hogm_value$[9]+")");
+ mes("11."+$@hogm_name$[10]+" ("+$@hogm_value$[10]+")");
+ mes("12."+$@hogm_name$[11]+" ("+$@hogm_value$[11]+")");
+ mes("13."+$@hogm_name$[12]+" ("+$@hogm_value$[12]+")");
+ mes("14."+$@hogm_name$[13]+" ("+$@hogm_value$[13]+")");
+ mes("15."+$@hogm_name$[14]+" ("+$@hogm_value$[14]+")");
return;
}