Jump to content
  • 0

can modify mvp ranking this script


sumano

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   0
  • Joined:  04/24/12
  • Last Seen:  

hi can you help me modify this http://pastebin.com/raw.php?i=KQFjt7ia

 

i want to everyday have reset scoreboard at 00.00 am

 

and get reward

 

rank number 1 : get xxx item

rank number 2-10 : get xxx item

rank number 10-50 : get xxx item

rank number 50-100 : get xxx item

rank number 100-200 : get xxx item

 

thanks

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10017
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


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

or


/* 

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

CREATE TABLE IF NOT EXISTS `E-MVPRank_dummy` (
	`id` int(11) NOT NULL auto_increment,
	`char_id` int(11) unsigned NOT NULL default '0',
	`name` varchar(30) NOT NULL DEFAULT '',
	`Count` int(11) unsigned NOT NULL default '0',
	PRIMARY KEY  (`id`),
	KEY `char_id` (`char_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;

*/

prontera,148,167,5	script	Sample	757,{
query_sql( "SELECT `id`, `Count` FROM `E-MVPRank_dummy` where char_id = " + getcharid(0), .@rank, .@count );
if ( .@count ) {
	query_sql "delete from `E-MVPRank_dummy` where char_id = " + getcharid(0);
	if ( .@rank == 1 )
		getitem 501,5;
	else if ( .@rank <= 10 )
		getitem 501,10;
	else if ( .@rank <= 50 )
		getitem 501,15;
	// etc..
	mes "you were rank " + .@rank + " in the previous rank";
	close;
}
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;

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" );
end;
OnHour00:
	query_sql "truncate table `E-MVPRank_dummy`";
	query_sql "INSERT into `E-MVPRank_dummy` (`id`,`char_id`,`name`,`Count`)  SELECT '',`char_id`,`name`,`Count` FROM `E-MVPRank` order by `Count` desc";
	query_sql "truncate table `E-MVPRank`";
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   0
  • Joined:  04/24/12
  • Last Seen:  

OH THANKS SPECIAL THANKS TO EMISTRY

 

Rank Reset Mail Send And got item

 

and i test rank #1 why my mail send me rank 102


i change this line 

 

set .@offset,.@offset + 1; ok this good but i rank #1 but i got mail rank 2 and reward too

 

and i test set .@offset,.@offset + 0; this loop

Edited by sumano
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10017
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

try

http://upaste.me/r/141a41

( CTRL + F5 to refresh )

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   0
  • Joined:  04/24/12
  • Last Seen:  

OH thanks you it work

 

and i have last question

 

it can make rank name like @fakename

ex.

100 Kill = [ Boss ]-Admin ( my charactor name Admin )

90 Kill = [ Captain ]-Admin

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...