guhx Posted March 25, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 04/03/14 Last Seen: December 11, 2020 Share Posted March 25, 2016 I wanted to know how to block the body relocation when the character fall into a trap Quote Link to comment Share on other sites More sharing options...
0 Playtester Posted March 25, 2016 Group: Developer Topic Count: 37 Topics Per Day: 0.01 Content Count: 898 Reputation: 248 Joined: 01/30/13 Last Seen: Friday at 07:28 PM Share Posted March 25, 2016 Depends on what trap. For ankle snare for example you can simply add a check for the skill in skill_block_check in skill.c, just like it already blocks teleport: switch (type) { case SC_ANKLE: if (skill_id == AL_TELEPORT) return 1; break; For Statis, Kagehumi and Bite, there are already INF3 values in the skill_db, so you can just edit those there. For anything else you have to take a look at status_check_skilluse in status.c, which also calls skill_block_check: if (!flag && ( // Blocked only from using the skill (stuff like autospell may still go through sc->cant.cast || (sc->data[SC_BASILICA] && (sc->data[SC_BASILICA]->val4 != src->id || skill_id != HP_BASILICA)) || // Only Basilica caster that can cast, and only Basilica to cancel it (sc->data[SC_MARIONETTE] && skill_id != CG_MARIONETTE) || // Only skill you can use is marionette again to cancel it (sc->data[SC_MARIONETTE2] && skill_id == CG_MARIONETTE) || // Cannot use marionette if you are being buffed by another (sc->data[SC_ANKLE] && skill_block_check(src, SC_ANKLE, skill_id)) || (sc->data[SC_STASIS] && skill_block_check(src, SC_STASIS, skill_id)) || (sc->data[SC_BITE] && skill_block_check(src, SC_BITE, skill_id)) || (sc->data[SC_KAGEHUMI] && skill_block_check(src, SC_KAGEHUMI, skill_id)) )) return false; // Skill blocking. if ( (sc->data[SC_VOLCANO] && skill_id == WZ_ICEWALL) || (sc->data[SC_ROKISWEIL] && skill_id != BD_ADAPTATION) || (sc->data[SC_HERMODE] && skill_get_inf(skill_id) & INF_SUPPORT_SKILL) || (sc->data[SC_NOCHAT] && sc->data[SC_NOCHAT]->val1&MANNER_NOSKILL) ) return false; The structure right now is pretty horrible and I really would like to improve in the future so it's easier to expand, but right now you have to add your checks here. 1 Quote Link to comment Share on other sites More sharing options...
0 guhx Posted March 26, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 04/03/14 Last Seen: December 11, 2020 Author Share Posted March 26, 2016 (edited) I tried a number of ways by skill_db , status.c and skill.c and could not block = x Does anyone have any idea to block it? @Edit I got making the following changes case MO_BODYRELOCATION: + if(sd && sd->sc.data[SC_ANKLE] ){ + clif_skill_fail(sd,skill_id,0,0); + return 0; + } if (unit_movepos(src, x, y, 1, 1)) { #if PACKETVER >= 20111005 clif_snap(src, src->x, src->y); #else clif_skill_poseffect(src,skill_id,skill_lv,src->x,src->y,tick); #endif if (sd) skill_blockpc_start (sd, MO_EXTREMITYFIST, 2000); } break; Edited March 26, 2016 by guhx Quote Link to comment Share on other sites More sharing options...
Question
guhx
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.