Jump to content
  • 0
Sign in to follow this  
Lord Ganja

cannot use shadow jump and highjump on a pvp cell

Question

I've been trying to modify the skill shadow jump and high jump to show skill fail whenever they click the skill on a pvp cell located at prontera only.

 

 

Tried to do this but it's not working. The skill doesn't fail when the target coordinates is a pvp cell.. Help please? thanks in advance!

 

skill.c

		case NJ_SHADOWJUMP:	+		if((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKPVP) && map->list[sd->bl.m].name == "prontera" ) // Cannot shadow jump on prontera pvp cell	+		{	+			clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);	+			break;	+		}			if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground ) { //You don't move on GVG grounds.				unit->movepos(src, x, y, 1, 0);				clif->slide(src,x,y);			}			status_change_end(src, SC_HIDING, INVALID_TIMER);			break;			....................................................................................................................................................			case TK_HIGHJUMP:			{				int x,y, dir = unit->getdir(src);				//Fails on noteleport maps, except for GvG and BG maps [Skotlex]				if( map->list[src->m].flag.noteleport				 && !(map->list[src->m].flag.battleground || map_flag_gvg2(src->m))				) {					x = src->x;					y = src->y;				} else {					x = src->x + dirx[dir]*skill_lv*2;					y = src->y + diry[dir]*skill_lv*2;				}					+			if((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKPVP) && map->list[sd->bl.m].name == "prontera" ) // Cannot shadow jump on prontera pvp cell	+			{	+				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);	+				break;	+			}				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)) {					clif->slide(src,x,y);					unit->movepos(src, x, y, 1, 0);				}			}			break;

 

 

EDIT:

 Figured out the problem is because of map->list[sd->bl.m].name == "prontera".. 

What script command should I use ?

Edited by Lord Ganja

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

change sd->bl.m to src->m

 

 

Tried these but still not working :/

if((x || y) && map->getcell(src->m, x, y, CELL_CHKPVP) && map->list[src->m].name == "prontera" )
if((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKPVP) && map->list[src->m].name == "prontera" )
if((x || y) && map->getcell(src->m, x, y, CELL_CHKPVP) && map->list[sd->bl.m].name == "prontera" )

 

 

I tried this one and it's working

if((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKPVP))

 

but I only wanted it to be applied on pvp cell on prontera map so I added this

map->list[sd->bl.m].name == "prontera"

 

but whenever I tried to add the map check, it doesn't work anymore.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.