Jump to content
  • 0
Sign in to follow this  
minx123

[REQ] top leader custom mvp hunter.

Question

i need some help to get this script..

 

every Sunday player who are the top kill custom mvp will get reward.

only custom mvp not normal mvp

auto reset every sunday.

 

 

Share this post


Link to post
Share on other sites

16 answers to this question

Recommended Posts

  • 0

@@minx123

 

How many top players? Which MVPs? What does reset? The MVP? The Toplist? Both?

 

top 5 player

mvp Valkyrie

every sunday 12am will reset count.

time to claim reward in 1 day.

Share this post


Link to post
Share on other sites
  • 0

reference ....

http://herc.ws/board/topic/4552-mvp-ladder-script-enhancement/

 

so ...

/*alter table `char` add column custom_mvp_rank int(11) default 0 after hotkey_rowshift, add index (custom_mvp_rank);*/-	script	ajdhkasdj	FAKE_NPC,{OnInit:	if ( $mvp_ladder_last_given == atoi( gettime(7) +""+ gettime(6) ) ) end;	goto L_give;OnClock0000:	if ( gettime(5) != 1 ) end;L_give:	.@nb = query_sql( "select char_id, name, custom_mvp_rank from `char` where custom_mvp_rank > 0 order by custom_mvp_rank desc limit 5", .@cid, .@name$, .@killed );	if ( !.@nb ) end;	setarray .@reward, 501, 502, 503, 504, 505; // <1st place>, <2nd place>, <3rd place> ... 	setarray .@amount, 10, 9, 8, 7, 6;	for ( .@i = 0; .@i < .@nb; .@i++ )		query_sql "insert into mail ( send_name, dest_id, title, message, nameid, amount, identify, zeny, time ) values ( '"+ escape_sql( .@name$[.@i] ) +"', "+ .@cid[.@i] +", '[MVP RANK]', 'Congratulations for earning No. "+( .@i +1 )+" position in killing Custom MVPs. Here is your reward.', "+ .@reward[.@i] +", "+ .@amount[.@i] +", 1, 0, unix_timestamp( now() ) )";	query_sql "update `char` set custom_mvp_rank = 0"; // reset the ladder	$mvp_ladder_last_given = atoi( gettime(7) +""+ gettime(6) );	end;OnNPCKillEvent:	if ( killedrid == G_RANDGRIS ) // 1765		query_sql "update `char` set custom_mvp_rank = custom_mvp_rank +1 where char_id = "+ getcharid(0);	end;}
Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0
/*alter table `char` add column mvp_rank int(11) default 0 after delete_date, add index (mvp_rank);create table mvp_rank_archive (`date` datetime,pos tinyint(4) unsigned,cid int(11) unsigned default 0,name varchar(23) default '',points int(11) unsigned not null,primary key ( `date`, pos )) engine innodb;*/mid_campin,376,127,3    script    MVP Ladder    100,{    mes "[MVP Ladder]";    mes "Hello!";    mes "What are you doing here?";    next;    switch(select("Check rankings.:My stats.:Previous Month ranking")) {    case 1:        mes "[MVP Ladder]";        mes "Rankings :->";        .@nb = query_sql( "select name, mvp_rank from `char` where mvp_rank > 0 order by mvp_rank desc limit 10", .@name$, .@count );        if ( !.@nb ) {            mes "no entry";            close;        }        for ( .@i = 0; .@i < .@nb; .@i++ )            mes ( .@i +1 )+". "+ .@name$[.@i] +" -> "+ .@count[.@i] +" points";        close;    case 2:        query_sql "select mvp_rank from `char` where char_id = "+ getcharid(0), .@killed;        mes "[MVP Ladder]";        mes "You have killed "+ .@killed +" MVPs";        close;    case 3:        mes "[MVP Ladder]";        mes "Last month ranking";        if ( gettime(6) > 10 )            .@store_date$ = gettime(7) +"-"+( gettime(6) -1 )+"-00 00:00:00";        else if ( gettime(6) > 1 )            .@store_date$ = gettime(7) +"-0"+( gettime(6) -1 )+"-00 00:00:00";        else            .@store_date$ = ( gettime(7) -1 ) +"-12-00 00:00:00";        .@nb = query_sql( "select name, points from mvp_rank_archive where `date` = '"+ .@store_date$ +"' order by pos", .@name$, .@count );        if ( !.@nb ) {            mes "no entry";            close;        }        for ( .@i = 0; .@i < .@nb; .@i++ )            mes ( .@i +1 )+". "+ .@name$[.@i] +" -> "+ .@count[.@i] +" points";        close;    }    close;OnInit:    if ( $mvp_ladder_last_given == atoi( gettime(7) +""+ gettime(6) ) ) end;    goto L_give;OnClock0000:    if ( gettime(5) != 1 ) end;L_give:    .@nb = query_sql( "select char_id, name, custom_mvp_rank from `char` where custom_mvp_rank > 0 order by custom_mvp_rank desc limit 5", .@cid, .@name$, .@killed );    if ( !.@nb ) end;    setarray .@reward, 30316, 7227, 7227, 7227, 7227; // <1st place>, <2nd place>, <3rd place> ...    setarray .@amount, 1, 50, 25, 10, 5;    for ( .@i = 0; .@i < .@nb; .@i++ )        query_sql "insert into mail ( send_name, dest_id, title, message, nameid, amount, identify, zeny, time ) values ( '"+ escape_sql( .@name$[.@i] ) +"', "+ .@cid[.@i] +", '[MVP RANK]', 'Congratulations for earning No. "+( .@i +1 )+" position in killing Custom MVPs. Here is your reward.', "+ .@reward[.@i] +", "+ .@amount[.@i] +", 1, 0, unix_timestamp( now() ) )";    query_sql "update `char` set custom_mvp_rank = 0"; // reset the ladder    $mvp_ladder_last_given = atoi( gettime(7) +""+ gettime(6) );    end;OnNPCKillEvent:    if ( killedrid == f_valkyrie ) // 1765        query_sql "update `char` set custom_mvp_rank = custom_mvp_rank +1 where char_id = "+ getcharid(0);    end;}

it is like this? @@AnnieRuru

when i load. npc don't have button close.

i stuck when choosing.

 

Edited by minx123

Share this post


Link to post
Share on other sites
  • 0

hmm ... don't tell me that you didn't make run the sql query ?

 

did your map_server.exe says something like sql table didn't exist ?

 

 

EDIT:

I just saw this line

if ( killedrid == f_valkyrie )
so your custom mvp SpriteName is f_valkyrie ?

if you not sure about that, better stick to mob_id ...

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

hmm ... don't tell me that you didn't make run the sql query ?

 

did your map_server.exe says something like sql table didn't exist ?

 

 

EDIT:

I just saw this line

if ( killedrid == f_valkyrie )
so your custom mvp SpriteName is f_valkyrie ?

if you not sure about that, better stick to mob_id ...

yes my mvp is f_valkyrie

id 2545

 

i already run in sql.. nothing error detect.

Share this post


Link to post
Share on other sites
  • 0

if you used the sql syntax in post#5

then use my npc script in post#8

then use notepad++

 

replace all

custom_mvp_rank

into

mvp_rank

 

that should work

Share this post


Link to post
Share on other sites
  • 0

if you used the sql syntax in post#5

then use my npc script in post#8

then use notepad++

 

replace all

custom_mvp_rank

into

mvp_rank

 

that should work

30kf6ns.png

 

/*alter table `char` add column mvp_rank int(11) default 0 after hotkey_rowshift, add index (mvp_rank);create table mvp_rank_archive (`date` datetime,pos tinyint(4) unsigned,cid int(11) unsigned default 0,name varchar(23) default '',points int(11) unsigned not null,primary key ( `date`, pos )) engine innodb;*/prontera,158,176,3	script	MVP Ladder	1_F_MARIA,{    mes "[MVP Ladder]";    mes "Hello!";    mes "What are you doing here?";    next;    switch(select("Check rankings.:My stats.:Previous Month ranking")) {    case 1:        mes "[MVP Ladder]";        mes "Rankings :->";        .@nb = query_sql( "select name, mvp_rank from `char` where mvp_rank > 0 order by mvp_rank desc limit 5", .@name$, .@count );        if ( !.@nb ) {            mes "no entry";            close;        }        for ( .@i = 0; .@i < .@nb; .@i++ )            mes ( .@i +1 )+". "+ .@name$[.@i] +" -> "+ .@count[.@i] +" points";        close;    case 2:        query_sql "select mvp_rank from `char` where char_id = "+ getcharid(0), .@killed;        mes "[MVP Ladder]";        mes "You have killed "+ .@killed +" MVPs";        close;    case 3:        mes "[MVP Ladder]";        mes "Last month ranking";        if ( gettime(MONTH) > 10 )            .@store_date$ = gettime(YEAR) +"-"+( gettime(MONTH) -1 )+"-00 00:00:00";        else if ( gettime(MONTH) > 1 )            .@store_date$ = gettime(YEAR) +"-0"+( gettime(MONTH) -1 )+"-00 00:00:00";        else            .@store_date$ = ( gettime(YEAR) -1 ) +"-12-00 00:00:00";        .@nb = query_sql( "select name, points from mvp_rank_archive where `date` = '"+ .@store_date$ +"' order by pos", .@name$, .@count );        if ( !.@nb ) {            mes "no entry";            close;        }        for ( .@i = 0; .@i < .@nb; .@i++ )            mes ( .@i +1 )+". "+ .@name$[.@i] +" -> "+ .@count[.@i] +" points";        close;    }    close;OnInit:    if ( $mvp_ladder_last_given == atoi( gettime(YEAR) +""+ gettime(MONTH) ) ) end;    goto L_give;OnClock0000:    if ( gettime(DAYOFMONTH) != 1 ) end;L_give:    .@nb = query_sql( "select char_id, name, mvp_rank from `char` where mvp_rank > 0 order by mvp_rank desc limit 5", .@cid, .@name$, .@killed );    if ( !.@nb ) end;    setarray .@reward, 30316, 7227, 7227, 7227, 7227; // <1st place>, <2nd place>, <3rd place> ...    setarray .@amount, 1, 50, 25, 10, 5;    for ( .@i = 0; .@i < .@nb; .@i++ )        query_sql "insert into mail ( send_name, dest_id, title, message, nameid, amount, identify, zeny, time ) values ( '"+ escape_sql( .@name$[.@i] ) +"', "+ .@cid[.@i] +", '[MVP RANK]', 'Congratulations for earning No. "+( .@i +1 )+" position in killing Custom MVPs. Here is your reward.', "+ .@reward[.@i] +", "+ .@amount[.@i] +", 1, 0, unix_timestamp( now() ) )";    query_sql "update `char` set mvp_rank = 0"; // reset the ladder    $mvp_ladder_last_given = atoi( gettime(YEAR) +""+ gettime(MONTH) );    end;OnNPCKillEvent:    if ( killedrid == f_valkyrie) // 2545        query_sql "update `char` set mvp_rank = mvp_rank +1 where char_id = "+ getcharid(0);    end;}

Share this post


Link to post
Share on other sites
  • 0

nvm let's do it all over again

 

run all these 5 sql commands, wipe all the previous data

run them all even if it pop errors, from top to bottom

alter table `char` drop column mvp_rank;alter table `char` drop column custom_mvp_rank;alter table `char` add column mvp_rank int(11) default 0 after hotkey_rowshift, add index (mvp_rank);drop table mvp_rank_archive;create table mvp_rank_archive (`date` datetime,pos tinyint(4) unsigned,cid int(11) unsigned default 0,name varchar(23) default '',points int(11) unsigned not null,primary key ( `date`, pos )) engine innodb;
.

 

then this script

http://upaste.me/b2c021831366b20b4

 

.

 

then copy this into your dbconst.txt

// gettime( <param> )SECOND	1MINUTE	2HOUR	3WEEKDAY	4DAYOFMONTH	5MONTH	6YEAR	7DAYOFYEAR	8// WeekdaySUNDAY	0MONDAY	1TUESDAY	2WEDNESDAY	3THURSDAY	4FRIDAY	5SATURDAY	6// MonthJANUARY	1FEBRUARY	2MARCH	3APRIL	4MAY	5JUNE	6JULY	7AUGUST	8SEPTEMBER	9OCTOBER	10NOVEMBER	11DECEMBER	12
Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

nvm let's do it all over again

 

run all these 5 sql commands, wipe all the previous data

run them all even if it pop errors, from top to bottom

alter table `char` drop column mvp_rank;alter table `char` drop column custom_mvp_rank;alter table `char` add column mvp_rank int(11) default 0 after hotkey_rowshift, add index (mvp_rank);drop table mvp_rank_archive;create table mvp_rank_archive (`date` datetime,pos tinyint(4) unsigned,cid int(11) unsigned default 0,name varchar(23) default '',points int(11) unsigned not null,primary key ( `date`, pos )) engine innodb;
.

 

then this script

http://upaste.me/b2c021831366b20b4

 

.

 

then copy this into your dbconst.txt

// gettime( <param> )SECOND	1MINUTE	2HOUR	3WEEKDAY	4DAYOFMONTH	5MONTH	6YEAR	7DAYOFYEAR	8// WeekdaySUNDAY	0MONDAY	1TUESDAY	2WEDNESDAY	3THURSDAY	4FRIDAY	5SATURDAY	6// MonthJANUARY	1FEBRUARY	2MARCH	3APRIL	4MAY	5JUNE	6JULY	7AUGUST	8SEPTEMBER	9OCTOBER	10NOVEMBER	11DECEMBER	12

 

 

how to wipe previous data?

 

 

after i follow your step.

21eq0ev.jpg

Edited by minx123

Share this post


Link to post
Share on other sites
  • 0

@@minx123

it seems like you don't even know how to use SQL command

did you actually pay someone to setup the server for you ?

.

.

Suddenly I remember I did TXT style ladder years ago

its time to dig it up and use it here

 

http://upaste.me/c8d12185033897498

 

1 script do all

Share this post


Link to post
Share on other sites
  • 0

@@minx123

it seems like you don't even know how to use SQL command

did you actually pay someone to setup the server for you ?

.

.

Suddenly I remember I did TXT style ladder years ago

its time to dig it up and use it here

 

http://upaste.me/c8d12185033897498

 

1 script do all

yes i pay to hosting. if have script include sql i will send ticket to hoster and when i ask to teach how, the hoster say let him do. the problem now is my hosting not reply my ticket.

so i need to learn by myself.

 

i have problem with this script.

 

2ppke3c.png

Share this post


Link to post
Share on other sites
  • 0

seriously ... HOW OLD IS YOUR EMULATOR !?

 

http://upaste.me/1b11218565c0a4a4b

 

I think your host is irresponsible

your server is not using latest hercules

 

hard to say @@AnnieRuru

1st month fast reply and responsible

but now silent. my ticket also still not reply.

5 month already since hosting with him.

 

thank you so much @@AnnieRuru

its work like charm. :wub: :wub: :wub:

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.