Перейти к содержанию

Запрет телепорта в определенные локации


Рекомендуемые сообщения

Здравствуйте. Хотел бы узнать есть ли возможность отсечь из команды @go напримр 16 локации. чтобы игрок мог свободно портироваться по всем картам кроме данного места?

без отсечения данной возможности у гма

Изменено пользователем Dragonik
Ссылка на комментарий
Поделиться на другие сайты

sec_pri[TAB]mapflag[TAB]nowarp

sec_pri[TAB]mapflag[TAB]nowarpto

sec_pri[TAB]mapflag[TAB]nogo

а убрать локацию в го можно

https://rathena.org/wiki/@go

Изменено пользователем Gintama
Ссылка на комментарий
Поделиться на другие сайты

Было


if (town >= 0 && town < ARRAYLENGTH(data))
{
int16 m = map_mapname2mapid(data[town].map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,248));
return -1;
}
if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif_displaymessage(fd, msg_txt(sd,0)); // Warped.
} else {
clif_displaymessage(fd, msg_txt(sd,1)); // Map not found.
return -1;
}
} else { // if you arrive here, you have an error in town variable when reading of names
clif_displaymessage(fd, msg_txt(sd,38)); // Invalid location number or name.
return -1;
}

стало


if (town == 16 && pc_get_group_level(sd) < 99){
return -1;
}
else if (town >= 0 && town < ARRAYLENGTH(data))
{
int16 m = map_mapname2mapid(data[town].map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,248));
return -1;
}
if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif_displaymessage(fd, msg_txt(sd,0)); // Warped.
} else {
clif_displaymessage(fd, msg_txt(sd,1)); // Map not found.
return -1;
}
}
else { // if you arrive here, you have an error in town variable when reading of names
clif_displaymessage(fd, msg_txt(sd,38)); // Invalid location number or name.
return -1;
}

  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты

Было


if (town >= 0 && town < ARRAYLENGTH(data))
{
int16 m = map_mapname2mapid(data[town].map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,248));
return -1;
}
if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif_displaymessage(fd, msg_txt(sd,0)); // Warped.
} else {
clif_displaymessage(fd, msg_txt(sd,1)); // Map not found.
return -1;
}
} else { // if you arrive here, you have an error in town variable when reading of names
clif_displaymessage(fd, msg_txt(sd,38)); // Invalid location number or name.
return -1;
}

стало


if (town == 16 && pc_get_group_level(sd) < 99){
return -1;
}
else if (town >= 0 && town < ARRAYLENGTH(data))
{
int16 m = map_mapname2mapid(data[town].map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif_displaymessage(fd, msg_txt(sd,248));
return -1;
}
if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif_displaymessage(fd, msg_txt(sd,0)); // Warped.
} else {
clif_displaymessage(fd, msg_txt(sd,1)); // Map not found.
return -1;
}
}
else { // if you arrive here, you have an error in town variable when reading of names
clif_displaymessage(fd, msg_txt(sd,38)); // Invalid location number or name.
return -1;
}

да это как раз то что я искал !!!! Спасибо!!!

Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика