The most useful GM command ever! menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The most useful GM command ever!

    Here is a GM command I wrote up some time ago named "warp"

    Syntax: .warp direction value


    direction = f, b, u, d, rotate
    (forward, backward, up, down, rotate)


    value: 1-360


    This nifty little command will teleport your character (direction) (value).
    Basically instead of manually inputting coordinates to get through objects, you can just type my command and you will port yourself though them.

    This is EXTREMELY helpful for spawning things (especially game objects!)

    Not sure why this has not been made an actual command already!

    Installation is pretty self explanatory if you look at the code below. You just need to add three different parts to three different files and then compile your server like normal.
    Code:
    //Made by: Pwntzyou!
    //DONT JACK THIS SHIT AND TAKE CREDIT FOR IT OR I WILL FIND AND KILL YOU
    
    //ADD TO level3.cpp
    //(In all honesty it really does not matter which levelX.cpp you put it unless you want to restrict that level of command
    
    bool ChatHandler::HandleWarpCommand(const char* args, WorldSession *m_session)
    {
        char dir;
        float value;
    
        if(sscanf(args, "%f %c", &value, &dir) < 1) return false;
        
        if(value > 360)
            return false;
    
        switch(tolower(dir))
        {
        //Made by: Pwntzyou!
        case 'u':
            {
                m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ() + (float)value, m_session->GetPlayer()->GetOrientation());
            }
            break;
    
        case 'd':
            {
                m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ() - (float)value, m_session->GetPlayer()->GetOrientation());
            }
            break;
        
        case 'f':
           {
                float x = m_session->GetPlayer()->GetPositionX() + cosf(m_session->GetPlayer()->GetOrientation())*value;
                float y = m_session->GetPlayer()->GetPositionY() + sinf(m_session->GetPlayer()->GetOrientation())*value;
                m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), x, y, m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetOrientation());
            }
            break;
    
        case 'b':
            {
               //Made by: Pwntzyou!
                float x = m_session->GetPlayer()->GetPositionX() - cosf(m_session->GetPlayer()->GetOrientation())*value;
                float y = m_session->GetPlayer()->GetPositionY() - sinf(m_session->GetPlayer()->GetOrientation())*value;
                m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), x, y, m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetOrientation());
            }
            break;
    
        case "rotate":
        {
               //In degrees -> Radians
           float radian = value * 180 / 3.14159265;
           m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetOrientation() + radian);
        }
        break;
    
    
    
        default:
            RedSystemMessage(m_session, "Invalid Direction, Please use forward(f) backward(b) up(u) down(d)");
        }
        return true;
    }
    
    
    
    
    
    
    // Chat.cpp
    //ADD TO BOTTOM OF "static ChatCommand commandTable[] ="
    // {
    //    ...
    //    ...
    //    ...
    //    HERE
    //    ...
    // }
    
    
    { "warp", 'm', &ChatHandler::HandleWarpCommand, "Warp the player (1-100) coordinates forward(f) backward(b) up(u) down(d).",
    
    
    
    
    
    
    
    // Chat.h
    // Add the following in Chat.h where similar things are        
    // Should looks something like this
    // Level 0 Commands
    // ...
    // ...
    // ...
    // HERE
    
    bool HandleWarpCommand(const char * args, WorldSession * m_session);                                                       NULL,                     0, 0, 0 },
    This *should* work with *most* emulators (Arcemu / Aspire / w.e) but if it does not, getting it to work will not be hard.
    Last edited by Pwntzyou; 10-15-2009 at 04:58 PM.

    <3 MysterioussouL for the sig

    The most useful GM command ever!
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Tbh this is just for lazy people, it takes about 10 seconds to type .gps, then .worldport with a couple added on to X or whatever. Still, a nice script so +Rep

  3. #3
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    Tbh this is just for lazy people, it takes about 10 seconds to type .gps, then .worldport with a couple added on to X or whatever. Still, a nice script so +Rep
    I know, but when you need to do something like spawning 100 walls partially underground, something like this is a lifesaver

    ...trust me >.<!

    And thanks!

    <3 MysterioussouL for the sig

  4. #4
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great script, just tried it out and it works perfectly!

    This is going to save me a lot of time, Thank you so much!

    +Repx2

    edit: Love the fact that it teleports you forward or backwards relative to your players orientation.
    Last edited by Vision1000; 10-10-2009 at 05:42 PM.

  5. #5
    alj03's Avatar Contributor
    Reputation
    91
    Join Date
    Feb 2008
    Posts
    1,103
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks good mate. +Rep.
    Death to all but Metal.

  6. #6
    Apple Pi's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2009
    Posts
    108
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you also do orientation too? I wold make it 500* more epic
    What once was Moonblade rose from the ashes as Apple Pi!

  7. #7
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by moonblade0421 View Post
    Could you also do orientation too? I wold make it 500* more epic
    This uses orientation...

    Hence *forward / backward*

    so it ports you in the direction you are facing

    <3 MysterioussouL for the sig

  8. #8
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha, the human always tries to make everything easier cause we're so lazy xD.
    This is very "lazy-creative" I can't get my hands of the +Rep button ^^
    Why do I need a signature?

  9. #9
    jerrkan's Avatar Active Member
    Reputation
    84
    Join Date
    Sep 2007
    Posts
    148
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice 1 repx3 for you


  10. #10
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sexy Release is Sexy. +Rep

  11. #11
    jordddm's Avatar Member
    Reputation
    11
    Join Date
    Nov 2007
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    didnt work for me

    Code:
    >------ Build started: Project: arcemu-world, Configuration: Release Win32 ------
    1>Compiling...
    1>StdAfx.cpp
    1>Compiling...
    1>faction.cpp
    1>RecallCommands.cpp
    1>QuestCommands.cpp
    1>Level3.cpp
    1>Level2.cpp
    1>..\..\src\arcemu-world\Level3.cpp(4026) : error C2601: 'ChatHandler::HandleWarpCommand' : local function definitions are illegal
    1> ..\..\src\arcemu-world\Level3.cpp(3940): this line contains a '{' which has not yet been matched
    1>..\..\src\arcemu-world\Level3.cpp(4073) : fatal error C1075: end of file found before the left brace '{' at '..\..\src\arcemu-world\Level3.cpp(3940)' was matched
    1>Level1.cpp
    1>Level0.cpp
    1>InstanceCommands.cpp
    1>GMTicketCommands.cpp
    1>debugcmds.cpp
    1>BattlegroundCommands.cpp
    1>WorldRunnable.cpp
    1>DayWatcherThread.cpp
    1>CommonScheduleThread.cpp
    1>SpellTarget.cpp
    1>SpellFixes.cpp
    1>SpellEffects.cpp
    1>Spell.cpp
    1>WorldSession.cpp
    1>AreaTrigger.cpp
    1>VoiceChatHandler.cpp
    1>TradeHandler.cpp
    1>TaxiHandler.cpp
    1>SpellHandler.cpp
    1>SocialHandler.cpp
    1>SkillHandler.cpp
    1>ReputationHandler.cpp
    1>RaidHandler.cpp
    1>QuestHandler.cpp
    1>QueryHandler.cpp
    1>PetHandler.cpp
    1>NPCHandler.cpp
    1>MovementHandler.cpp
    1>MiscHandler.cpp
    1>LfgHandler.cpp
    1>ItemHandler.cpp
    1>HonorHandler.cpp
    1>GuildHandler.cpp
    1>GroupHandler.cpp
    1>GMTicket.cpp
    1>DuelHandler.cpp
    1>CombatHandler.cpp
    1>ChatHandler.cpp
    1>CharacterHandler.cpp
    1>ChannelHandler.cpp
    1>BattlegroundHandler.cpp
    1>LogonCommHandler.cpp
    1>LogonCommClient.cpp
    1>WorldSocket.cpp
    1>VoiceChatClientSocket.cpp
    1>UnixMetric.cpp
    1>Opcodes.cpp
    1>AuctionMgr.cpp
    1>AuctionHouse.cpp
    1>WorldCreator.cpp
    1>TerrainMgr.cpp
    1>TaxiMgr.cpp
    1>ScriptMgr.cpp
    1>QuestMgr.cpp
    1>LocalizationMgr.cpp
    1>EventMgr.cpp
    1>AddonMgr.cpp
    1>AchievementMgr.cpp
    1>ConsoleListener.cpp
    1>ConsoleCommands.cpp
    1>CConsole.cpp
    1>Master.cpp
    1>Main.cpp
    1>WorldState.cpp
    1>World.cpp
    1>WeatherMgr.cpp
    1>Quest.cpp
    1>ObjectMgr.cpp
    1>MapScriptInterface.cpp
    1>MapMgr.cpp
    1>MapCell.cpp
    1>Map.cpp
    1>CollideInterface.cpp
    1>MailSystem.cpp
    1>LootMgr.cpp
    1>LfgMgr.cpp
    1>ArenaTeam.cpp
    1>Arenas.cpp
    1>WarsongGulch.cpp
    1>StrandOfTheAncient.cpp
    1>EyeOfTheStorm.cpp
    1>BattlegroundMgr.cpp
    1>ArathiBasin.cpp
    1>AlteracValley.cpp
    1>SpellAuras.cpp
    1>ObjectContainer.cpp
    1>ItemInterface.cpp
    1>Item.cpp
    1>Container.cpp
    1>TransporterHandler.cpp
    1>GameObject.cpp
    1>DynamicObject.cpp
    1>Corpse.cpp
    1>Vehicle.cpp
    1>Pet.cpp
    1>Creature.cpp
    1>SpeedDetector.cpp
    1>PlayerPacketWrapper.cpp
    1>Player.cpp
    1>..\..\src\arcemu-world\Player.cpp(38) : warning C4355: 'this' : used in base member initializer list
    1>Guild.cpp
    1>Group.cpp
    1>Unit.cpp
    1>Stats.cpp
    1>Object.cpp
    1>EventableObject.cpp
    1>ObjectStorage.cpp
    1>DatabaseCleaner.cpp
    1>AIInterface.cpp
    1>WordFilter.cpp
    1>WayPoints.cpp
    1>Chat.cpp
    1>..\..\src\arcemu-world\Chat.cpp(773) : error C2144: syntax error : 'bool' should be preceded by '}'
    1>..\..\src\arcemu-world\Chat.cpp(773) : error C2144: syntax error : 'bool' should be preceded by '}'
    1>..\..\src\arcemu-world\Chat.cpp(773) : error C2144: syntax error : 'bool' should be preceded by ';'
    1>..\..\src\arcemu-world\Chat.cpp(773) : error C2143: syntax error : missing ';' before '}'
    1>..\..\src\arcemu-world\Chat.cpp(773) : error C2059: syntax error : ','
    1>..\..\src\arcemu-world\Chat.cpp(775) : error C2143: syntax error : missing ';' before '{'
    1>..\..\src\arcemu-world\Chat.cpp(775) : error C2447: '{' : missing function header (old-style formal list?)
    1>..\..\src\arcemu-world\Chat.cpp(776) : error C2059: syntax error : '}'
    1>..\..\src\arcemu-world\Chat.cpp(776) : error C2143: syntax error : missing ';' before '}'
    1>..\..\src\arcemu-world\Chat.cpp(776) : error C2059: syntax error : '}'
    1>..\..\src\arcemu-world\Chat.cpp(777) : error C2059: syntax error : 'this'
    1>..\..\src\arcemu-world\Chat.cpp(780) : error C2065: '_commandTable' : undeclared identifier
    1>..\..\src\arcemu-world\Chat.cpp(781) : error C2059: syntax error : 'while'
    1>..\..\src\arcemu-world\Chat.cpp(782) : error C2143: syntax error : missing ';' before '{'
    1>..\..\src\arcemu-world\Chat.cpp(782) : error C2447: '{' : missing function header (old-style formal list?)
    1>..\..\src\arcemu-world\Chat.cpp(792) : error C2059: syntax error : '}'
    1>..\..\src\arcemu-world\Chat.cpp(792) : error C2143: syntax error : missing ';' before '}'
    1>..\..\src\arcemu-world\Chat.cpp(792) : error C2059: syntax error : '}'
    1>..\..\src\arcemu-world\Chat.cpp(795) : error C2143: syntax error : missing ';' before '{'
    1>..\..\src\arcemu-world\Chat.cpp(795) : error C2447: '{' : missing function header (old-style formal list?)
    1>Channel.cpp
    1>Build log was saved at "file://c:\Users\Jordan\Desktop\Arcemu\branches\untested\win\VC90\arcemu-world___Win32_Release\BuildLog.htm"
    1>arcemu-world - 22 error(s), 1 warning(s)
    ========== Build: 0 succeeded, 1 failed, 5 up-to-date, 0 skipped ==========
    


  12. #12
    Apple Pi's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2009
    Posts
    108
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mean want way you are facing such as turning in 90 deg or such
    What once was Moonblade rose from the ashes as Apple Pi!

  13. #13
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by moonblade0421 View Post
    I mean want way you are facing such as turning in 90 deg or such

    I am not sure what you mean T_T


    Like i said before my script does make use of "degrees" (It actually uses radians) to use the player's orientation when porting forward and such
    Last edited by Pwntzyou; 10-11-2009 at 01:21 PM.

    <3 MysterioussouL for the sig

  14. #14
    Zudrik's Avatar Member
    Reputation
    52
    Join Date
    Dec 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Pwntzyou View Post
    I am not sure what you mean T_T


    Like i said before my script does make use of "degrees" (It actually uses radians) to use the player's orientation when porting forward and such
    They mean instead of warping to a different location or whatever, just change the direction they are facing (i.e. 90 degree turn).

  15. #15
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Zudrik View Post
    They mean instead of warping to a different location or whatever, just change the direction they are facing (i.e. 90 degree turn).
    Ahh now that makes sense, I added it to the code but it is untested (Took about two seconds btw)


    .warp rotate X

    X can be 1-360
    Last edited by Pwntzyou; 10-11-2009 at 10:19 PM.

    <3 MysterioussouL for the sig

Page 1 of 3 123 LastLast

Similar Threads

  1. The most players I've ever seen in a video game
    By advanta in forum World of Warcraft General
    Replies: 5
    Last Post: 10-15-2014, 09:36 AM
  2. Replies: 61
    Last Post: 05-20-2008, 06:58 PM
  3. [Authentication / unable to connect] The most horrific server mess EVER
    By Ghosthopper in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 02-03-2008, 01:24 AM
  4. The most useful tutorial you will ever come across.
    By Marlo in forum World of Warcraft General
    Replies: 9
    Last Post: 12-20-2006, 04:14 PM
All times are GMT -5. The time now is 01:16 PM. 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