Cisqua Posted February 6, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Share Posted February 6, 2013 (edited) please help me to put job_class to this ladder? for eg: 1: Player1 [ Champion ] - 1 kill and if 2 it should be kills. show only 10 ladder. /* 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; */ fayon,90,115,5 script Sample 757,{ 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; } ------------------------------------ this is what ive done but i have question about insert to SQL because this is no inseret job class. and i want to put waitingroom with name of the top 1. /* CREATE TABLE IF NOT EXISTS `mvp_ladder` ( `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,164,174,2 script MvP Ladder 784,{ query_sql( "SELECT `name`,`class`,`Count` FROM `mvp_ladder` ORDER BY `Count` DESC LIMIT 10",.@Name$,.@Job$,.@Count ); if( getarraysize( .@Name$ ) ){ for( set .@i,0; .@i < getarraysize( .@Name$ ); set .@i,.@i + 1 ) mes "^0000FF"+( .@i + 1 )+".^228B22"+.@Name$[.@i]+"^606060"+.@Job$[.@i]+"^FF0000"+.@Count[.@i]+" MvP's^000000"; }else{ mes "No Record Found."; } close; OnInit: setarray .mvp_list[0], 1038, // Osiris 1039, // Baphomet 1046, // Doppelganger 1059, // Mistress 1086, // Golden Thief Bug 1087, // Orc Hero 1096, // Angeling 1112, // Drake 1115, // Eddga 1120, // Ghostring 1147, // Maya 1150, // Moonlight Flower 1157, // Pharaoh 1159, // Phreeoni 1190, // Orc Lord 1251, // Stormy Knight 1252, // Hatii 1272, // Dark Lord 1312, // Turtle General 1373, // Lord of the Dead 1388, // Arc Angeling 1389, // Dracula 1418, // Evil Snake Lord 1492, // Samurai Specter 1511, // Amon Ra 1582, // Deviling 1583, // Tao Gunka 1623, // RSX-0806 1630, // White Lady 1658, // Egnigem Cenia 1685, // Vesper 1688, // Lady Tanee 1708, // Thanatos Phantom 1719, // Detardeurus 1734, // Kiel D-01 1751, // Valkyrie Randgris 1768, // Gloom Under Night 1779, // Ktullanux 1785, // Atroce 1832, // Ifrit 1871, // Falling Bishop 1873, // Beelzebub 1885, // Gopinich 2022; // Nidhoggur's Shadow for( .@i = 0; .@i < getarraysize( .mvp_list ); .@i++ ) setd( ".mvp_"+.mvp_list ),1; end; OnNPCKillEvent: if( getd( ".mvp_"+.mvp_list ) ) query_sql( "INSERT INTO `mvp_ladder` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1" ); end; } Edited February 6, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 6, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 6, 2013 try http://pastebin.com/raw.php?i=PFSAJNmf 1 Quote Link to comment Share on other sites More sharing options...
caspa Posted February 6, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share Posted February 6, 2013 try http://pastebin.com/raw.php?i=PFSAJNmf sir how to make this into top 10 or top 20 only? Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 6, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 6, 2013 working but Emistry how about waitingroom that display the top 1? Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 6, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 6, 2013 1 Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 6, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 6, 2013 Emistry how about waiting room? that display the top 1 his name and kills Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 6, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 6, 2013 try http://pastebin.com/raw.php?i=j3matjSB it update every hour.. 1 Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 6, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 6, 2013 (edited) found bug. all monster not on the list of mvp is counted on this ladder.. please how to fix this? Edited February 6, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 6, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 6, 2013 http://pastebin.com/raw.php?i=jCdE6Gn1 1 Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 7, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 7, 2013 fixed! thanks Emistry. Quote Link to comment Share on other sites More sharing options...
Question
Cisqua
please help me to put job_class to this ladder?
for eg: 1: Player1 [ Champion ] - 1 kill and if 2 it should be kills.
show only 10 ladder.
------------------------------------
this is what ive done but i have question about insert to SQL because this is no inseret job class.
and i want to put waitingroom with name of the top 1.
Edited by CisquaLink to comment
Share on other sites
9 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.