summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/scoreboards.txt244
-rw-r--r--npc/scripts.conf1
2 files changed, 245 insertions, 0 deletions
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
new file mode 100644
index 00000000..9a6400e7
--- /dev/null
+++ b/npc/functions/scoreboards.txt
@@ -0,0 +1,244 @@
+// Moubootaur Legends Script
+// Author:
+// Jesusalva
+// Description:
+// Leaderboards
+
+// Scoreboard functions
+function script HallOfGuild {
+ mes "";
+ mes l("##BHall Of Guild Level: TOP5##b");
+ mesf("1. %s (%d)", $@hoguild_name$[0], $@hoguild_value[0]);
+ mesf("2. %s (%d)", $@hoguild_name$[1], $@hoguild_value[1]);
+ mesf("3. %s (%d)", $@hoguild_name$[2], $@hoguild_value[2]);
+ mesf("4. %s (%d)", $@hoguild_name$[3], $@hoguild_value[3]);
+ mesf("5. %s (%d)", $@hoguild_name$[4], $@hoguild_value[4]);
+ return;
+}
+
+function script HallOfFortune {
+ mes "";
+ mes l("##BHall Of Fortune: TOP15##b");
+ mesf("1. %s (%s GP)", $@hofortune_name$[0], fnum($@hofortune_value[0]));
+ mesf("2. %s (%s GP)", $@hofortune_name$[1], fnum($@hofortune_value[1]));
+ mesf("3. %s (%s GP)", $@hofortune_name$[2], fnum($@hofortune_value[2]));
+ mesf("4. %s (%s GP)", $@hofortune_name$[3], fnum($@hofortune_value[3]));
+ mesf("5. %s (%s GP)", $@hofortune_name$[4], fnum($@hofortune_value[4]));
+ mesf("6. %s (%s GP)", $@hofortune_name$[5], fnum($@hofortune_value[5]));
+ mesf("7. %s (%s GP)", $@hofortune_name$[6], fnum($@hofortune_value[6]));
+ mesf("8. %s (%s GP)", $@hofortune_name$[7], fnum($@hofortune_value[7]));
+ mesf("9. %s (%s GP)", $@hofortune_name$[8], fnum($@hofortune_value[8]));
+ mesf("10. %s (%s GP)", $@hofortune_name$[9], fnum($@hofortune_value[9]));
+ mesf("11. %s (%s GP)", $@hofortune_name$[10], fnum($@hofortune_value[10]));
+ mesf("12. %s (%s GP)", $@hofortune_name$[11], fnum($@hofortune_value[11]));
+ mesf("13. %s (%s GP)", $@hofortune_name$[12], fnum($@hofortune_value[12]));
+ mesf("14. %s (%s GP)", $@hofortune_name$[13], fnum($@hofortune_value[13]));
+ mesf("15. %s (%s GP)", $@hofortune_name$[14], fnum($@hofortune_value[14]));
+ return;
+}
+
+function script HallOfLevel {
+ mes "";
+ mes l("##BHall Of Level: TOP15##b");
+ mesf("1. %s (%d)", $@hoblvl_name$[0], $@hoblvl_value[0]);
+ mesf("2. %s (%d)", $@hoblvl_name$[1], $@hoblvl_value[1]);
+ mesf("3. %s (%d)", $@hoblvl_name$[2], $@hoblvl_value[2]);
+ mesf("4. %s (%d)", $@hoblvl_name$[3], $@hoblvl_value[3]);
+ mesf("5. %s (%d)", $@hoblvl_name$[4], $@hoblvl_value[4]);
+ mesf("6. %s (%d)", $@hoblvl_name$[5], $@hoblvl_value[5]);
+ mesf("7. %s (%d)", $@hoblvl_name$[6], $@hoblvl_value[6]);
+ mesf("8. %s (%d)", $@hoblvl_name$[7], $@hoblvl_value[7]);
+ mesf("9. %s (%d)", $@hoblvl_name$[8], $@hoblvl_value[8]);
+ mesf("10. %s (%d)", $@hoblvl_name$[9], $@hoblvl_value[9]);
+ mesf("11. %s (%d)", $@hoblvl_name$[10], $@hoblvl_value[10]);
+ mesf("12. %s (%d)", $@hoblvl_name$[11], $@hoblvl_value[11]);
+ mesf("13. %s (%d)", $@hoblvl_name$[12], $@hoblvl_value[12]);
+ mesf("14. %s (%d)", $@hoblvl_name$[13], $@hoblvl_value[13]);
+ mesf("15. %s (%d)", $@hoblvl_name$[14], $@hoblvl_value[14]);
+ return;
+}
+
+function script HallOfJob {
+ mes "";
+ mes l("##BHall Of Job Level: TOP15##b");
+ mesf("1. %s (%d)", $@hojlvl_name$[0], $@hojlvl_value[0]);
+ mesf("2. %s (%d)", $@hojlvl_name$[1], $@hojlvl_value[1]);
+ mesf("3. %s (%d)", $@hojlvl_name$[2], $@hojlvl_value[2]);
+ mesf("4. %s (%d)", $@hojlvl_name$[3], $@hojlvl_value[3]);
+ mesf("5. %s (%d)", $@hojlvl_name$[4], $@hojlvl_value[4]);
+ mesf("6. %s (%d)", $@hojlvl_name$[5], $@hojlvl_value[5]);
+ mesf("7. %s (%d)", $@hojlvl_name$[6], $@hojlvl_value[6]);
+ mesf("8. %s (%d)", $@hojlvl_name$[7], $@hojlvl_value[7]);
+ mesf("9. %s (%d)", $@hojlvl_name$[8], $@hojlvl_value[8]);
+ mesf("10. %s (%d)", $@hojlvl_name$[9], $@hojlvl_value[9]);
+ mesf("11. %s (%d)", $@hojlvl_name$[10], $@hojlvl_value[10]);
+ mesf("12. %s (%d)", $@hojlvl_name$[11], $@hojlvl_value[11]);
+ mesf("13. %s (%d)", $@hojlvl_name$[12], $@hojlvl_value[12]);
+ mesf("14. %s (%d)", $@hojlvl_name$[13], $@hojlvl_value[13]);
+ mesf("15. %s (%d)", $@hojlvl_name$[14], $@hojlvl_value[14]);
+ return;
+}
+
+function script HallOfAcorns {
+ mes "";
+ mes l("##BHall Of Acorns: TOP15##b");
+ mesc l("Only %s in storage will be counted.", getitemlink(Acorn));
+ mesf("1. %s (%d)", $@hoa_name$[0], $@hoa_value[0]);
+ mesf("2. %s (%d)", $@hoa_name$[1], $@hoa_value[1]);
+ mesf("3. %s (%d)", $@hoa_name$[2], $@hoa_value[2]);
+ mesf("4. %s (%d)", $@hoa_name$[3], $@hoa_value[3]);
+ mesf("5. %s (%d)", $@hoa_name$[4], $@hoa_value[4]);
+ mesf("6. %s (%d)", $@hoa_name$[5], $@hoa_value[5]);
+ mesf("7. %s (%d)", $@hoa_name$[6], $@hoa_value[6]);
+ mesf("8. %s (%d)", $@hoa_name$[7], $@hoa_value[7]);
+ mesf("9. %s (%d)", $@hoa_name$[8], $@hoa_value[8]);
+ mesf("10. %s (%d)", $@hoa_name$[9], $@hoa_value[9]);
+ mesf("11. %s (%d)", $@hoa_name$[10], $@hoa_value[10]);
+ mesf("12. %s (%d)", $@hoa_name$[11], $@hoa_value[11]);
+ mesf("13. %s (%d)", $@hoa_name$[12], $@hoa_value[12]);
+ mesf("14. %s (%d)", $@hoa_name$[13], $@hoa_value[13]);
+ mesf("15. %s (%d)", $@hoa_name$[14], $@hoa_value[14]);
+ return;
+}
+
+function script HallOfLethality {
+ mes "";
+ mes l("##BHall Of Lethality: TOP15##b");
+ mesc l("Special monsters are not counted.");
+ mesf("1. %s (%d)", $@hol_name$[0], $@hol_value[0]);
+ mesf("2. %s (%d)", $@hol_name$[1], $@hol_value[1]);
+ mesf("3. %s (%d)", $@hol_name$[2], $@hol_value[2]);
+ mesf("4. %s (%d)", $@hol_name$[3], $@hol_value[3]);
+ mesf("5. %s (%d)", $@hol_name$[4], $@hol_value[4]);
+ mesf("6. %s (%d)", $@hol_name$[5], $@hol_value[5]);
+ mesf("7. %s (%d)", $@hol_name$[6], $@hol_value[6]);
+ mesf("8. %s (%d)", $@hol_name$[7], $@hol_value[7]);
+ mesf("9. %s (%d)", $@hol_name$[8], $@hol_value[8]);
+ mesf("10. %s (%d)", $@hol_name$[9], $@hol_value[9]);
+ mesf("11. %s (%d)", $@hol_name$[10], $@hol_value[10]);
+ mesf("12. %s (%d)", $@hol_name$[11], $@hol_value[11]);
+ mesf("13. %s (%d)", $@hol_name$[12], $@hol_value[12]);
+ mesf("14. %s (%d)", $@hol_name$[13], $@hol_value[13]);
+ mesf("15. %s (%d)", $@hol_name$[14], $@hol_value[14]);
+ return;
+}
+
+// HallOfGame()
+function script HallOfGame {
+ mes l("Players Killed in PvP: %s", format_number($PLAYERS_KILLED));
+ mes l("Monsters Killed in PvE: %s", format_number($MONSTERS_KILLED));
+ mes "";
+ // season ; weather ; game time ; world story ; etc.
+ mes "";
+ mes l("Notable mentions and thanks for our [@@https://www.patreon.com/themanaworld|sponsors@@] for their continued support.");
+ mes "";
+ return;
+}
+
+
+// Main script handler for scoreboards
+- script @scoreboard 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:
+ consolemes(CONSOLEMES_DEBUG, "Reloading scoreboards...");
+ .@nb = query_sql("select name, zeny from `char` ORDER BY zeny DESC LIMIT 15", $@hofortune_name$, $@hofortune_value);
+ .@nb = query_sql("select name, base_level from `char` ORDER BY base_level DESC LIMIT 15", $@hoblvl_name$, $@hoblvl_value);
+ .@nb = query_sql("select name, job_level from `char` ORDER BY job_level DESC LIMIT 15", $@hojlvl_name$, $@hojlvl_value);
+ .@nb = query_sql("select name, guild_lv from `guild` ORDER BY guild_lv DESC LIMIT 5", $@hoguild_name$, $@hoguild_value);
+ .@nb = query_sql("SELECT c.name, i.amount FROM `storage` AS i, `char` AS c WHERE i.nameid="+Acorn+" AND i.account_id=c.account_id ORDER BY i.amount DESC LIMIT 15", $@hoa_name$, $@hoa_value);
+ .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='MONSTERS_KILLED' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 15", $@hol_name$, $@hol_value);
+ consolemes(CONSOLEMES_DEBUG, "Scoreboards reloaded");
+ if (!$@SCOREBOARD_BIND) {
+ bindatcmd "scoreboard", "@scoreboard::OnCall", 0, 100, 0;
+ bindatcmd "scoreboards", "@scoreboard::OnCall", 0, 100, 0;
+ $@SCOREBOARD_BIND=true;
+ }
+ end;
+
+OnCall:
+ do {
+ clear;
+ mes l("The Mana World - Legacy");
+ mesc l("All scoreboards are updated hourly."), 1;
+ mes "";
+ select
+ l("Hall Of Fortune"),
+ l("Hall Of Base Level"),
+ l("Hall Of Job Level"),
+ l("Hall Of Guilds"),
+ l("Hall Of Lethality"),
+ l("Hall Of Acorns"),
+ l("Game Statistics"),
+ l("Personal Information"),
+ l("Quit");
+ mes "";
+ switch (@menu) {
+ case 1:
+ HallOfFortune();
+ next;
+ break;
+ case 2:
+ HallOfLevel();
+ next;
+ break;
+ case 3:
+ HallOfJob();
+ next;
+ break;
+ case 4:
+ HallOfGuild();
+ next;
+ break;
+ case 5:
+ HallOfLethality();
+ next;
+ break;
+ case 6:
+ HallOfAcorns();
+ next;
+ break;
+ case 7:
+ HallOfGame();
+ next;
+ break;
+ case 8:
+ ShowAbizit(true);
+ mes "";
+ mesc l("Total deaths: %s", fnum(PC_DIE_COUNTER));
+ mesc l("Boss points: %s", fnum(BOSS_POINTS));
+ mesc l("Mob points: %s", fnum(Mobpt));
+ mesc l("Total Gold: %s", fnum((Zeny+BankVault)));
+ next;
+ break;
+ default:
+ close;
+ }
+ } while (true);
+ end;
+}
+
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 9c166fbb..c066d65f 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -104,6 +104,7 @@
// Post Loading Functions
"npc/functions/filters.txt",
+"npc/functions/scoreboards.txt",
"npc/functions/global_event_handler.txt",
@include "npc/_import.txt"