fro,103,119,4 script MVP Ranking Board 857,{
query_sql( "SELECT `name`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 5",.@Name$,.@Count );
if( getarraysize( .@Name$ ) ){
for( set .@i,0; .@i < getarraysize( .@Name$ ); set .@i,.@i + 1 )
mes "[ "+( .@i + 1 )+". ] "+.@Name$[.@i]+" - "+.@Count[.@i]+" Points";
}else{
mes "No Record Found.";
}
close;
OnInit:
setarray .mvp_list[0],1002,1002,1002,1002;
for( .@i = 0; .@i < getarraysize( .mvp_list ); .@i++ )
setd( ".mvp_"+.mvp_list ),1;
end;
OnNPCKillEvent:
if( getd( ".mvp_"+.mvp_list ) )
query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1" );
end;
Can anybody help me convert this script to eathena? Thank you.
Im having this error
parse_line: expect command, missing function name or calling undeclared func
tion
10 : mes "No Record Found.";
11 : }
12 : close;
13 : OnInit:
14 : setarray .mvp_list[0],1002,1002,1002,1002;
* 15 : for( '.'@i = 0; .@i < getarraysize( .mvp_list ); .@i++ )
16 : setd( ".mvp_"+.mvp_list ),1;
17 : end;
18 : OnNPCKillEvent:
19 : if( getd( ".mvp_"+.mvp_list ) )
20 : query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`n
ame`='"+strcharinfo(0)+"',`Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1"
);