Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- <--------------------------------------------------------------------------->
- - Developer(s): Ghostcrawler336
- - Complete: 100%
- - ScriptName: 'Custom Mall Command'
- - Comment: Tested & Working
- <--------------------------------------------------------------------------->
- */
- #include "ScriptPCH.h"
- class mall_tele_commandscript : public CommandScript
- {
- public:
- mall_tele_commandscript() : CommandScript("mall_tele_commandscript") { }
- ChatCommand* GetCommands() const
- {
- static ChatCommand mallTeleCommandTable[] =
- {
- { "mall", rbac::RBAC_PERM_COMMAND_MALL, false, &HandlemallTeleCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
- return mallTeleCommandTable;
- }
- static bool HandlemallTeleCommand(ChatHandler* handler, const char* /*args*/)
- {
- Player* player = handler->GetSession()->GetPlayer();
- if (player->IsInCombat())
- {
- player->GetSession()->SendNotification("You cannot use this in combat!");
- return false;
- }
- if (player->GetTeam() == ALLIANCE)
- player->TeleportTo(530, -703.369568f, 2732.057129f, 94.733597f, 4.716630f); // Alliance mall coords (MAP, X, Y, Z, O)
- else
- player->TeleportTo(530, 236.090576f, 2697.517090f, 90.588188f, 3.134510f); // Horde mall coords (MAP, X, Y, Z, O)
- return true;
- }
- };
- void AddSC_mall_commandscript()
- {
- new mall_tele_commandscript();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement