From abfda3e8eef99733fd49e5fdbb9c9ee2f44d74a2 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Tue, 21 May 2024 22:27:31 +0200 Subject: Rename hod_* into hoid_* (hall of inverse death) and add actual hall of death. + tabs2spaces --- npc/functions/scoreboards.txt | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'npc/functions/scoreboards.txt') diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt index 2091e5ec5..ce64b5412 100644 --- a/npc/functions/scoreboards.txt +++ b/npc/functions/scoreboards.txt @@ -20,7 +20,9 @@ function script ScoreboardsReload { .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='HONOR' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@hof_name$, $@hof_value); .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='ACADEMIC_RANK' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 30", $@hoa_name$, $@hoa_value); //.@nb = query_sql("SELECT c.name, i.value FROM `mapreg` AS i, `char` AS c WHERE i.varname='$REFERRAL_IDS' AND i.index=c.account_id ORDER BY i.value DESC LIMIT 20", $@hor_name$, $@hor_value); - .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='PC_DIE_COUNTER' AND i.char_id=c.char_id AND c.last_login >= "+(gettimetick(2)-86400)+" ORDER BY i.value ASC LIMIT 10", $@hod_name$, $@hod_value); + + .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='PC_DIE_COUNTER' AND i.char_id=c.char_id AND c.last_login >= "+(gettimetick(2)-86400)+" ORDER BY i.value ASC LIMIT 10", $@hoid_name$, $@hoid_value); + .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='PC_DIE_COUNTER' AND i.char_id=c.char_id AND c.last_login >= "+(gettimetick(2)-86400)+" ORDER BY i.value DESC LIMIT 10", $@hod_name$, $@hod_value); // Seasonal Scoreboards if (season() == SUMMER || season() == AUTUMN) { @@ -278,19 +280,32 @@ function script HallOfUDT { function script HallOfDeath { mes ""; - mes l("##BHall Of Deaths: Reverse TOP10##b"); + mes l("##BHall Of Deaths: Reverse TOP10##b"); mesc l("NOTE: Must have logged in the past 24 hours to be shown."); - mesf("1. %s (%s)", $@hod_name$[0], fnum($@hod_value[0])); - mesf("2. %s (%s)", $@hod_name$[1], fnum($@hod_value[1])); - mesf("3. %s (%s)", $@hod_name$[2], fnum($@hod_value[2])); - mesf("4. %s (%s)", $@hod_name$[3], fnum($@hod_value[3])); - mesf("5. %s (%s)", $@hod_name$[4], fnum($@hod_value[4])); - mesf("6. %s (%s)", $@hod_name$[5], fnum($@hod_value[5])); - mesf("7. %s (%s)", $@hod_name$[6], fnum($@hod_value[6])); - mesf("8. %s (%s)", $@hod_name$[7], fnum($@hod_value[7])); - mesf("9. %s (%s)", $@hod_name$[8], fnum($@hod_value[8])); - mesf("10. %s (%s)", $@hod_name$[9], fnum($@hod_value[9])); - if (PC_DIE_COUNTER > $@hod_value[9]) + mesf("1. %s (%s)", $@hoid_name$[0], fnum($@hoid_value[0])); + mesf("2. %s (%s)", $@hoid_name$[1], fnum($@hoid_value[1])); + mesf("3. %s (%s)", $@hoid_name$[2], fnum($@hoid_value[2])); + mesf("4. %s (%s)", $@hoid_name$[3], fnum($@hoid_value[3])); + mesf("5. %s (%s)", $@hoid_name$[4], fnum($@hoid_value[4])); + mesf("6. %s (%s)", $@hoid_name$[5], fnum($@hoid_value[5])); + mesf("7. %s (%s)", $@hoid_name$[6], fnum($@hoid_value[6])); + mesf("8. %s (%s)", $@hoid_name$[7], fnum($@hoid_value[7])); + mesf("9. %s (%s)", $@hoid_name$[8], fnum($@hoid_value[8])); + mesf("10. %s (%s)", $@hoid_name$[9], fnum($@hoid_value[9])); + mes ""; + mes l("##BHall Of Deaths: TOP10##b"); + mesf("1. %s (%s)", $@hod_name$[0], fnum($@hod_value[0])); + mesf("2. %s (%s)", $@hod_name$[1], fnum($@hod_value[1])); + mesf("3. %s (%s)", $@hod_name$[2], fnum($@hod_value[2])); + mesf("4. %s (%s)", $@hod_name$[3], fnum($@hod_value[3])); + mesf("5. %s (%s)", $@hod_name$[4], fnum($@hod_value[4])); + mesf("6. %s (%s)", $@hod_name$[5], fnum($@hod_value[5])); + mesf("7. %s (%s)", $@hod_name$[6], fnum($@hod_value[6])); + mesf("8. %s (%s)", $@hod_name$[7], fnum($@hod_value[7])); + mesf("9. %s (%s)", $@hod_name$[8], fnum($@hod_value[8])); + mesf("10. %s (%s)", $@hod_name$[9], fnum($@hod_value[9])); + // if your result is missing on tables: + if ($@hoid_value[9] < PC_DIE_COUNTER && PC_DIE_COUNTER < $@hod_value[9]) mesc l("Your personal record: %s", fnum(PC_DIE_COUNTER)); return; } -- cgit v1.2.3-70-g09d2