Jump to content
  • 0

MVP Ladder (wont record players)


fallen0519

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   2
  • Joined:  02/15/14
  • Last Seen:  

I think there is some bug upon this script, it shows the top players but the class is stuck at novice and won't be updated under the waitingroom. Hopefully any pro scripter can help to fix them out. Thanks much.

/*
CREATE TABLE IF NOT EXISTS `E-MVPRank` (
`char_id` int(11) unsigned NOT NULL default '0',
`name` varchar(30) NOT NULL DEFAULT '',
`Class` smallint(6) unsigned NOT NULL default '0',
`Count` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`char_id`)
) ENGINE=MyISAM;
*/


prontera,162,152,4	script	MVP Ladder	619,{
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]+" MvP killed";
}else{
	mes "No Record Found.";
}
close;


OnNPCKillEvent:
if( getmonsterinfo( killedrid,MOB_MVPEXP ) )
	query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1" );

OnMinute31:
query_sql( "SELECT `name`,`Class`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 1",.@Name$,.@Class,.@Count );
delwaitingroom;
waitingroom "TOP : "+.@Name$+" ("+jobname( .@Class )+") : "+.@Count+" Kill",0;

end;
}

 

Edited by fallen0519
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


/*

CREATE TABLE IF NOT EXISTS `E-MVPRank` (

`char_id` int(11) unsigned NOT NULL default '0',

`name` varchar(30) NOT NULL DEFAULT '',

`Class` smallint(6) unsigned NOT NULL default '0',

`Count` int(11) unsigned NOT NULL default '0',

PRIMARY KEY (`char_id`)

) ENGINE=MyISAM;

*/

prontera,162,152,4 script MVP Ladder 619,{

.@size = query_sql( "SELECT `name`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 5",.@Name$,.@Count );

if( .@size ){

for( set .@i,0; .@i < .@size; set .@i,.@i + 1 )

mes "[ "+( .@i + 1 )+". ] "+.@Name$[.@i]+" - "+.@Count[.@i]+" MvP killed";

}else{

mes "No Record Found.";

}

close;

OnNPCKillEvent:

if( getmonsterinfo( killedrid,MOB_MVPEXP ) )

query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Class` = "+ Class +", `Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1" );

OnMinute31:

query_sql( "SELECT `name`,`Class`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 1",.@Name$,.@Class,.@Count );

delwaitingroom;

waitingroom "TOP : "+.@Name$+" ("+jobname( .@Class )+") : "+.@Count+" Kill",0;

end;

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...