Модификация исключает возможность попадания на варп при рандомной телепортации. modification doesn't let you random teleport on warp portal by Functor ------------------------------------------------------------------------------------------------------- Open ../src/map/pc.c find function pc_setpos: if( x == 0 && y == 0 ) {// pick a random walkable cell do { x=rnd()%(map[m].xs-2)+1; y=rnd()%(map[m].ys-2)+1; } while(map_getcell(m,x,y,CELL_CHKNOPASS)); } === change to that: === if (x == 0 && y == 0) {// pick a random walkable cell do { // by Functor int k, npc_x, npc_y, npc_xs, npc_ys; x = rnd() % (map[m].xs-2) + 1; y = rnd() % (map[m].ys-2) + 1; if (map[m].npc_num <= 0) continue; for (k = 0; k < map[m].npc_num; ++k) { if (map[m].npc[k]->subtype != WARP) continue; npc_x = map[m].npc[k]->bl.x; npc_y = map[m].npc[k]->bl.y; npc_xs = map[m].npc[k]->u.warp.xs; npc_ys = map[m].npc[k]->u.warp.ys; if (x >= (npc_x - npc_xs) && x <= (npc_x + npc_xs) && y >= (npc_y - npc_ys) && y <= (npc_y + npc_ys)) { x = -1; break; } } } while (map_getcell(m, x, y, CELL_CHKNOPASS)); } =============================== Find function pc_randomwarp: =============================== do{ x=rnd()%(map[m].xs-2)+1; y=rnd()%(map[m].ys-2)+1; }while(map_getcell(m,x,y,CELL_CHKNOPASS) && (i++)<1000 ); === change for: === do { // by Functor int k, npc_x, npc_y, npc_xs, npc_ys; x = rnd() % (map[m].xs-2) + 1; y = rnd() % (map[m].ys-2) + 1; if (map[m].npc_num <= 0) continue; for (k = 0; k < map[m].npc_num; ++k) { if (map[m].npc[k]->subtype != WARP) continue; npc_x = map[m].npc[k]->bl.x; npc_y = map[m].npc[k]->bl.y; npc_xs = map[m].npc[k]->u.warp.xs; npc_ys = map[m].npc[k]->u.warp.ys; if (x >= (npc_x - npc_xs) && x <= (npc_x + npc_xs) && y >= (npc_y - npc_ys) && y <= (npc_y + npc_ys)) { x = -1; break; } } } while (map_getcell(m, x, y, CELL_CHKNOPASS) && (i++) < 1000);