- 0
Sign in to follow this
Followers
0
cannot use shadow jump and highjump on a pvp cell
Asked by
Lord Ganja
-
Recently Browsing 0 members
No registered users viewing this page.

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 GanjaShare this post
Link to post
Share on other sites