[ASCENT] Adding custom GM commands w/ pics! menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [ASCENT] Adding custom GM commands w/ pics!

    Okay, From the start here i want to say for all of you who have no idea what i mean when i list these words: C++, uint32, Chat.cpp, Visual Studio 2008. Please leave if you are a total C++ n00b. Adding commands is basic, making them do anything is harder.

    #####Table of Contents#####


    1. Intro
    2. Step 1: Making sure you have the source and opening the proper files
    3. Step 2: Adding Directives to Chat.h
    4. Step 3: Adding Directives to Chat.cpp
    5. Step 4: Adding Directives to Levelx.cpp
    6. Step 5: Testing it out and seeing it work.


    ##### INTRO #####

    In this guide, i will show you how to add custom GM commands. When i say custom i mean it will be .<yourcommand> etc. etc. THIS GUIDE IS FOR ASPIRE HS, OTHER EMUS USE A DIFFERENT C++ MODE, THIS WILL NOT WORK FOR ARCEMU!!!!!!! Adding the command to the core is simple. For the this tutorial we will add a command called .uber. This command will level you to 80, make you a cool looking etheral and forst blast the whole area as sort of a SUPER-NORTHREND-LEVEL EFFECT!

    ##### STEP 1:
    Making sure you have the source and opening the proper files #####

    1. Open to your source folder and navigate to /win/
    2. open hearthstone2008 or whatever.
    3. Once in there expand the project hearthstone-world, and then expand the folder "Chat" it should be the third one down.
    4. Open chat.h, chat.cpp, and Level3.cpp.

    If you havent downloaded the source yet go search "Compiling Hearthstone" on MMOwned and find a good guide. YOU CANT DO THIS W/ A REPACK!.

    Now you can move on to step 2!!!

    ##### STEP 2: ADDING DIRECTIVES TO CHAT.H #####

    1. Press Ctrl+F and tell it to look for this:
    Code:
    bool HandlePlayerInfo(const char* args, WorldSession * m_session);
    2. Once you have found it copy it and then paste it on the next blank line.
    3. once you have pasted it, Change PlayerInfo to UberCommand.
    4. You are all done here! If it lloks like this:

    Move on to step 3!


    ##### STEP 3: ADDING DIRECTIVES TO CHAT.CPP #####

    1. Find this
    Code:
    { "clearbones", 'm', &ChatHandler::HandleClearBonesCommand, "", NULL, 0, 0, 0 },
    add another extra line after that and paste in this:

    Code:
    { "uber", 'm', &ChatHandler::HandleUberCommand, ".uber A Custom GM command unique to this server!", NULL, 0, 0, 0 },
    2. If it looks like this then you are good.

    3. continue to step 4

    ##### STEP 4: ADDING DIRECTIVES TO LEVEL3.CPP ####

    Just a quick not, it doesnt have to be level3.cpp it can be any level, i just made this code to only work on level3.cpp.

    1. go to the bottom of the file, and then add 1 extra line.
    2. copy and paste this:


    Code:
    bool ChatHandler::HandleUberCommand(const char* args, WorldSession * m_session)
    {    
        PlayerPointer plr = m_session->GetPlayer();
        SpellEntry * info = dbcSpell.LookupEntry(28524);
        SpellPointer Frosty(new Spell(plr, info, true, NULLAURA));
        LevelInfo* Info = objmgr.GetLevelInfo(plr->getRace(), plr->getClass(), 80);
        plr->CastSpell(Frosty);
        plr->ApplyLevelInfo( Info, 80 );
        plr->ModUnsigned32Value( UNIT_FIELD_DISPLAYID, 21078);
        BlueSystemMessageToPlr( plr, "I leveled you to 80 and morphed you with a custom GM command!");
        return true;
    }


    3. It should look like this:

    4. NOw move on to step 5.

    ##### STEP 5: TESTING IT OUT! #####

    1. Compile the core, you shouldn't get any errors.
    2. take your new .exe files and put them in your server folder.
    3. Login to wow, type in .uber when targeting yourself or someone else and it should work!


    Well, for now im all done, but post any problems / concerns in this thread and i will try to answer them !

    Cheers,
    Insignia96



    Arcemu Addition (credit mager1794!):

    In Step 3

    Instead of finding

    Code:
    { "clearbones", 'm', &ChatHandler::HandleClearBonesCommand, "", NULL, 0, 0, 0 },





    put this


    Code:
    { "triggerpass", 'm', &ChatHandler::HandleTriggerpassCheatCommand, "Ignores area trigger prerequisites.",             NULL, 0, 0, 0 },


    And then

    In step 4


    Instead of

    Code:
    bool ChatHandler::HandleUberCommand(const char* args, WorldSession * m_session)
    {    
        PlayerPointer plr = m_session->GetPlayer();
        SpellEntry * info = dbcSpell.LookupEntry(28524);
        SpellPointer Frosty(new Spell(plr, info, true, NULLAURA));
        LevelInfo* Info = objmgr.GetLevelInfo(plr->getRace(), plr->getClass(), 80);
        plr->CastSpell(Frosty);
        plr->ApplyLevelInfo( Info, 80 );
        plr->ModUnsigned32Value( UNIT_FIELD_DISPLAYID, 21078);
        BlueSystemMessageToPlr( plr, "I leveled you to 80 and morphed you with a custom GM command!");
        return true;
    }


    Place this

    Code:
    bool ChatHandler::HandleUberCommand(const char* args, WorldSession * m_session)
    {    
        Player * plr = m_session->GetPlayer();
        SpellEntry * info = dbcSpell.LookupEntry(28524);
        LevelInfo* Info = objmgr.GetLevelInfo(plr->getRace(), plr->getClass(), 80);
        plr->CastSpell(plr,info,true);
        plr->ApplyLevelInfo( Info, 80 );
        plr->ModUnsigned32Value(UNIT_FIELD_DISPLAYID, 21078);
        sChatHandler.BlueSystemMessageToPlr(plr, "I leveled you to 80 and morphed you with a custom GM command!");
        return true;
    }


    Remeber i didn't make this mager1794 did for all u arcemu users out there!


    Last edited by insignia96; 06-10-2009 at 04:47 PM. Reason: added arcemu section

    [ASCENT] Adding custom GM commands w/ pics!
  2. #2
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1190
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now this is a guide worthy of my +11
    If you need me you have my skype, if you don't have my skype then you don't need me.

  3. #3
    ChildeRoland's Avatar Active Member
    Reputation
    54
    Join Date
    Oct 2008
    Posts
    556
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should change a little on the colors on the top, hard to read Great guide, take a rep.

  4. #4
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @ 2d AMG Instant leecher cure ! Thanks man.

    @ Childe Wat colors are hard to read, i used a diff color / font in every paragraph

    To all, i am sorry, the code i had up for a while would crash the server if you used .uber, but after a few back and forths i got a code that is pretty cool and works perfectly!

  5. #5
    SilverFire's Avatar Member
    Reputation
    22
    Join Date
    Jan 2007
    Posts
    84
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i was rly looking for this, thx dude

  6. #6
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    YAY! I liek replies!

    SERIOUS: I am really glad that ppl find this guide helpful!

  7. #7
    Lytle69's Avatar Member
    Reputation
    13
    Join Date
    Aug 2008
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sweet Deal. Ima gonna try this later =]
    Although I do use ArcEmu, this can just be a reference.
    Last edited by Lytle69; 06-07-2009 at 08:51 PM.

  8. #8
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For ArcEmu the only difference is in the LevelX.cpp Stuff. Arc uses a different namespace so youll have to find an arc user who knows their c++ format.


  9. #9
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work mate. Thanks for the contribution. +Rep x2
    Edit - Rep Timer FTL


  10. #10
    Shadowz987's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so quick question, would it be possible to create a command to have npcs equip items like along the lines of
    .npc equip <model Id>
    or does it have limitations

  11. #11
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really nice guide Bro +Rep x3
    Lunar Gaming - Reaching For The Stars

  12. #12
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shadowz987 View Post
    so quick question, would it be possible to create a command to have npcs equip items like along the lines of
    .npc equip <model Id>
    or does it have limitations
    This is possible as in being able to add subcommands to other commands. I may add a section to the guide on how 2 do this. As for what you are asking, if you poke around in the core a bit i think there might be something like this that might work. (this is off the top of my head)

    Code:
    CreaturePointer crt = getSelectedCreature(m_session);
    
    crt->ModUnsigniedInt32Value( UNIT_FIELD_EQUIP_MAIN, item );
    something along those lines, as i said b4 tho just poke around in the core src.

  13. #13
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Added Arcemu section. Credits to mager1794!

  14. #14
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay guys, i have figured out the proper way, i think :P (testing atm), to add a command that has subcommands, such as:

    Code:
    .test something
    .test somethingelse
    .test etc

    I will add a sectiom to the guide tomorrow when i confirm it if ppl want it. If nobody cares i wont bother cuz it is an easy, but time consuming process to make a guide on it and i am lazy.

    Also adding subcommands to an existing command is easy. I will add that if it is needed also.

    Regards,
    Insignia96


    EDIT: AMG!! I triple posted my own thread! I better stop it or i might have to flame myself!

  15. #15
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol here ya go Insig, just to make sure you don't go for a quad-post
    Lunar Gaming - Reaching For The Stars

Page 1 of 2 12 LastLast

Similar Threads

  1. [Question] Adding Custom Items with Cutom Display ID's??
    By Reshnaak in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 12-22-2007, 10:59 AM
  2. adding custom music
    By PRIMO12 in forum World of Warcraft Emulator Servers
    Replies: 13
    Last Post: 12-16-2007, 10:05 AM
  3. [Ascent]Added New GM command !! Change Gender of characters!
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 27
    Last Post: 11-07-2007, 05:37 AM
  4. Adding Custom Portals?
    By lazboy in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 08-31-2007, 12:42 PM
All times are GMT -5. The time now is 07:12 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