Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum {
- MAP_TELEPORT_COUNT = 16,
- };
- ACMD(do_map)
- {
- char arg1[256];
- one_argument(argument, arg1, sizeof(arg1));
- if (!*arg) return;
- if (!isnhdigit(*arg1)) return;
- if (ch->IsHack()) return;
- if (!ch->CanWarp()) return;
- BYTE i;
- str_to_number(i, arg1);
- if (i >= MAP_TELEPORT_COUNT) return;
- struct SMapInfo {
- long x;
- long y;
- BYTE level;
- } s_MapInfo[MAP_TELEPORT_COUNT] = {
- { 3608, 8776, 0 },
- { 4693, 9642, 0 },
- { 10240 + 604, 16640 + 1303, 0 },
- { 7936 + 258, 9984 + 270, 0 },
- { 9474 + 75, 5376 + 446, 0 },
- { 9477 + 632, 7171 + 545, 75 },
- { 11264 + 295, 15104 + 1413, 135 },
- { 11776 + 318, 16640 + 428, 115 },
- { 12288 + 253, 5120 + 980, 95 },
- { 557, 1579, 0 },
- { 9696, 2784, 0 },
- { 6656 + 355, 8704 + 439, 0 },
- { 1385, 2349, 0 },
- { 14592 + 393, 7424 + 538, 0 },
- { 8731, 2426, 0 },
- { 0, 0, 0 },
- };
- if (ch->GetLevel() < s_MapInfo[i].level)
- {
- ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("map-level-limit %d"), s_MapInfo[i].level);
- }
- else if (s_MapInfo[i].x == 0)
- {
- BYTE bEmpire = ch->GetEmpire();
- ch->WarpSet( g_start_position[bEmpire][0], g_start_position[bEmpire][1]);
- }
- else
- ch->WarpSet(s_MapInfo[i].x * 100, s_MapInfo[i].y * 100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement