summaryrefslogblamecommitdiff
path: root/npc/003-1/michel.txt
blob: 736aa24246da3ed722f71e8df8fd19cb7a06db90 (plain) (tree)
1
2
3
4
5
6
7
8
9
               
          


                                   
 
                                             
 
         
                                                                                  
 
           
                                                                                                         
                                          




                                                 










                                                                                                       

           
                                                                                                                                       







                                                 
                                                                       
                             
 
           
                                                                                                                                 





                                                  




                                                   
 


                                                           
         













                                                                                                                         
          


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

003-1,89,109,0	script	Michel	NPC_BACCHUS,{

    mesn;
    mesq l("All hail the ones who proven their worth before the whole Alliance!");

    mes "";
	.@nb = query_sql("select name, karma from `char` ORDER BY karma DESC LIMIT 5", .@name$, .@value);
	mes l("##BHall Of Fame: TOP5##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]+")");
    next;

    mes "";
	.@nb = query_sql("select name, zeny from `char` ORDER BY zeny DESC LIMIT 5", .@name$, .@value);
	mes l("##BHall Of Fortune: TOP5##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]+")");
    next;

    mes "";
	.@nb = query_sql("select name, base_level from `char` WHERE `guild_id`!=1 ORDER BY base_level DESC LIMIT 5", .@name$, .@value);
	mes l("##BHall Of Level: TOP5##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]+")");
    next;

    // Anyone with GM Level, staff or not, is allowed to latest GM logs
    if (!getgmlevel()) close;

    mes "";
	.@nb = query_sql("select char_name, command from `atcommandlog` ORDER BY atcommand_id DESC LIMIT 10", .@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]+")");

    // Only Admins are allowed to change the HoF Scoreboard
    if (!is_admin()) close;

    next;
    mes "##BGM Information##b";
    mes "We are currently relying in Karma to generate this Hall Of Fame.";
    mes "";
    mes "##B Manual Edition ##b";
    mes "To reliably change Karma values, you must use @set Karma.";
    mes "But before, check on MySQL the previous karma value, because this command overrides it.";
    mes "Therefore, it is advised to DON'T change this by hand.";
    mes "";
    mes "##B Scripting Edition ##b";
    mes "Is known to work. This hall of fame will need a few minutes to update itself.";
    mes "";
    mes "##B Technical Notes ##b";
    mes "In future we may start Fame field directly (but it is not displayed on client, thus, we decided to use Karma).";
    //set Karma, Karma + 5;
    close;

OnInit:
    .sex = G_MALE;
    .distance = 5;
    end;
}