Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    51

Community Answers

  1. Capuche's post in Unique Item Signer was marked as the answer   
    Our system take all the slots to signed the item so
    It's not possible
  2. Capuche's post in baby woe loadevent was marked as the answer   
    It doesn't work because of
    if (.Maps$[.@c] != strcharinfo(3)) end; - script babywoe -1,{ OnPCLoadMapEvent: if ( compare( "gefg_cas04|aldeg_cas04",strcharinfo(3) ) != 0 && eaclass()&EAJL_BABY == 0 ) {// "gefg_cas04|aldeg_cas04" yours woe maps warp "celerian",33,73;// just a custom map 'Celerian' dispbottom "Only Baby Class is allowed to enter."; } end; } aldeg_cas04 mapflag loadevent gefg_cas04 mapflag loadevent
  3. Capuche's post in Disable Item Consumtion for Particular Class in Particular Map was marked as the answer   
    678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else if ( strcharinfo(3) != "bat_b01" && strcharinfo(3) != "prt_pvp" ) percentheal -100,-100; },{},{} your should working, I'm just maniac
  4. Capuche's post in job changer with no trans and no 3rd job was marked as the answer   
    prontera,150,183,5 script test 56,{ if ( Class > 20 ) end; mes "do you want to become..?"; next; if ( Class == Job_Novice ) { for ( .@i = 1; .@i <= 6; .@i++ ) .@menu$ = .@menu$ + jobname(.@i) +":"; jobchange select( .@menu$ ); else { .@eac = eaclass(); setarray .@class[1], roclass( .@eac|EAJL_2_1 ), roclass( .@eac|EAJL_2_2 ); .@s = select( jobname( .@class[1] ), jobname( .@class[2] ) ); jobchange .@class[.@s]; } mes "you are now "+ jobname( Class ); close; } another way should be to write a high value in the option of the jobmaster in the repo
    setarray .Rebirth[0],9999999999,50; // Minimum base level, job level to rebirth OR change to third class
  5. Capuche's post in Breeder NPC was marked as the answer   
    It seems this script already give a peco to knight and crus class
    else setriding;
  6. Capuche's post in Monster Hunting Event was marked as the answer   
    prontera,150,180,5 script Hunter monster 87,{
    end;
    OnEvent:
    waitingroom "Mob to hunt: "+ getmonsterinfo( getvariableofnpc( .monster_hunt_id,"atcmd_monsterhunt" ),0 ) + " (ID: " + getvariableofnpc( .monster_hunt_id,"atcmd_monsterhunt" ) + ")",0;
    }
    - script atcmd_monsterhunt -1,{
    OnInit:
    bindatcmd "monsterhunt",strnpcinfo(3)+"::OnCmd";
    end;
    OnCmd:
    if ( .monster_hunt_id == 0 && ( .@atcmd_numparameters == 0 || .@atcmd_parameters$[0] == "on" || .@atcmd_parameters$[0] == "off" ) )
    dispbottom "there is none monster to hunt";
    else if ( .@atcmd_numparameters == 0 )
    dispbottom "the new monster to hunt is " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ")";
    else if ( .@atcmd_parameters$[0] == "on" ) {
    if ( @display_message == 0 )
    dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") already display a message";
    else {
    dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") will display a message";
    @display_message = 0;
    }
    }
    else if ( .@atcmd_parameters$[0] == "off" ) {
    if ( @display_message == 1 )
    dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") already don't display a message";
    else {
    dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") won't display a message";
    @display_message = 1;
    }
    }
    else if ( getgmlevel() >= 25 ) {
    if ( .@atcmd_parameters$[0] == "0" ) {
    dispbottom "you stop the hunt";
    .monster_hunt_id = 0;
    delwaitingroom "Hunter monster";
    }
    else {
    .@mob_name$ = getmonsterinfo( atoi(.@atcmd_parameters$[0]),0 );
    if ( .@mob_name$ == "null" )
    dispbottom "wrong mob id";
    else {
    .monster_hunt_id = atoi(.@atcmd_parameters$[0]);
    dispbottom "the new monster to hunt is "+ .@mob_name$ + " (ID: " + .monster_hunt_id + ")";
    donpcevent "Hunter monster::OnEvent";
    }
    }
    }
    else
    dispbottom "@" + .@atcmd_command$ + " failed. @" + .@atcmd_command$ + " to display the mob to hunt. @" + .@atcmd_command$ + " on/off to display a message killing the mob";
    end;
    OnNPCKillEvent:
    if ( .monster_hunt_id == 0 || killedrid != .monster_hunt_id ) end;
    if ( hunter_points >= 1000 && @display_message == 0 )
    message strcharinfo(0), "you can exceed 1000 hunters points (you have " + hunter_points + " hunters points)";
    else if ( hunter_points < 1000 ) {
    hunter_points++;
    if ( @display_message == 0 )
    message strcharinfo(0), "you have now " + hunter_points + " hunters points for killing a " + getmonsterinfo( .monster_hunt_id,0 );
    }
    end;
    }

  7. Capuche's post in woe points counter was marked as the answer   
    nothing happen when the ladder is empty
     
    indeed I made a mistake. For eathena it should be a close instead of end
    query_sql "update guild set woe_points = 0"; end; this script use the variable of euphy's woe controller..
  8. Capuche's post in multiple castles was marked as the answer   
    - script Sample -1,{
    OnPCLoadMapEvent:
    .@map$ = strcharinfo(3);
    if ( .@map$ == "guild_vs1" || .@map$ == "guild_vs2" || .@map$ == "guild_vs3" ) {
    query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '" +getcharid(2)+ "'",.@c;
    if ( .@c > 30 ) {
    message strcharinfo(0),"Your guild members are over the limit";
    sleep2 2000;
    warp "prontera",150,150;
    }
    }
    end;
    }
    guild_vs1 mapflag loadevent
    guild_vs2 mapflag loadevent
    guild_vs3 mapflag loadevent

  9. Capuche's post in Run this script on multiple maps and allows max. 2 clients/IPs? was marked as the answer   
    - script WoE_IP_Kick -1,{
    OnInit:
    setmapflag "prtg_cas01", mf_loadevent;
    setmapflag "prtg_cas02", mf_loadevent;
    setmapflag "prtg_cas03", mf_loadevent;
    set .map_list$, "prtg_cas01 | prtg_cas02 | prtg_cas03";
    set .whitelist$, "127.0.0.1 | xx.xx.xx.xx";
    end;
    // Trigger when a player enters a map with "loadevent" mapflag.
    OnPCLoadMapEvent:
    // Only run for map in the list.
    if ( compare( .map_list$,strcharinfo(3) ) == 0 ) end;
    set .@my_ip$, getcharip();
    if ( compare( .whitelist$,.@my_ip$ ) )
    .@right = 2;
    else
    .@right = 1;
    // Get list of name online with attached character's IP address.
    set .@size, query_sql("SELECT `char`.`name` FROM `login` join `char` on `char`.account_id = login.account_id WHERE online = 1 and `last_ip` = '"+ .@my_ip$ +"' and `char`.`account_id` != "+ getcharid(3), .@name$ );
    // Passed check if only the attached player is returned.
    if ( .@size < .@right ) end;
    setd ".@count_"+ strcharinfo(3), 1;
    // Check all online characters using the IP address if they are on a Battlegrounds map.
    for( ; .@i<.@size; set .@i,.@i+1) {
    getmapxy .@map$, .@x, .@y, 0, .@name$[.@i];
    if ( compare( .map_list$,.@map$ ) ) {
    setd ".@count_"+ .@map$, getd( ".@count_"+ .@map$ ) +1;
    setd ".@name_"+ .@map$ +"$", getd( ".@name_"+ .@map$ +"$" ) + .@name$[.@i] + ( ( getd( ".@name_"+ .@map$ +"$" ) == "" && .@right == 2 ) ? "," : "" );
    if ( getd( ".@count_"+ .@map$ ) == .@right +1 ) {
    message strcharinfo(0),"Characters "+ getd( ".@name_"+ .@map$ +"$" ) +" already present in a map with your IP. Kicking....";
    sleep2 2000;
    atcommand "@kick "+ strcharinfo(0);
    end;
    }
    }
    }
    // Passed check.
    end;
    }

  10. Capuche's post in Mail Request ! was marked as the answer   
    - script atcmd_mail -1,{
    OnInit:
    bindatcmd "mailall",strnpcinfo(3)+"::OnMailall",99,99;
    bindatcmd "guildmail",strnpcinfo(3)+"::OnGuildmail",99,99;
    end;
    OnMailall:
    .name$ = strcharinfo(0);
    if ( getiteminfo( atoi( .@atcmd_parameters$[0] ),0 ) == -1 ) {
    message .name$, "invalid item id";
    end;
    }
    if ( atoi( .@atcmd_parameters$[1] ) < 1 )
    .@atcmd_parameters$[1] = "1";
    query_sql( "INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) select "+
    "'no-reply',"+
    "`char_id`"+
    ",'GM reward',"+
    "'You got a mail from "+ .name$ +"',"+
    .@atcmd_parameters$[0] +","+ .@atcmd_parameters$[1] +",0,0,UNIX_TIMESTAMP(NOW()) from `char` where online = 1 and char_id != "+ getcharid(0) );
    addrid 0;
    if ( strcharinfo(0) != .name$ )
    message strcharinfo(0), "You got a mail from "+ .name$;
    end;
    OnGuildmail:
    .name$ = strcharinfo(0);
    if ( getiteminfo( atoi( .@atcmd_parameters$[0] ),0 ) == -1 ) {
    message .name$, "invalid item id";
    end;
    }
    if ( atoi( .@atcmd_parameters$[1] ) < 1 )
    .@atcmd_parameters$[1] = "1";
    query_sql "select guild_id from guild where name = '"+ escape_sql( .@atcmd_parameters$[2] ) +"'", .@guild_id;
    if ( .@guild_id == 0 ) {
    message .name$, "wrong guild name";
    end;
    }
    query_sql( "INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) select "+
    "'no-reply',"+
    "`char`.`char_id`"+
    ",'GM reward',"+
    "'You got a mail from "+ .name$ +"',"+
    .@atcmd_parameters$[0] +","+ .@atcmd_parameters$[1] +",0,0,UNIX_TIMESTAMP(NOW()) from `char` "+
    "where guild_id = "+ .@guild_id +" and online = 1 and char_id != "+ getcharid(0) );
    addrid 3,0, .@guild_id;
    if ( strcharinfo(0) != .name$ )
    message strcharinfo(0), "You got a mail from "+ .name$;
    end;
    }

  11. Capuche's post in Daily reward giver check for ip was marked as the answer   
    //==================== Informacion ==========================
    //==== Recompensa Diaria==========================
    //*************************************************************************
    //=========================== Conf ==================================================================================
    //********************************************************************************************************************
    prontera,150,206,4 script Prize 563,{
    set .@rewname$,"^0000FF[ Premio Diario ]^000000";
    setarray .items[0],507,506,508,509,510; //items
    .@tick = gettimetick(2);
    if(.@tick - lastTimeTalked > (60 * 60 * 24)) {
    query_sql "select 1 from login join `char` on `char`.account_id = login.account_id join global_reg_value as g on g.char_id = `char`.char_id where last_ip = '"+ getcharip() +"' "+
    "and g.`str` = 'lastTimeTalked' and value > ("+ .@tick +" - 86400)", .@tmp;
    if ( .@tmp == 0 ) {
    mes .@rewname$;
    mes "Wanna get your daily reward?";
    next;
    switch(select("-Yush!:-No,thx!:-Cancel")) {
    case 1:
    set lastTimeTalked,gettimetick(2);
    mes .@rewname$;
    mes "Allright!";
    getitem .items[ rand( getarraysize(.items) ) ], rand( 1,25 );
    close;
    case 2:
    mes .@rewname$;
    mes "Okay bye!";
    close;
    case 3:
    close;
    }
    }
    }
    mes .@rewname$;
    mes "Sry "+strcharinfo(0)+", you already got this";
    mes "Wait 24 hours!!";
    close;
    }

  12. Capuche's post in Help with my script. was marked as the answer   
    rand(100) throws a number between 0 and 99 and you don't give any item when it throws 0
    here my view
    function script randbox { getitem 32020,1; mes "Do you really want to open one(1) Lottery Box?"; mes "^FF0000NOTE: Dont press cancel(beside OK) or the box will be gone.^000000"; mes "No refund will be given if you do so."; //next; if ( select("Yes Please:No! Not yet!") == 2 ) close; // setarray .@box1, "chance", item id, amount... setarray .@box1, 5, 32008,1, 32009,1, 32010,1, 32011,1, 32012,1, 32013,1; setarray .@box2, 10,32025,1, 8400,2, 8403,2, 8402,6, 607,25, 8400,10, 8402,20, 8403,8, 32025,3; setarray .@box3, 20,32007,1, 32006,1, 32005,1, 32004,1, 32003,1, 32002,1; // etc.. delitem 32020,1; set .@r, rand(100); while( .@r >= getd( ".@box"+ .@i ) ) .@i++; .@rand_index = rand( ( getarraysize( getd( ".@box"+ .@i ) ) -1 )/2 ) *2 -1; getitem getd( ".@box"+ .@i +"["+ .@rand_index +"]" ), getd( ".@box"+ .@i +"["+ (.@rand_index +1) +"]" ); emotion e_grat,1; close; }
  13. Capuche's post in Put people in a party/ BG group was marked as the answer   
    maybe this
  14. Capuche's post in Guild Pack NPC Giver (Help please) was marked as the answer   
    Thinking about it now, I should set an account variable to prevent the player using an ip dynamic
    /* CREATE TABLE IF NOT EXISTS `guildpack` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(100) NOT NULL default '', PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM; */ //====================================================================================================== prontera,130,172,5 script Guild Pack Info 468,{ if ( getcharid(2) == 0 ) { mes "You have no guild!"; close; } if ( #gpack || callsub( L_check ) ) { #gpack = 1; mes "^616D7EYou already given a Guild Package"; close; } mes "[Guild Pack NPC]"; mes "Hello there, it seems you are claiming for a Guild Pack."; next; mes "[Guild Pack NPC]"; mes "Let me gift you a guild pack for joining and"; mes "playing in Lunar RO, we hope you enjoy them."; next; mes "These guild pack is not duplicable and not dropable."; next; switch(select("Yes:No")) { case 1: .@myip$ = getcharip(); if ( callsub( L_check ) ) { mes "^616D7EIt seems you have same IP Address among Guild Mates: ^ff0000" + .@myip$ + "^000000. Sorry, but its not allowed."; close; } query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@myip$ + "')"); //THIS PART WERE all items they will get getitem 29828,1; getitem 29851,1; getitem 29868,1; getitem 29834,1; getitem 29804,1; getitem 29835,1; getitem2 5170,1,1,7,0,0,0,0,0; getitem2 2319,1,1,7,0,4141,0,0,0; getitem2 2114,1,1,7,0,4058,0,0,0; getitem2 2528,1,1,7,0,4133,0,0,0; getitem2 2424,1,1,7,0,4097,0,0,0; getitem 2607,2; getitem 4035,5; getitem 4064,2; getitem 4079,2; getitem 14175,1; getitem 671,1; getitem 607,300; getitem 12045,100; getitem 12060,100; getitem 12050,100; getitem 12055,100; getitem 12065,100; getitem 12070,100; set #gpack, 1; warp "prontera",156,172; close; case 2: mes "^616D7ENevermind~, You can come back again later!"; close; } end; L_check: return query_sql("SELECT 1 FROM `guildpack` join login on login.`last_ip` = `guildpack`.`last_ip` where login.account_id = "+ getcharid(3), .@tmp ); OnInit: waitingroom "Guild Package",0; end; }
  15. Capuche's post in restricting item to a certain map was marked as the answer   
    Mapflag#restricted.txt
  16. Capuche's post in [R] PvP Nightmare Mode Drop Items was marked as the answer   
    Mapflag#pvp_nightmaredrop ?
  17. Capuche's post in Change Birthday Script? was marked as the answer   
    prontera,150,150,5 script sdfghjhgfd 56,{
    query_sql "select birthdate from login where account_id = "+ getcharid(3), .@birthdate$;
    mes "you know what? i'm a mind reader";
    mes "I know you are a "+ ( Sex ? " handsome man" : " beautiful lady" ) +" born in ^ff0000"+ .@birthdate$ +"^000000.";
    mes "Your underwear color is.. what? ok i stop it";
    next;
    if ( select( "Change my birthdate", "Bye" ) == 2 ) close;
    mes "Really? well tell me your new birthdate - format 0000-00-00 thanks";
    input .@string$;
    next;
    explode( .@tmp$, .@string$, "-" );
    if( getarraysize( .@tmp$ ) != 3 ||
    getstrlen(.@tmp$[0]) != 4 || atoi(.@tmp$[0]) < 1 ||
    getstrlen(.@tmp$[1]) != 2 || atoi(.@tmp$[1]) < 1 ||
    getstrlen(.@tmp$[2]) != 2 || atoi(.@tmp$[2]) < 1 ) {
    mes "wrong format bye";
    close;
    }
    query_sql "update login set birthdate = '"+ escape_sql( .@string$ ) +"' where account_id = "+ getcharid(3);
    mes "done";
    close;
    }

  18. Capuche's post in Job Changer with no Rebirth was marked as the answer   
    A quick mod
    [paste=4zf2yxj5yh7q]
    You didn't specify the base level to change Lord Knight or Rune Knight (non trans) > Rune Knight (trans) so it's still 99
  19. Capuche's post in Mvp Summoner Bugs was marked as the answer   
    Like in the bug tracker it seems you're stuck because you miss the F_InsertPlural function (line https://github.com/rathena/rathena/blob/master/npc/custom/events/mvp_ladder.txt#L26 )
     
    I suggest to delete your current npc\other\Global_Functions.txt file then download a new one
    https://github.com/rathena/rathena/blob/master/npc/other/Global_Functions.txt
  20. Capuche's post in was marked as the answer   
    *   92 :                         while(getarraysize(getd(".@item"+@i)) > @w) { set .@itemw$,.@itemw <------------ // issue here ; the console say parse_line: need ';'
  21. Capuche's post in Battleground Vg was marked as the answer   
    [paste=5ftv70olkmdg]
  22. Capuche's post in What's the right query_sql for this?... was marked as the answer   
    query_sql( "SELECT `Count` FROM `E-MVPRank` where `name`= '" + escape_sql( strcharinfo(0) ) + "'", .@Count ); nb
    cancel: mes .ahmel$; mes "Okay, goodluck hunting MVPs!"; end; close; you will be stuck by the mes window because of the end, you just need close
  23. Capuche's post in Need Help to modification this script was marked as the answer   
    - script login_reward -1,{
    OnPCLoginEvent:
    addtimer 3600, strnpcinfo(3) + "::Onijnuionion";
    end;
    Onijnuionion:
    .@pow = 1 << 10;

  24. Capuche's post in can only vend in town. was marked as the answer   
    Mapflag#novending
  25. Capuche's post in npc script shows errors after updating to rev 17692 was marked as the answer   
    "Transform my "+getitemname(.1stWingID)+" to "+getitemname(.2ndWingID)+"",transform','"Nothing sir!",notnow; transform command is now implemented. Use another word for your label.
    if (petstat '('PET_CLASS)) { petstat doesn't exist anymore. Use getpetinfo
×
×
  • Create New...