Warp command "V2" menu

User Tag List

Results 1 to 3 of 3
  1. #1
    LilleCarl's Avatar Active Member
    Reputation
    65
    Join Date
    Feb 2008
    Posts
    132
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Warp command "V2"

    Sup ladies? Well i rewrote parts of Pntzyou's (credits given in code) code. Now its using incremental xyzo orientation instead of rlfbudo (xD) Well i added orientation, enabled decimal values for teleportation, changed so you use xyzo etc...

    X=Left and right
    Y=Forward and backward
    Z=Up and down
    O=Rotation

    Example of what you can do with this shit:

    Another Warp Test!

    Command example if properly implented:
    Code:
    .warp y 13.678
    .warp y -13.678
    Code:
    bool ChatHandler::HandleWarpCommand(char* args)
    {
        // Based on a concept by Pwntzyou
        if (!*args)
            return false;
    
        Player* _player = m_session->GetPlayer();
    
        char* arg1 = strtok((char*)args, " ");
        char* arg2 = strtok(NULL, " ");
    
        if (!arg1 || !arg2)
            return false;
    
        char dir = arg1[0];
        float value = float(atof(arg2));
        float x = _player->GetPositionX();
        float y = _player->GetPositionY();
        float z = _player->GetPositionZ();
        float o = _player->GetOrientation();
    
        if ((dir != 'x' && dir != 'y' && dir != 'z' && dir != 'o') || value == 0.f)
        {
            ChatHandler(_player).PSendSysMessage("%s[Warp Info]%s Incorrect values, correct direction parameters is: x,y,z and o. Correct range/degree parameter is everything above or under 0.",MSG_COLOR_MAGENTA,MSG_COLOR_WHITE,value);
            return true;
        }
    
        switch (dir)
        {
        case 'x':
            {
                x = x + cos(o-(M_PI/2))*value;
                y = y + sin(o-(M_PI/2))*value;
    
                _player->NearTeleportTo(x,y,z,o);
    
                ChatHandler(_player).PSendSysMessage("%s[Warp Info]%s You teleported %g yards in x direction",MSG_COLOR_MAGENTA,MSG_COLOR_WHITE,value);
            }
            break;
        case 'y':
            {
                x = x + cosf(o)*value;
                y = y + sinf(o)*value;
    
                _player->NearTeleportTo(x,y,z,o);
    
                ChatHandler(_player).PSendSysMessage("%s[Warp Info]%s You teleported %g yards in y direction",MSG_COLOR_MAGENTA,MSG_COLOR_WHITE,value);
            }
            break;
        case 'z':
            {
                _player->NearTeleportTo(x,y,z+value,o);
    
                ChatHandler(_player).PSendSysMessage("%s[Warp Info]%s You teleported %g yards in z direction",MSG_COLOR_MAGENTA,MSG_COLOR_WHITE,value);
            }
            break;
        case 'o':
            {
                o = MapManager::NormalizeOrientation((value * M_PI_F/180.0f)+o);
    
                _player->NearTeleportTo(x,y,z,o);
                ChatHandler(_player).PSendSysMessage("%s[Warp Info]%s You rotated %g degrees (%g radians)",MSG_COLOR_MAGENTA,MSG_COLOR_WHITE,value,value * M_PI / 180.0f);
                ChatHandler(_player).PSendSysMessage("%sCurrent radian/degree: %g %g",MSG_COLOR_WHITE,o,o*180.0f/M_PI);
            }
            break;
        }
        return true;
    }
    If you need help with how to install it, ask someone else. I didn't write this to be your personal assistant, i wrote this because i wanted to write some code.

    PS: Written for MaNGOS but easily portable to: OregonCore, TrinityCore, SkyFire. Portable to arcemu with a lil more modification
    Last edited by LilleCarl; 06-25-2012 at 11:49 PM.
    Violence doesn't solve shit, but everything else.

    Warp command "V2"
  2. #2
    parranoia's Avatar Member
    Reputation
    14
    Join Date
    Feb 2008
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pretty neat command and could be very useful to some. +rep

  3. #3
    LilleCarl's Avatar Active Member
    Reputation
    65
    Join Date
    Feb 2008
    Posts
    132
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by parranoia View Post
    Pretty neat command and could be very useful to some. +rep
    Thank you sir! I appreciate that! In my opinion this command should be implented stock into both mangos trinity and arcemu.. I mean it is very helpful when spawning stuff (maby not blizzlike stuff i guess its all parsed.) But for peeps who spawn stuff this is very useful. Im thinking about to implent a "VMAP TOGGLE" aswell, to make you able to teleport in x and y (and get destionation Z from vmap height) Do you think that would be useful for people aswell? =)
    Violence doesn't solve shit, but everything else.

Similar Threads

  1. Quotes from Steven Write
    By Amedis in forum Community Chat
    Replies: 2
    Last Post: 11-14-2022, 10:26 AM
  2. [C++ Script] [TrinityCore] Warp command
    By kaios95 in forum WoW EMU General Releases
    Replies: 3
    Last Post: 07-05-2012, 08:42 PM
  3. WTB Powerleveling - Need Quotes!!
    By Drovos in forum Members Only Gold And Powerleveling Buy Sell
    Replies: 7
    Last Post: 10-14-2007, 10:26 AM
  4. Quote: For a Steam Account!
    By Obama in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 0
    Last Post: 09-16-2007, 07:57 PM
  5. Funny GM quotes
    By shadowfox47 in forum World of Warcraft General
    Replies: 9
    Last Post: 08-13-2007, 07:24 PM
All times are GMT -5. The time now is 10:39 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search