Jump to content

Question

Posted

I would like to change the movement of the asura, I wanted him to jump instead of slide,
example: the character disappeared and appeared behind the opponent as before.

i have an old-time project and i use a version of eathena.
 

I believe that the part corresponding to this is this   src/map/skill.c

 
	    case MO_EXTREMITYFIST:
        if( skillid == MO_EXTREMITYFIST )
        {
            status_change_end(src,SC_EXPLOSIONSPIRITS,-1);
            status_change_end(src,SC_BLADESTOP,-1);
        }
        //Client expects you to move to target regardless of distance
        {
            struct unit_data *ud = unit_bl2ud(src);
            short dx,dy;
            int i,speed;
            i = skillid == MO_EXTREMITYFIST?1:2; //Move 2 cells for Issen, 1 for Asura
            dx = bl->x - src->x;
            dy = bl->y - src->y;
                        
            if (dx < 0) dx-=i;
            else if (dx > 0) dx+=i;
            if (dy < 0) dy-=i;
            else if (dy > 0) dy+=i;
            if (!dx && !dy) dy++;
            if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
            {
                dx = bl->x;
                dy = bl->y;
            } else {
                dx = src->x + dx;
                dy = src->y + dy;
            }
	            skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
	            if(unit_walktoxy(src, dx, dy, 2) && ud) {
                //Increase can't walk delay to not alter your walk path
                ud->canmove_tick = tick;
                speed = status_get_speed(src);
                for (i = 0; i < ud->walkpath.path_len; i ++)
                {
                    if(ud->walkpath.path[i]&1)
                        ud->canmove_tick+=7*speed/5;
                    else
                        ud->canmove_tick+=speed;
                }
            }
        }
        break;
	

4 answers to this question

Recommended Posts

  • 0
Posted
	case MO_EXTREMITYFIST:
		{
			//short x, y, i = 2; // Move 2 cells for Issen(from target)
			struct block_list *mbl = bl;
			short dir = 0;
			
			skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
			
			if( skill_id == MO_EXTREMITYFIST )
			{
				mbl = src;
				status_set_sp(src, 0, 0);
				status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER);
				status_change_end(src, SC_BLADESTOP, INVALID_TIMER);
#ifdef RENEWAL
				sc_start(src,src,SC_EXTREMITYFIST2,100,skill_lv,skill_get_time(skill_id,skill_lv));
#endif
			}else
				status_set_hp(src,
#ifdef RENEWAL
				max(status_get_max_hp(src)/100, 1)
#else
				1
#endif
				, 0);
		}
		//Client expects you to move to target regardless of distance
		{				
			struct unit_data *ud = unit_bl2ud(src);
			short dx,dy;
			int i,speed;
			i = skill_id == MO_EXTREMITYFIST?1:2; //Move 2 cells for Issen, 1 for Asura
			dx = bl->x - src->x;
			dy = bl->y - src->y;
			if (dx < 0) dx-=i;
			else if (dx > 0) dx+=i;
			if (dy < 0) dy-=i;
			else if (dy > 0) dy+=i;
			if (!dx && !dy) dy++;
			if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
			{
				dx = bl->x;
				dy = bl->y;
			} else {
				dx = src->x + dx;
				dy = src->y + dy;
			}

			if(unit_walktoxy(src, dx, dy, 2) && ud) {
				//Increase can't walk delay to not alter your walk path
				ud->canmove_tick = tick;
				speed = status_get_speed(src);
				for (i = 0; i < ud->walkpath.path_len; i ++)
				{
					if(ud->walkpath.path[i]&1)
						ud->canmove_tick+=7*speed/5;
					else
						ud->canmove_tick+=speed;
				}
			}
		}
		break;

 

  • 0
Posted
On 6/9/2020 at 5:55 PM, rickyzinhx said:

	case MO_EXTREMITYFIST:
		{
			//short x, y, i = 2; // Move 2 cells for Issen(from target)
			struct block_list *mbl = bl;
			short dir = 0;
			
			skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
			
			if( skill_id == MO_EXTREMITYFIST )
			{
				mbl = src;
				status_set_sp(src, 0, 0);
				status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER);
				status_change_end(src, SC_BLADESTOP, INVALID_TIMER);
#ifdef RENEWAL
				sc_start(src,src,SC_EXTREMITYFIST2,100,skill_lv,skill_get_time(skill_id,skill_lv));
#endif
			}else
				status_set_hp(src,
#ifdef RENEWAL
				max(status_get_max_hp(src)/100, 1)
#else
				1
#endif
				, 0);
		}
		//Client expects you to move to target regardless of distance
		{				
			struct unit_data *ud = unit_bl2ud(src);
			short dx,dy;
			int i,speed;
			i = skill_id == MO_EXTREMITYFIST?1:2; //Move 2 cells for Issen, 1 for Asura
			dx = bl->x - src->x;
			dy = bl->y - src->y;
			if (dx < 0) dx-=i;
			else if (dx > 0) dx+=i;
			if (dy < 0) dy-=i;
			else if (dy > 0) dy+=i;
			if (!dx && !dy) dy++;
			if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
			{
				dx = bl->x;
				dy = bl->y;
			} else {
				dx = src->x + dx;
				dy = src->y + dy;
			}

			if(unit_walktoxy(src, dx, dy, 2) && ud) {
				//Increase can't walk delay to not alter your walk path
				ud->canmove_tick = tick;
				speed = status_get_speed(src);
				for (i = 0; i < ud->walkpath.path_len; i ++)
				{
					if(ud->walkpath.path[i]&1)
						ud->canmove_tick+=7*speed/5;
					else
						ud->canmove_tick+=speed;
				}
			}
		}
		break;

 

aint working

  • 0
Posted (edited)

it would still slide in front of the enemy on my test

the default is like jumping teleporting the mod is sliding and pounding the champ fist on the ground heh anyway it helps!

Edited by kalabasa

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...