cannot use shadow jump and highjump on a pvp cell

Lord Ganja

New member
Messages
161
Points
0
Age
34
Location
Ganja World
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 ?

 
Last edited by a moderator:
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" )
Code:
if((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKPVP) && map->list[src->m].name == "prontera" )
Code:
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.

 
Back
Top