sumano Posted May 17, 2014 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 54 Reputation: 0 Joined: 04/24/12 Last Seen: February 28, 2020 Share Posted May 17, 2014 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 Quote Link to comment Share on other sites More sharing options...
Emistry Posted May 17, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 hour ago Share Posted May 17, 2014 try http://upaste.me/r/141a41 Quote Link to comment Share on other sites More sharing options...
Capuche Posted May 17, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted May 17, 2014 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`"; } Quote Link to comment Share on other sites More sharing options...
sumano Posted May 17, 2014 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 54 Reputation: 0 Joined: 04/24/12 Last Seen: February 28, 2020 Author Share Posted May 17, 2014 (edited) 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 May 17, 2014 by sumano Quote Link to comment Share on other sites More sharing options...
Emistry Posted May 18, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 hour ago Share Posted May 18, 2014 try http://upaste.me/r/141a41 ( CTRL + F5 to refresh ) Quote Link to comment Share on other sites More sharing options...
sumano Posted May 18, 2014 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 54 Reputation: 0 Joined: 04/24/12 Last Seen: February 28, 2020 Author Share Posted May 18, 2014 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 Quote Link to comment Share on other sites More sharing options...
Question
sumano
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.