summaryrefslogblamecommitdiff
path: root/npc/functions/scoreboards.txt
blob: bdc1a554d9d05b747b4a3614e080f3800c1e77de (plain) (tree)





















































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

function	script	HallOfFame	{
    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]+")");
}

function	script	HallOfFortune	{
    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]+")");
}

function	script	HallOfLevel	{
    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]+")");
}

function	script	HallOfGMLog	{
    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]+")");
}