// 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;
}
*/
function script HallOfAlmanach {
mes "";
mes l("##BHall Of Almanach: TOP15##b");
mesc l("The greatest heroes of all time");
mesf("1. %s (%s)", $@hob_name$[0], fnum($@hob_value[0]));
mesf("2. %s (%s)", $@hob_name$[1], fnum($@hob_value[1]));
mesf("3. %s (%s)", $@hob_name$[2], fnum($@hob_value[2]));
mesf("4. %s (%s)", $@hob_name$[3], fnum($@hob_value[3]));
mesf("5. %s (%s)", $@hob_name$[4], fnum($@hob_value[4]));
mesf("6. %s (%s)", $@hob_name$[5], fnum($@hob_value[5]));
mesf("7. %s (%s)", $@hob_name$[6], fnum($@hob_value[6]));
mesf("8. %s (%s)", $@hob_name$[7], fnum($@hob_value[7]));
mesf("9. %s (%s)", $@hob_name$[8], fnum($@hob_value[8]));
mesf("10. %s (%s)", $@hob_name$[9], fnum($@hob_value[9]));
mesf("11. %s (%s)", $@hob_name$[10], fnum($@hob_value[10]));
mesf("12. %s (%s)", $@hob_name$[11], fnum($@hob_value[11]));
mesf("13. %s (%s)", $@hob_name$[12], fnum($@hob_value[12]));
mesf("14. %s (%s)", $@hob_name$[13], fnum($@hob_value[13]));
mesf("15. %s (%s)", $@hob_name$[14], fnum($@hob_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;
OnClock0500:
OnClock1700:
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.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='BOSS_POINTS' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 15", $@hob_name$, $@hob_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 at 05:00 and 17:00 servertime."), 1;
mes "";
select
l("Hall Of Fortune"),
l("Hall Of Base Level"),
l("Hall Of Job Level"),
l("Hall Of Guilds"),
l("Hall Of Almanach"),
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:
HallOfAlmanach();
next;
break;
case 6:
HallOfGame();
next;
break;
case 7:
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;
}