summaryrefslogblamecommitdiff
path: root/npc/functions/scoreboards.txt
blob: e91645b84fe68d5d4a0de8ff434e81ffb007df20 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                         
                                                                                                                              
                                           




                                                 





                                                  



                                         
                                                                                                                            
                                              




                                                 










                                                    



                                         

                                                                                                                                        




                                                 







                                                    





















                                                                                                                                                                                                


                                                    



                                         
                                                                                                                                 










                                                   




                                                     
           
 






                                         
                                                                                                                                                                                                               






















                                                    
         



           








                                                                                                                                                  
// TMW-2 Script
// Author:
//    Jesusalva
// Description:
//    Leaderboards + GM Command Log

function	script	HallOfFame	{
    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]+")");
	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]+")");
    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]+" ("+.@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]+")");
    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]+")");
    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]+")");
    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]+")");
    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.account_id=a.value ORDER BY COUNT(a.value) 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]+")");
    next;
    return;
}



function	script	HallOfSponsor	{
    mes l("This is in honor of all the [@@help://about-server|Contributors@@] who helped rebuilding this world, after the Monster War outbreak.");
    mes l("And also in notable mention of those who [@@https://www.patreon.com/TMW2|sponsor@@] the Alliance and its administrative structure.");
    mes l("");
    mes l("GonzoDark, Saulc.");
    return;
}