Jump to content

minx123

Members
  • Content Count

    283
  • Joined

  • Last visited

Posts posted by minx123


  1.  

    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


  2. hello.. i need some help to make newbie npc can give reward to newbie base on ip.

    newbie can choose vk box / diabolus box.

     

    or auto reward when login and can choose.

     

    {	Id: 30233	AegisName: "Valkyries_Box"	Name: "Valkyries Box"	Type: 18	Buy: 20	Weight: 10	Trade: {		nodrop: true		noselltonpc: true		nogstorage: true	}	Script: <" 		getitem 2357,1;		getitem 2524,1;		getitem 2421,1;		getitem 2115,1;		getitem 4305,4;		getitem 4302,1;		getitem 4142,2;		getitem 4047,1;		getitem 4128,1;		getitem 4174,1;		getitem 4131,1;		getitem 969,1000;	">},{	Id: 30234	AegisName: "Diabolus_Box"	Name: "Diabolus Box"	Type: 18	Buy: 20	Weight: 10	Trade: {		nodrop: true		noselltonpc: true		nogstorage: true	}	Script: <" 		getitem 2375,1;		getitem 2433,1;		getitem 2537,1;		getitem 2374,1;		getitem 2729,2;		getitem 4305,4;		getitem 4302,1;		getitem 4142,2;		getitem 4047,1;		getitem 4128,1;		getitem 4174,1;		getitem 4131,1;		getitem 969,1000;	">},

     

     


  3. 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;}

  4. i have some problem when create custom card.

     

    1-when put in weapon the icon change to X

    2-how to disable cuttin? when i press view it will error. what i miss?

    3-data/num2cardillustnametable.txt i dont have in my grf.

    idnum2itemdesctable.txt30321#^4682B4Custom Card^000000Increase +30% physical damage on non-mvp and player enemy.Class: ^777777Card^000000Compound On: ^777777Weapon^000000Weight: ^7777771^000000#idnum2itemdisplaynametable.txt30321#Seville_Windsor_Card#idnum2itemresnametable.txt30321#À̸§¾ø´ÂÄ«µå#cardprefixnametable.txt30321#Strengh#

     

    1o15yq.png


  5.  

    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.


  6. /*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.

     

×
×
  • Create New...

Important Information

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