Jump to content
  • 0

change formula


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

 

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
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  742
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

34 minutes ago, Bringer said:

use search option

 

 

Thanks for the suggestion, I had already looked at this topic, but unfortunately it did not solve my problem.

Link to comment
Share on other sites

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.

×
×
  • Create New...