Jump to content

Easycore

Members
  • Content Count

    184
  • Joined

  • Days Won

    6

Posts posted by Easycore


  1.  
     

    if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO
                      && !(d_bl && !(wd->flag&BF_SKILL)) // It should not be a basic attack if the target is under devotion
                      && !(d_bl && sce_d && !check_distance_bl(target, d_bl, sce_d->val3)) // It should not be out of range if the target is under devotion
                    ) {
    

     

    This should work. . .

    Have you made any changes to your SRC?


  2. You want to stop the reflect in those skills?

     

    This is officially configured so that those skills are not reflected.

     

    So:

    if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO
                      && !(d_bl && !(wd->flag&BF_SKILL)) // It should not be a basic attack if the target is under devotion
                      && !(d_bl && sce_d && !check_distance_bl(target, d_bl, sce_d->val3)) // It should not be out of range if the target is under devotion
                    ) {
    

    This causes that Cart Terminator and Desperado cannot be reflected by Reflect Shield and Items.

     

    And:

     

    if( sc->data[SC_REFLECTSHIELD] 
    				  && !(d_bl && !(wd->flag&BF_SKILL)) // It should not be a basic attack if the target is under devotion
    				  && !(d_bl && sce_d && !check_distance_bl(target, d_bl, sce_d->val3)) // It should not be out of range if the target is under devotion
    				) {
    

    This causes that Cart Terminator and Desperado can be reflected by Reflect Shield and Items.

     

    PD: Remember compile after any modification in SRC.


  3. In status.c, find:

     

    case SC_ASSUMPTIO:
    			status_change_end(bl, SC_KYRIE, INVALID_TIMER);
    			status_change_end(bl, SC_KAITE, INVALID_TIMER);
    			break;
    

    And comment these lines:

     

    case SC_ASSUMPTIO:
    			//status_change_end(bl, SC_KYRIE, INVALID_TIMER);
    			//status_change_end(bl, SC_KAITE, INVALID_TIMER);
    			break;
    

     

    In skill.c, find:

     

    		case PR_KYRIE:
    		case MER_KYRIE:
    		case SU_TUNAPARTY:
    

    And replace for:

    		case PR_KYRIE:
    			clif->skill_nodamage(bl, bl, skill_id, -1,
    				sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));			
    			if (tsc && tsc->data[SC_ASSUMPTIO] && tsc->data[SC_ASSUMPTIO]->val1 < 11)
    				status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
    			break;
    		case MER_KYRIE:
    		case SU_TUNAPARTY:
    

    Later find:

     

    		case HP_ASSUMPTIO:
    			if( sd && dstmd )
    				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    			else
    				clif->skill_nodamage(src,bl,skill_id,skill_lv,
    					sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
                                            break;
    

    And replace for:

    case HP_ASSUMPTIO:
    			if( sd && dstmd )
    				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    			else
    				clif->skill_nodamage(src,bl,skill_id,skill_lv,
    					sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
    			if (tsc && tsc->data[SC_KYRIE] && tsc->data[SC_KYRIE]->val1 < 11)
    				status_change_end(bl, SC_KYRIE, INVALID_TIMER);
    			break;
    

     

    This will cancel these states if the target have kyrie/assumptio lower level than 11.

     

    The problems with this:

     

    - If player get Assumptio/Kyrie by a NPC/Script, buffs can be stacked.

    - Cancellation of buffs only can work by skills.


  4. Thank you, works perfect.

     

    How about the joining guilds? can i make it so players cannot invite group_id = 1 players to their guild?

    Inc clif.c

    Find:

     

    bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd) {
    	if ( t_sd == NULL )// not online or does not exist
    		return false;
    
    	nullpo_retr(false, sd);
    	nullpo_retr(false, t_sd);
    	if ( map->list[sd->bl.m].flag.guildlock ) {
    		clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
    		return false;
    	}
    
    	if (t_sd->state.noask) {// @noask [LuzZza]
    		clif->noask_sub(sd, t_sd, 2);
    		return false;
    	}
    
    	guild->invite(sd,t_sd);
    	return true;
    }
    

    Replace for:

     

    bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd) {
    	if ( t_sd == NULL )// not online or does not exist
    		return false;
    
    	nullpo_retr(false, sd);
    	nullpo_retr(false, t_sd);
    	if ( map->list[sd->bl.m].flag.guildlock ) {
    		clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
    		return false;
    	}
            if(sd->group_id == 1){
                clif->message(fd, "You cannot create a Guild.");
                return false;
    }
    	if (t_sd->state.noask) {// @noask [LuzZza]
    		clif->noask_sub(sd, t_sd, 2);
    		return false;
    	}
    
    	guild->invite(sd,t_sd);
    	return true;
    }
    

  5. Client-Side:

     

    Data\luafiles514\lua files\skillinfoz\skilltreeview.lub, find:

    [JOBID.JT_BLACKSMITH_H] = {
        [21] = SKID.WS_CARTBOOST,
        [28] = SKID.WS_CARTTERMINATION,
        [22] = SKID.WS_MELTDOWN,
        [25] = SKID.WS_OVERTHRUSTMAX,
        [23] = SKID.WS_WEAPONREFINE
      },
    

    Replace for:

    [JOBID.JT_BLACKSMITH_H] = {
        [21] = SKID.WS_CARTBOOST,
        [28] = SKID.WS_CARTTERMINATION,
        [22] = SKID.WS_MELTDOWN,
        [25] = SKID.WS_OVERTHRUSTMAX,
        [23] = SKID.WS_WEAPONREFINE,
        [35] = SKID.ITM_TOMAHAWK
      },
    

    Server-Side:

     

    db\pre-re or db\re, skill_tree.conf, find:

     

    Whitesmith: {
    	inherit: ( "Blacksmith" );
    
    	skills: {
    		WS_MELTDOWN: {
    

    Replace for:

     

    Whitesmith: {
    	inherit: ( "Blacksmith" );
    
    	skills: {
    		ITM_TOMAHAWK: 1
    		WS_MELTDOWN: {
    

    src\map\skill.c, find:

    case ITM_TOMAHAWK:
    

    Replace for:

    //case ITM_TOMAHAWK:
    

    Find:

                    case LG_OVERBRAND_BRANDISH:
    		case LG_OVERBRAND:
    			skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
    		break;
    

    Replace for:

                    case LG_OVERBRAND_BRANDISH:
    		case LG_OVERBRAND:
    			skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
    		break;
    		
    		case ITM_TOMAHAWK:
    			if (pc->search_inventory(sd,ITEMID_TOMAHAWK) == INDEX_NOT_FOUND)
    				clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
    			skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
    		break;
    

     

    Later recompile.

     

    PD: It only work with item Tomahawk ID: 1368.


  6. In clif.c

    Find:

    void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
    {
    	char name[NAME_LENGTH];
    	safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);
    
    	if(map->list[sd->bl.m].flag.guildlock) {
    		clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
    		return;
    	}
    
    	guild->create(sd, name);
    }
    

    And replace for:

     

    void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
    {
    	char name[NAME_LENGTH];
    	safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);
    
    	if(sd->group_id == 1){
    		clif->message(fd, "You cannot create a Guild.");
    		return;
    	}
    	if(map->list[sd->bl.m].flag.guildlock) {
    		clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
    		return;
    	}
    
    	guild->create(sd, name);
    }
    

  7.  

    Hello,

    I get a [Warning] when use dispbottom2:

     

     

     

    PmHK8GH.png

     

     

     

    The message shows in color, but appear a warning.

    I used the follow format: 

    dispbottom2 0xFF0000,"Message";

     

    When I put the color in " " (dispbottom2 "0xFF00002","Message";), no warning appears, but the message color is always white.

     

    EDIT:

     

    Using latest Herc git.

    Currently, color should be in quotes, and format is 0xRRGGBB,

     

    Hmmp... this still not working... I put the correct format, in quotes, but color's always White (No Debug appears).

     

    However, I put the Warning Number Value in quotes, and the message shows in Red Color.

    dispbottom2 "16711680","Message";
    

  8. 1) you cannot concat string directly, that should have given some sort of compile warning.

    2) use pc_readglobalreg_str

    I was researching about that... 

    And finally I came to a solution:

     

    {
            char* a = pc_readglobalreg_str(sd,script->add_str("M$"));
    	char* b = ".wav";
    	char* c = (char* ) malloc(1 +sizeof(char*) * (strlen(a)+ strlen());
    	strcpy(c, a);
    	strcat(c, ;
    	clif->soundeffectall(src, c,0, AREA);
    }
    

    So, I get compile warnings for 'strcpy' and 'strcat':

     

    warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

     

    warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

     


  9. Hello,

     

    It's posible use getd in SRC?

     

    For eg:

     

    M$ = Var

     

     

    getd(""+M$+"Something") = "VarSomething".
    

     

     

    I tried:

     

    pc_readglobalreg(sd,script->add_str("M$"))+"Something" , but it generates map-server-crash.

     

    In short, I would like to be able to "join" strings.

     

    For more information, I used this in clif->soundeffectall:

     

     

    clif->soundeffectall(src, (pc_readglobalreg(sd,script->add_str("M$"))+".wav"),0, AREA); 

     

    Regards~


  10. Hello,

    I get a [Warning] when use dispbottom2:

     

     

     

    PmHK8GH.png

     

     

     

    The message shows in color, but appear a warning.

    I used the follow format: 

    dispbottom2 0xFF0000,"Message";

     

    When I put the color in " " (dispbottom2 "0xFF00002","Message";), no warning appears, but the message color is always white.

     

    EDIT:

     

    Using latest Herc git.


  11. Change to this:

    HPExport void server_preinit (void) {
    	addBattleConf( "max_blv_exp_gain", battle_config_setting, return_battle_config, false );
    	addBattleConf( "max_jlv_exp_gain", battle_config_setting, return_battle_config, false );
    }
    
    HPExport void plugin_init (void) {
    	addHookPre( pc, gainexp, pc_gainexp_pre );
    	addHookPost( pc, calcexp, pc_calcexp_post );
    }
    

     

    But be careful, i tried it, and it blocks exp gain for all player regardless of my battle conf.

    I still don't know why x)

     

    I get the follow error:

     

    1>------ Build started: Project: proyecto: MaxLvExpGain, Configuration: Debug Win32 ------
    1>  MaxLvExpGain.c
    1>..\src\plugins\MaxLvExpGain.c(109): warning C4013: 'addHookPre' undefined; It is assumed that extern returns as int result
    1>..\src\plugins\MaxLvExpGain.c(109): error C2065: 'gainexp' : undeclared identifier
    1>..\src\plugins\MaxLvExpGain.c(110): warning C4013: 'addHookPost' undefined; It is assumed that extern returns as int result
    1>..\src\plugins\MaxLvExpGain.c(110): error C2065: 'calcexp' : undeclared identifier
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    

    I'm using the latest Herc.

    :s


  12. Wow this is pretty cool Easycore. I'm assuming we could also read from the global registry another value? Lets say they need to complete certain instance or of the such. I just change "Quest_ASPD" to something like "Inst_ASPD"? (Could this possibly be made to read from maybe an array of variables and if such variables equals x they get y ASPD bonus. If Quest_ASPD is 5 and Inst_ASPD is 10 it would grant me x ASPD (like 2). Possible?

    I'm not very familiar with Arrays, I think that It can be do by scripts, you just need modify the variable.

     

    For eg. some variable that multiplies "Quest_ASPD", or if you wish you can change this:

     

    (pc_readglobalreg(sd,script->add_str("Quest_ASPD"))*10)
    

     

    For:

    (pc_readglobalreg(sd,script->add_str("Quest_ASPD")) ) 

    So you will need to multiply "Quest_ASPD" variable by 10.

     

    Every 10 points that you subtract or sumes, ASPD will modify by 1.

     

     


  13. If someone have the same problem, a solution for this is:

     

    In ExtendedVending.c find:

     

    int bc_extended_vending;
    int bc_show_item_vending;
    int bc_ex_vending_info;
    int bc_item_zeny;
    int bc_item_cash;
    

    And replace for:

     

    int bc_extended_vending = 1; // Enable Extended Vending System
    int bc_show_item_vending = 1; // Show Currency Name in the Pub of Vending
    int bc_ex_vending_info = 1; // Show Information about buying
    int bc_item_zeny = 30000; // ItemID for Zeny, 0 to disable
    int bc_item_cash = 30001; // ItemID for CashPoints, 0 to disable
    

    Recompile after.

     

    This plugin is not reading "features.conf" correctly, so this has worked me momentarily, until Dastgr update this awesome Plugin.

     

    Regards


  14. In src/map/status.c

     

    Find:

    st->amotion = cap_value(amotion, ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd), 2000);
    

    And replace for:

     

    st->amotion = cap_value(amotion, ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd - ( pc_readglobalreg(sd,script->add_str("Quest_ASPD"))*10) : battle_config.max_aspd - ( pc_readglobalreg(sd,script->add_str("Quest_ASPD"))*10) ), 2000);
    

    Then now the variable "Quest_ASPD" will give a ASPD point to character.

    Depending on the number you give, eg: If "Quest_ASPD" is 5, the limit of ASPD for the character will increase to 195 (if max_aspd = 190).

     

    I use this little modification for my personal project.

     

    Regards~

     

    EDIT:

     

    To get this bonus you need relog with the character, or do some function that make a recalculation, for eg. Change Job.


  15. @Dastgir

     

    I think that is a reading error from "features.conf"

     

    I replaced "if (bc_ex_vending_info == 1)" to "if (bc_ex_vending_info != 1)" and It worked.

     

    Also, Zeny and Cash are disabled cause don't read the config, so "item_zeny and item_cash" will always be 0.

     

    Same with of the rest.

×
×
  • Create New...

Important Information

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