Hello everyone can you help me why the top hunter does not appear in the script .. but there is no problem with the script thanks guys!
here the script:
alter table `char` add `gold_rank` int(11) unsigned default 0 after unban_time, add index (gold_rank);
*/
mes "[ ^C6A518Top 30 Gold Hunters^000000 ]";
.@nb = query_sql( "select name, gold_rank from `char` where gold_rank > 0 order by gold_rank desc limit 2", .@name$, .@gold );
if ( !.@nb ) {
mes "No ranking yet";
close;
}
for ( .@i = 0; .@i < .@nb; .@i++ )
mes .@name$ +" killed "+ .@gold +" Golden Peco";
close;
OnNPCKillEvent:
if ( strcharinfo(3) == "ordeal_1-2" && killedrid == 1369 )
query_sql "update `char` set gold_rank = gold_rank +1 where char_id = "+ getcharid(0);
end;

here the script:
alter table `char` add `gold_rank` int(11) unsigned default 0 after unban_time, add index (gold_rank);
*/
mes "[ ^C6A518Top 30 Gold Hunters^000000 ]";
.@nb = query_sql( "select name, gold_rank from `char` where gold_rank > 0 order by gold_rank desc limit 2", .@name$, .@gold );
if ( !.@nb ) {
mes "No ranking yet";
close;
}
for ( .@i = 0; .@i < .@nb; .@i++ )
mes .@name$ +" killed "+ .@gold +" Golden Peco";
close;
OnNPCKillEvent:
if ( strcharinfo(3) == "ordeal_1-2" && killedrid == 1369 )
query_sql "update `char` set gold_rank = gold_rank +1 where char_id = "+ getcharid(0);
end;


