Jump to content

anjasoleil0

Members
  • Content Count

    77
  • Joined

  • Last visited

Posts posted by anjasoleil0


  1. Hi, I edited this stylist script from euphy's and I was wondering

    How do I 'DISABLE' changing hairstyle color when the hairstyle is past #99?

     

     

     function    script    ValueConvert    {
        set .@num, atoi(""+getarg(0));
        if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
        set .@l, getstrlen(""+.@num);
        for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
            set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
                if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
        }
        return .@num$;
    }
     
     
    -    script    Stylist    -1,{
        .@style = ( select( .npc_menu$ ) - 1 );
        .@style_value = getlook( .look_type[.@style] );
        deletearray .@blacklist;
        switch( .@style ){
            case 0: .@blacklist$ = ","+.blacklist_hairstyle$+","; break;
            case 1: .@blacklist$ = ","+.blacklist_haircolor$+","; break;
            case 2: .@blacklist$ = ","+.blacklist_clothe$+","; break;
            default: break;
        }
     
        .@style_number = .min_style[.@style];
     
        do{
            .@removed = 0;
            if( compare( .@blacklist$,","+.@style_number+"," ) ){
                message strcharinfo(0),"NOTE: This style removed";
                .@removed = 1;
                setlook .look_type[.@style],.min_style[.@style];
            }else{
                if(.look_type == LOOK_HAIR_COLOR){message strcharinfo(0),"DONT";end;}
                setlook .look_type[.@style],.@style_number;
            }
            
            .@next = .@style_number + 1;
            .@prev = .@style_number - 1;
            if( .@next > .max_style[.@style] ) .@next = .min_style[.@style];
            if( .@prev < .min_style[.@style] ) .@prev = .max_style[.@style];
            
            .@select = prompt( "Next - [ ^777777"+.@next+"th Style^000000 ]",
                        "Back - [ ^777777"+.@prev+"th Style^000000 ]",
                        "Jump to a Style",
                        ( .@removed )?"":"^0055FFOkay, I want this "+.menu_name$[.@style]+"^000000" );
                        
            switch( .@select ){
                case 1:    .@style_number = .@next; break;
                case 2:    .@style_number = .@prev; break;
                case 3:    
                    message strcharinfo(0),""+.min_style[.@style]+" ~ "+.max_style[.@style]+"";
                    input .@style_number,.min_style[.@style],.max_style[.@style];
                    break;
                case 4:
                    close;
                default:
                    setlook .look_type[.@style],.@style_value;
                    end;
            }
        }while( .@select != 4 && .@select != 255 );
        close;
     
     
    OnInit:
        // NPC name
        .npc_name$ = "[^0055FF ::: Adv. Stylist ::: ^000000]";
        
        // NPC Mode ( Bitmask )
        //    1 - Enable Hairstyle
        //    2 - Enable Hair Color
        //    4 - Enable Cloth Color
        .npc_mode = 7;
        
        // Menu Name
        setarray .menu_name$,
            "Hair Style",
            "Hair Color",
            "Cloth Color";
        
        // Blacklisted Style for each style.
        .blacklist_hairstyle$ = "";
        .blacklist_haircolor$ = "";
        .blacklist_cloth$ = "143,188,261";
     
        // Dont edit
        setarray .min_style,getbattleflag( "min_hair_style" ),getbattleflag( "min_hair_color" ),getbattleflag( "min_cloth_color" );
        setarray .max_style,getbattleflag( "max_hair_style" ),getbattleflag( "max_hair_color" ),getbattleflag( "max_cloth_color" );
        .menu_size = getarraysize( .menu_name$ );
        setarray .look_type,LOOK_HAIR,LOOK_HAIR_COLOR,LOOK_CLOTHES_COLOR;
        for( .npc_menu$ = ""; .@i < .menu_size; .@i++ )
            .npc_menu$ = .npc_menu$ + ( ( .npc_mode & ( 1 << .@i ) )? .menu_name$[.@i]:"" ) +":";
        end;
     
    }

     


  2. Is there a way to set the 'minimum' cast time?

    This is for a high rate server, and I want to set the minimum cast time for, lets say; Asura Strike, I want to set the minimum cast time to 0.01 second without changing it's current cast time, so people will still put dex on their stats PLUS we would be able to see asura's cast animation.

    Is it possible?


  3. Hi, I have this build manager I got from a friend.

    The build only saves stats though.

    Is there any way I we can make it save and load skills as well?

     

     -    script    Stats Manager    -1,{
    function Get_Menu; function Save_Build; function Load_Build;
        set .@BuildCount,10;    // Number of builds to use
        set .@Save,0;    // Zeny required to save a build
        set .@Load,0;    // Zeny required to load a build
        set .@Rename,0;    // Zeny required to rename a build
        set .@MaxLevel,99;    // Maximum base level (to prevent stat overflow)
        if (BaseLevel < .@MaxLevel) { message strcharinfo(0),"You must be level "+.@MaxLevel+" to use this."; }
        while(1)switch(select("Reset Stats:Reset Skills:Save Build:Load Build:Rename Build:Cancel")) {
     
            case 1:
                resetstatus;
                message strcharinfo(0),"Stat reset done.";
                break;
            case 2:
                if (BaseLevel == 255 ){message strcharinfo(0),"Cannot skill reset if you're level 255";close;}
                if (Class == 4064){message strcharinfo(0),"Please unequip the `Mechanic's Headphones+`";close;}
                resetskill;
                message strcharinfo(0),"Skill reset done.";
                break;
            
            case 3:
                if (.@Save) message strcharinfo(0),"It costs "+.@Save+" Zeny to save a build.";
                set .@Build, Get_Menu(.@BuildCount);
                if (Zeny<.@Save) { message strcharinfo(0),"Not enough Zeny."; break; }
                if (getd("Build_"+.@Build+"$")!="") {
                    message strcharinfo(0),"Overwrite previous build #"+.@Build+"?";
                    if(select("Save new build:Cancel")==2) break; }
                Save_Build(.@Build);
                message strcharinfo(0),"Type a name for your build.";
                input getd("Build_"+.@Build+"n$");
                message strcharinfo(0),"Build #"+.@Build+" ("+getd("Build_"+.@Build+"n$")+") saved.";
                set Zeny, Zeny-.@Save;
                break;
            case 4:
                if (.@Load) message strcharinfo(0),"It costs "+.@Load+" Zeny to load a build.";
                set .@Build, Get_Menu(.@BuildCount);
                if (getd("Build_"+.@Build+"$")=="") {
                    message strcharinfo(0),"No build info found."; break; }
                if (Zeny<.@Load) { message strcharinfo(0),"Not enough Zeny."; break; }
                Load_Build(getd("Build_"+.@Build+"$"));
                message strcharinfo(0),"Build #"+.@Build+" loaded.";
                set Zeny, Zeny-.@Load;
                break;
            case 5:
                if (.@Rename) message strcharinfo(0),"It costs "+.@Rename+" Zeny to rename a build.";
                set .@Build, Get_Menu(.@BuildCount);
                if (getd("Build_"+.@Build+"$")=="") {
                    message strcharinfo(0),"No build info found."; break; }
                if (Zeny<.@Rename) { message strcharinfo(0),"Not enough Zeny."; break; }
                message strcharinfo(0),"Type a new name for Build #"+.@Build+" ("+getd("Build_"+.@Build+"n$")+").";
                input getd("Build_"+.@Build+"n$");
                message strcharinfo(0),"Build #"+.@Build+" renamed.";
                set Zeny, Zeny-.@Rename;
                break;
            case 6:
                close; }
        function Get_Menu {
            set .@menu$,"";
            for(set .@i,1; .@i<=getarg(0); set .@i,.@i+1)
                set .@menu$, .@menu$+"Slot "+.@i+" ("+((getd("Build_"+.@i+"n$")=="")?"^777777empty":"^0055FF"+getd("Build_"+.@i+"n$"))+"^000000):";
            return select(.@menu$); }
        function Save_Build {
            set .@s$,"";
            for(set .@i,13; .@i<19; set .@i,.@i+1)
                set .@s$,.@s$+readparam(.@i)+"|";
            setd "Build_"+getarg(0)+"$", .@s$+StatusPoint;
            return; }
        function Load_Build {
            resetstatus;
            explode(.@s$,getarg(0),"|");
            for(set .@i,0; .@i<6; set .@i,.@i+1)
                statusup2 (.@i+13), atoi(.@s$[.@i])-1;
            set StatusPoint, atoi(.@s$[6]);
            return; }
    }

     

    Build Manager.txt


  4. What is the MySQL data type for the row "birthdate" in the "login" table? It should be DATE. Maybe you have it set to DATETIME?

     

    As of in-game errors, I honestly don't know where and when is used the "birthdate" row. On my server, all accounts have a "0000-00-00" value, which means it probably isn't used.

     

    it IS on datetime... but i haven't change it, shouldn't it be datetime by default? I checked rathena and they too use datetime. And if that's the case, shouldn't I be the only one experiencing this error? Hey thanks for the replies BTW


  5. What do you mean by "lots of sql errors" ? Can you post a screenshot?

     

     

    : DB error - Incorrect date value: '0000-00-00' for column 'birthdate' at row 1
    [Debug]: at c:\users\anjo\desktop\server\src\login\account_sql.c:687 - UPDATE `login` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`group_id`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=?,`character_slots`=?,`pincode`=?,`pincode_change`=? WHERE `account_id` = '1'

     

    I can run the server and all, I've already finished off the sqls and such, but I get db errors on server side, I'm afraid this would cause errors in-game. Any thoughts?


  6.  

    According to MySQL documentation, it is possible to assign a default value to the "datetime" data type since MySQL 5.6.5. Maybe you have an older version?

     

    In the end, it's just the default value. This value should *technically* never appear, so you could just remove the default value :

     

    `time` DATETIME NOT NULL,
    

     

    Thanks for the reply, but it's not just that, I've been getting lots of sql errors besides that, and I'm not quite sure why, I tried the new git and my old server files, im getting the same error, perhaps I have a different version of sql? but i doubt it, 

    MySQL Version: 5.7.9 --- my sql

  7. Error

    SQL query: dot.gif

     

    CREATE TABLE IF NOT EXISTS `charlog` (

    `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',

    `char_msg` VARCHAR(255) NOT NULL DEFAULT 'char select',

    `account_id` INT(11) NOT NULL DEFAULT '0',

    `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `char_num` TINYINT(4) NOT NULL DEFAULT '0',

    `name` VARCHAR(23) NOT NULL DEFAULT '',

    `str` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `agi` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `vit` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `INT` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `dex` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `luk` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `hair` TINYINT(4) NOT NULL DEFAULT '0',

    `hair_color` INT(11) NOT NULL DEFAULT '0'

    ) ENGINE=MyISAM

     

    MySQL said: dot.gif

    #1067 - Invalid default value for 'time'

     

    If I change the value of time, I'm afraid it's gonna cause troubles with the clientside. Any thoughts?


  8. @@anjasoleil0

     

    i tried to test it and this is the result, i remember when i used rA and i got the same problem like yours

     

     

    @@anjasoleil0 maybe try to remove this line 

     

    trunk/src/map/skill.c

    recompile after changing

    [cbox] case GS_DESPERADO:

    if (rnd()%100 < src->val1)

    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);

    break;[/cbox]

     

    put // in if (rnd()%100 < src->val1)

     

     

     

    I tried it and got the same result, i prolly 

     

     

    case GS_DESPERADO:
     // if (rnd()%100 < src->val1)
    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
    break;
    default:
    skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
    }
    break;

     

     

    and 
     
    case GS_DESPERADO:

     

    if (rnd()%100 < src->val1)
    //skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
     // break;
    //default:
    skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
    }
    break;

     

    What am I missing?

     

    BTW. Thanks for the reply.


  9.  

     

    Level 255

    All stats: 200

    Weapon a normal garrison [13104]

    Normal Bullet [13200]

     

    I'm at jupe_ele

    I summoned 100 porings

     

    I cast desperado

    Porings are still smiling. (alive)

     

    @@anjasoleil0

     

    i think this is the line for that

     

    src/map/skill.c

    case GS_DESPERADO:
    if (rnd()%100 < src->val1)
    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);

     

    I'm fairly new at this, what am i suppose to do with those :( Thanks for the reply BTW.

    >> 

    @@anjasoleil0

     

    i think this is the line for that

     

    src/map/skill.c

    case GS_DESPERADO:
    if (rnd()%100 < src->val1)
    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
    lockquote>

     

    I'm fairly new at this, what am i suppose to do with those :( Thanks for the reply BTW.

    can you post the line on the script?

     

     

     

     

     

     

     

     

    case GS_DESPERADO:
    if (rnd()%100 < src->val1)
    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
    break;
    default:
    skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
    }
    break;
     

  10. Level 255

    All stats: 200

    Weapon a normal garrison [13104]

    Normal Bullet [13200]

     

    I'm at jupe_ele

    I summoned 100 porings

     

    I cast desperado

    Porings are still smiling. (alive)



     

    @@anjasoleil0

     

    i think this is the line for that
     

    src/map/skill.c

    case GS_DESPERADO:
    if (rnd()%100 < src->val1)
    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);

     

    I'm fairly new at this, what am i suppose to do with those :( Thanks for the reply BTW.



     

    @@anjasoleil0

     

    i think this is the line for that
     

    src/map/skill.c

    case GS_DESPERADO:
    if (rnd()%100 < src->val1)
    skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);

     

    I'm fairly new at this, what am i suppose to do with those :( Thanks for the reply BTW.

×
×
  • Create New...

Important Information

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