Oh Wow 0 Posted December 25, 2013 (edited) 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 advanceand sorry for my bad english skill Edited December 25, 2013 by haball Quote Share this post Link to post Share on other sites
0 pan 87 Posted December 25, 2013 (edited) 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 December 25, 2013 by pan 1 Angelmelody reacted to this Quote Share this post Link to post Share on other sites
0 pan 87 Posted December 25, 2013 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? Quote Share this post Link to post Share on other sites
0 Oh Wow 0 Posted December 25, 2013 @panSorry i want to modify like this http://www.eathena.ws/board/index.php?showtopic=253003 but i want this mod effect in some map that i specify. Quote Share this post Link to post Share on other sites
0 Oh Wow 0 Posted December 25, 2013 thank you very much Panhope u happy holiday Quote Share this post Link to post Share on other sites
Can anyone help me to modify this source only work on some maps such as pvp_y_8-5
Edited by haballThank in advance
and sorry for my bad english skill
Share this post
Link to post
Share on other sites