Jump to content

Question

Posted (edited)

 

Hello community, I would like to change the skill TK_HIGHJUMP in src skill.cpp to work on maps like PvP / GvG and WoE.

The formula is this:


    case TK_HIGHJUMP:
        {
            int x,y, dir = unit_getdir(src);

            //Fails on noteleport maps, except for GvG and BG maps [Skotlex]
            if( map_getmapflag(src->m, MF_NOTELEPORT) &&
                !(map_getmapflag(src->m, MF_BATTLEGROUND) || map_flag_gvg2(src->m) )
            ) {
                x = src->x;
                y = src->y;
            } else if(dir%2) {
                //Diagonal
                x = src->x + dirx[dir]*(skill_lv*4)/3;
                y = src->y + diry[dir]*(skill_lv*4)/3;
            } else {
                x = src->x + dirx[dir]*skill_lv*2;
                y = src->y + diry[dir]*skill_lv*2;
            }

            clif_skill_nodamage(src,bl,TK_HIGHJUMP,skill_lv,1);
            if(!map_count_oncell(src->m,x,y,BL_PC|BL_NPC|BL_MOB,0) && map_getcell(src->m,x,y,CELL_CHKREACH) && unit_movepos(src, x, y, 1, 0))
                clif_blown(src);
        }

 

 

thanks in advance if anyone can make this change for me 
Edited by TheDerpySupport

2 answers to this question

Recommended Posts

  • 0
Posted
9 hours ago, IsabelaFernandez said:

 

Hello community, I would like to change the skill TK_HIGHJUMP in src skill.cpp to work on maps like PvP / GvG and WoE.

The formula is this:

 


    case TK_HIGHJUMP:
        {
            int x,y, dir = unit_getdir(src);

            //Fails on noteleport maps, except for GvG and BG maps [Skotlex]
            if( map_getmapflag(src->m, MF_NOTELEPORT) &&
                !(map_getmapflag(src->m, MF_BATTLEGROUND) || map_flag_gvg2(src->m) )
            ) {
                x = src->x;
                y = src->y;
            } else if(dir%2) {
                //Diagonal
                x = src->x + dirx[dir]*(skill_lv*4)/3;
                y = src->y + diry[dir]*(skill_lv*4)/3;
            } else {
                x = src->x + dirx[dir]*skill_lv*2;
                y = src->y + diry[dir]*skill_lv*2;
            }

            clif_skill_nodamage(src,bl,TK_HIGHJUMP,skill_lv,1);
            if(!map_count_oncell(src->m,x,y,BL_PC|BL_NPC|BL_MOB,0) && map_getcell(src->m,x,y,CELL_CHKREACH) && unit_movepos(src, x, y, 1, 0))
                clif_blown(src);
        }

 

 


thanks in advance if anyone can make this change for me 

use search option

 

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