// Author:
// Saulc
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` 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;
if (!getgmlevel()) close;
mes "";
.@nb = query_sql("select char_name, command from `atcommandlog` ORDER BY atcommand_id DESC LIMIT 5", .@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]+")");
next;
if (getgmlevel() < 99) close;
if (getgmlevel()) mes "##BGM Information##b";
if (getgmlevel()) mes "We are currently relying in Karma to generate this Hall Of Fame.";
if (getgmlevel()) mes "";
if (getgmlevel()) mes "##B Manual Edition ##b";
if (getgmlevel()) mes "To reliably change Karma values, you must use @set Karma.";
if (getgmlevel()) mes "But before, check on MySQL the previous karma value, because this command overrides it.";
if (getgmlevel()) mes "Therefore, it is advised to DON'T change this by hand.";
if (getgmlevel()) mes "";
if (getgmlevel()) mes "##B Scripting Edition ##b";
if (getgmlevel()) mes "Is known to work. This hall of fame will need a few minutes to update itself.";
if (getgmlevel()) mes "";
if (getgmlevel()) mes "##B Technical Notes ##b";
if (getgmlevel()) mes "In future we may start Fame field directly (but it is not displayed on client, thus, we decided to use Karma).";
//if (getgmlevel()) set Karma, Karma + 5;
close;
OnInit:
.sex = G_MALE;
.distance = 5;
end;
}