[C++] Making Your Own Configurations menu

Shout-Out

User Tag List

Results 1 to 10 of 10
  1. #1
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Making Your Own Configurations

    *******************************
    **For this tutorial, you need...
    **Visual C++
    **C++ Knowledge
    **To know how to compile ArcEmu
    *******************************

    *******************************
    **All credits for this tutorial go to:
    **DrakeFish
    **I figured how to do this my myself
    *******************************


    First of all, you need to know what you want to do with this. If you don't have any idea of custom configurations, this tutorial may be useless to you.

    First Step: The .conf File

    I will start by the main thing, the .conf files. For this tutorial, I'm adding options to the arcemu-optional.conf file. To add a new configuration to it, just use this form:

    Code:
    <Category Option = "Value"
        Option = "Value"
        Option = "Value">
    Category: Your category name(for example: MessagesOptions).
    Option: This is your Option name(for example: MessageColor).
    Value: This is your option value


    Second Step: Making the Configuration a Function

    The next step is where it gets harder to understand. You will need to go in the World.cpp file of your ArcEmu source. Search for AnnounceColorChooser using the find option. When you find it, make 2 line under it. this place will contain your new configurations.
    Now you have to choose what will be the name of your configuration function(I take Example_One as example).
    Now use this form for every Configurations:

    Code:
    Example_One = Config.OptionalConfig.GetStringDefault("Category", "Option", "Value");
    Example_One: The function name(will be used later)
    String: If your value is going to be a text, use String. If your value is going to be True/False(1/0), use Bool.
    Category:This is the category that you used in your .conf file.
    Option: This is the option name that you used in .conf file.
    Value: This is your default value(if theres nothing entered in the .conf file.) If you use Bool, this will be True or False(But in the .conf file, use 1 for true and 0 for false.


    Third Step: Including The Function

    The next step is to include the function to World.h(This is important because if you don't do it your Options won't work). Open World.h, search for "void AnnounceColorChooser" (Without ""), and again, make 2 line under it.

    If your Value is going to be True/False(1/0), use this form:

    Code:
    bool Example_One;
    If your Value is going to be a text, use this form:
    Code:
    std::string Example_One;
    Example_One: This is the function name used in the Second Step.


    Fourth Step: Using the Function

    Now that your done with the making of the configuration, you will see how to use it.

    My first example is changing the message whispered to the player when they write to a gm that has ".gm on" activated and allowing or not this message to be sent.
    My functions names are: GmOnMessageAllow and GmOnMessage
    Search for "This Game Master does not" (without the "") And now you should see this:

    Code:
                if(!_player->GetSession()->GetPermissionCount() && player->bGMTagOn && player->gmTargets.count(_player) == 0)
                {
                    // Build automated reply
                    string Reply = "This Game Master does not currently have an open ticket from you and did not receive your whisper. Please submit a new GM Ticket request if you need to speak to a GM. This is an automatic message.";
                    data = sChatHandler.FillMessageData( CHAT_MSG_WHISPER, LANG_UNIVERSAL, Reply.c_str(), player->GetGUID(), 3);
                    SendPacket(data);
                    delete data;
                    break;
                }
    And I'm changing it for :
    Code:
                if(!_player->GetSession()->GetPermissionCount() && player->bGMTagOn && player->gmTargets.count(_player) == 0)
                {
                    // Build automated reply
                    if ( sWorld.GmOnMessageAllow )
                    {
                    string Reply = sWorld.GmOnMessage;
                    data = sChatHandler.FillMessageData( CHAT_MSG_WHISPER, LANG_UNIVERSAL, Reply.c_str(), player->GetGUID(), 3);
                    SendPacket(data);
                    delete data;
                    break;
                    }
                }
    GmOnMessageAllow: This is the function name, the function needs to be a Bool one for this.
    GmOnMessage: This is the function name, the function needs to be a String one for this.



    More Information About Functions and Values

    What's a Bool and what's a String?
    A bool is a True or False value that will be shown in the .conf file as 1(for true) and 0(for false). This one is mostly used to allow or disallow something.
    A string is a text value that can contain any characters like ABC,123, dots, and such(but can't contain "). The MOTD is a good example of one. This is mostly used to show some text in a script. Using it as .conf file will make it easier to be changed instead of editing and compiling the whole script again.


    Some of my related tutorials
    Broadcast when a GM logins




    ------------------------------------------------------
    -This tutorial is updated to show you more tips-
    ------------------------------------------------------
    Last edited by darkgabou15; 11-01-2008 at 10:49 PM. Reason: Updated

    [C++] Making Your Own Configurations
  2. #2
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1192
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This sir is a good guide, +9 from me
    If you need me you have my skype, if you don't have my skype then you don't need me.

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Very detailed and colourfull guide <3 Without the colours probably would of skim read most of it :P +Rep

  4. #4
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice. +rep

    I live in a shoe

  5. #5
    Fireblast's Avatar Contributor
    Reputation
    195
    Join Date
    Aug 2008
    Posts
    883
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is helpful!

  6. #6
    tyrial's Avatar Member
    Reputation
    7
    Join Date
    Oct 2008
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice nice but it looks awful familiar

  7. #7
    Swenky's Avatar Member
    Reputation
    5
    Join Date
    Feb 2007
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    awesome guide.

  8. #8
    Moaradin's Avatar Contributor
    Reputation
    163
    Join Date
    Feb 2008
    Posts
    439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very good guide. +Rep from me!

    +rep people who help you

  9. #9
    razorwolf49's Avatar Member
    Reputation
    6
    Join Date
    Jul 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would this be possible to do in Lua ? because i can do just about anything in LUA .. i would love to understand c++ tho. =)

  10. #10
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is only makeable on C++, not with LUA. C++ is used by making programs and LUA is made for extension programs

Similar Threads

  1. [Easy] How to Make Your Own WoW Forum Avatar!
    By Roflcopterzzz in forum Art & Graphic Design
    Replies: 21
    Last Post: 05-28-2007, 10:09 AM
  2. make your own item
    By the hunter of the hunted in forum Community Chat
    Replies: 5
    Last Post: 03-10-2007, 09:42 PM
  3. PROGRAM: Make your own NOAFK programs
    By Tromball in forum World of Warcraft General
    Replies: 0
    Last Post: 12-25-2006, 05:10 PM
  4. Make your own Bots for Wow/EQ2
    By HunterHero in forum World of Warcraft Bots and Programs
    Replies: 0
    Last Post: 10-19-2006, 10:05 AM
All times are GMT -5. The time now is 04:51 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search