Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Do service.h dodajesz
- #define DUNGEON_TELEPORT_FIX
- Przechodzisz do pliku cmd.gm
- szukasz funkcji ACMD(do_warp)
- Podmieniasz całą funkcje :
- ACMD(do_warp)
- {
- char arg1[256], arg2[256];
- two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));
- if (!*arg1)
- {
- ch->ChatPacket(CHAT_TYPE_INFO, "Usage: warp <character name> | <x meter> <y meter>");
- return;
- }
- int x = 0, y = 0;
- #ifdef DUNGEON_TELEPORT_FIX
- DWORD map_index = 0;
- #endif
- if (isnhdigit(*arg1) && isnhdigit(*arg2))
- {
- str_to_number(x, arg1);
- str_to_number(y, arg2);
- }
- else
- {
- LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(arg1);
- if (NULL == tch)
- {
- const CCI* pkCCI = P2P_MANAGER::instance().Find(arg1);
- if (NULL != pkCCI)
- {
- if (pkCCI->bChannel != g_bChannel)
- {
- ch->ChatPacket(CHAT_TYPE_INFO, "Target is in %d channel (my channel %d)", pkCCI->bChannel, g_bChannel);
- return;
- }
- ch->WarpToPID( pkCCI->dwPID );
- }
- else
- {
- ch->ChatPacket(CHAT_TYPE_INFO, "There is no one by that name");
- }
- return;
- }
- else
- {
- x = tch->GetX() / 100;
- y = tch->GetY() / 100;
- #ifdef DUNGEON_TELEPORT_FIX
- map_index = tch->GetMapIndex();
- #endif
- }
- }
- x *= 100;
- y *= 100;
- ch->ChatPacket(CHAT_TYPE_INFO, "You warp to ( %d, %d )", x, y);
- #ifdef DUNGEON_TELEPORT_FIX
- ch->WarpSet(x, y, map_index);
- #else
- ch->WarpSet(x, y);
- #endif
- ch->Stop();
- }
- i tyle.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement