top 5 player
/*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;}
yes my mvp is f_valkyriehmm ... 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 ...
How to remove the old one i already inject in sql?http://upaste.me/ae2821775660dbe55I just noticed that sometimes you use `mvp_rank` and sometimes use `custom_mvp_rank`make sure there is only 1 type
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
/*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;}
// 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
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
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.@@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
hard to say @@AnnieRuruseriously ... HOW OLD IS YOUR EMULATOR !?
http://upaste.me/1b11218565c0a4a4b
I think your host is irresponsible
your server is not using latest hercules
We use essential cookies to make this site work, and optional cookies to enhance your experience.