Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 2 of 2

Thread: Player Commands

  1. #1
    Contributor
    StickyIcky's Avatar
    Join Date
    Jul 2008
    Location
    127.0.0.1
    Posts
    747
    Post Thanks / Like
    Rep Power
    19
    Reputation
    188

    Player Commands


    Register to remove this ad
    Code:
    //---------------------
    // Name: Player Commands
    // Author: WigSplitta
    //---------------------
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    #define map Insert Map ID Here
    #define x Insert X Coords Here
    #define y Insert Y Coords Here
    #define z Insert Z Coords Here
    #define o Insert Orientation Here
    
    #ifdef WIN32
    #pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    //If set to true, will enable players to #event while in combat
    static bool bypassCombat = false;
    
    static string mall = "#mall";
    
    void PlrCom(Player * Plr, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
    {
        if(Message == mall)
        {
            if(Plr->IsPvPFlagged())
            {
                Plr->BroadcastMessage("You can't be PVP Flagged when porting to the mall.");
            }
            else
            {
                if(Plr->CombatStatus.IsInCombat())
                    {
                        Plr->BroadcastMessage("You can't port while in combat.");
                    }
                    else
                    {
                        Plr->EventTeleport(map, x, y, z);
                        Plr->SetOrientation(o);
                    }
            }
        }
    }
    
    void SetupPlayerCommands(ScriptMgr * mgr)
    {
       mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, &PlrCom);
    }
    If people want me to make them custom commands or custom player commands, just ask here.




    › See More: Player Commands
    Last edited by StickyIcky; 02-08-08 at 05:07 PM.



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Sergeant

    Join Date
    Jul 2008
    Location
    In Earth
    Posts
    84
    Post Thanks / Like
    Rep Power
    17
    Reputation
    11

    Register to remove this ad
    This is cool, now i can make more comamnds .. GJ +3 rep
    Did u make it or Copy it?

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 01:31 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org