Jump to content
  • 0

adding job for mvp ladder.


Cisqua

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

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 by Cisqua
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

sir how to make this into top 10 or top 20 only?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

working but Emistry how about waitingroom that display the top 1?

Link to comment
Share on other sites


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

0KFD2Cm.jpg
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

Emistry how about waiting room? that display the top 1 his name and kills

Link to comment
Share on other sites


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

try

http://pastebin.com/raw.php?i=j3matjSB

it update every hour..

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

found bug.

all monster not on the list of mvp is counted on this ladder.. please how to fix this?

Edited by Cisqua
Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

fixed! thanks Emistry.

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