Jump to content
  • 0
Oh Wow

Absorb spiritball stop asura in some map

Question

Can anyone help me to modify this source only work on some maps such as pvp_y_8-5
 

 

if( skill_id == MO_EXTREMITYFIST && sd->spiritball == 0)	{		clif_skill_fail(sd,skill,0,0,0);		return 0;} 


Thank in advance
and sorry for my bad english skill :(

Edited by haball

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
The mod that's in the topic that you posted doesn't work at all :x So I've made some changes to fit what you want...

Open src/map/atcommand.c and search for:
    if (map->list[m_id].flag.nomemo)        strcat(atcmd_output, msg_txt(1064)); // NoMemo |
add below:
    if (map->list[m_id].flag.asuraabsorb)        strcat(atcmd_output, "AsuraAbsorb |");
Search for:
CHECKFLAG(nocashshop);
Add below:
CHECKFLAG(asuraabsorb);
Search for:
SETFLAG(nocashshop);
Add below:
SETFLAG(asuraabsorb);
Search for:
clif->message(sd->fd,"guildlock, src4instance, notomb, nocashshop");
Replace it with:
clif->message(sd->fd,"guildlock, src4instance, notomb, nocashshop, asuraabsorb");
Now open src/map/map.c and search for:
    } else if (!strcmpi(flag,"nocashshop")) {        if( state && map->list[m].flag.nocashshop )            ;/* nothing to do */        else {            if( state )                map_zone_mf_cache_add(m,"nocashshoptoff");            else if( map->list[m].flag.nocashshop )                map_zone_mf_cache_add(m,"nocashshop");        }    }
Add below:
else if( !strcmpi(flag,"asuraabsorb")) {        if( state && map->list[m].flag.asuraabsorb )            ; /* nothing to do */        else {            if( state )                map_zone_mf_cache_add(m,"asuraabsorbtoff");            else if( map->list[m].flag.asuraabsorb )                map_zone_mf_cache_add(m,"asuraabsorb");        }    }
Now open src/map/map.h and find:
        unsigned nocashshop : 1;
Add below it:
        unsigned asuraabsorb : 1;
Now open src/map/npc.c and search for:
    } else if ( !strcmpi(w3,"nocashshop") ) {        map->list[m].flag.nocashshop = (state) ? 1 : 0;    } else        ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.n", w3, filepath, strline(buffer,start-buffer));
Replace it with:
    } else if ( !strcmpi(w3,"nocashshop") ) {        map->list[m].flag.nocashshop = (state) ? 1 : 0;    } else if( !strcmpi(w3, "asuraabsorb") ) {        map->list[m].flag.asuraabsorb = state;    } else        ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.n", w3, filepath, strline(buffer,start-buffer));
Open src/map/script.h and search for:
MF_NOCASHSHOP
Replace it with:
	MF_NOCASHSHOP,	MF_ASURAABSORB
 
Now open src/map/script.c and search for:
            case MF_NOCASHSHOP:         script_pushint(st,map->list[m].flag.nocashshop); break;
Add below:
            case MF_ASURAABSORB:        script_pushint(st,map->list[m].flag.asuraabsorb); break;
Search for:
            case MF_NOCASHSHOP:         map->list[m].flag.nocashshop = 1; break;
Add below:
            case MF_ASURAABSORB:        map->list[m].flag.asuraabsorb = 1; break;
Search for:
            case MF_NOCASHSHOP:         map->list[m].flag.nocashshop = 0; break;
Add below:
            case MF_ASURAABSORB:        map->list[m].flag.asuraabsorb = 0; break;
And finally open src/map/skill.c and search for:
        case NJ_ISSEN:        case MO_EXTREMITYFIST:            {                short x, y, i = 2; // Move 2 cells for Issen(from target)                struct block_list *mbl = bl;                short dir = 0;
Add below:
                struct skill_condition req = skill->get_requirement(sd,skill_id,skill_lv);                if( req.spiritball > sd->spiritball && map->list[src->m].flag.asuraabsorb )                {                    clif->skill_fail(sd, skill_id, 0, 0);                    break;                }

 

 

Built successfully and tested in-game c: If you want any map to have asuraabsorb just set the mapflag and it'll work.

 

Happy holidays

Edited by pan

Share this post


Link to post
Share on other sites
  • 0

Sorry, I didn't understand what you need, could you post what you want to do? Do you want to block asura (MO_EXTREMITYFIST) outside a map?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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