Guest User

Untitled

a guest
Sep 6th, 2010
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. else if (command.length() == 4 && command.compare(0,4,"warp") == 0)
  2.                 {
  3.                     std::string loc = arguments[0];
  4.                     if (this->player->character->mapid == static_cast<int>(this->server->world->config["JailMap"]))
  5.                     {
  6.                         break;
  7.                     }
  8.                     if(static_cast<int>(this->server->world->warps_config[loc + ".map"]) > 0)
  9.                     {
  10.                         int Map = static_cast<int>(this->server->world->warps_config[loc + ".map"]);
  11.                         int X = static_cast<int>(this->server->world->warps_config[loc + ".x"]);
  12.                         int Y = static_cast<int>(this->server->world->warps_config[loc + ".y"]);
  13.  
  14.                         if(X > 0 && Y > 0)
  15.                         {
  16.                             if(static_cast<std::string>(this->server->world->warps_config["WarpsAnimation"]) == "none")
  17.                             {
  18.                                 this->player->character->Warp(Map, X, Y, WARP_ANIMATION_NONE);
  19.                             }
  20.                             else
  21.                             {
  22.                                 this->player->character->Warp(Map, X, Y, WARP_ANIMATION_ADMIN);
  23.                             }
  24.                         }
  25.                     }
  26.                 }
Advertisement
Add Comment
Please, Sign In to add comment