Almost forgot about you, here's your NPC!
//======Name========================================
// Emperium Ladder
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// It's a script that will show the top 10 Emperium breakers of your server.
//==================================================
prontera,123,123,4 script empladder 78,{
mes "Here are our top 10 breakers!";
query_sql ("SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='empladder' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count);
for( set .@x,0; .@x<10; set .@x,.@x+1 )
{
mes "^880000"+(.@x+1)+"^000000) ^0000FF"+.@name$[.@x]+"^000000 - ^008800"+.@count[.@x]+"^000000 Point(s)";
} // .@x starts at 0, but you want to start with '1st', so use (.@x+1)
close;
}