Jump to content
  • 0

Body Relocation with Trap


Question

2 answers to this question

Recommended Posts

  • 0
Posted

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.

  • Love 1
  • 0
Posted (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 by guhx

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...