[Guide] Add a 'Reload ScriptEngine Command' - ArcEmu Version menu

User Tag List

Results 1 to 2 of 2
  1. #1
    AshanĂ­ta's Avatar Member
    Reputation
    19
    Join Date
    Mar 2008
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Guide] Add a 'Reload ScriptEngine Command' - ArcEmu Version

    Hello Guys,

    I'm going to show you how to add a 'Reload Script Engine Command' in the ArcEmu Console.

    Note: This will only work on your OWN compiled server. This won't work on a repack.

    At first open your trunk solution. Now you can see on the left side the explorer.

    Now go to 'hearthstone-world' -> 'launcher' -> 'console' and open 'ConsoleListener.cpp'.

    Then search for this lines:

    Code:
    void HandleConsoleInput(BaseConsole * pConsole, const char * szInput)
    {
    	static ConsoleCommand Commands[] = {
    Below this lins you can see all other commands for the console.

    Now simply add this line under the

    Code:
    	static ConsoleCommand Commands[] = {
    line:

    Code:
    		{
    			&HandleScriptReloadCommand,
    			"scriptreload", "none",
    			"Reloads the whole Script Engine without restarting the core."
    		},
    Explanation:

    'HandleScriptReloadCommand' is the name of our command.
    'scriptreload' is the command which you type in the console.
    'none' would be the syntax but we don't need some.
    'PUT A TEXT HERE.' here you can put the text which will be shown when you type '?' or 'help' in the console.



    Now we told the core to do something when we type "scriptreload" in the console. But we have to define what should be done when we type "scriptreload" in.

    Just open 'ConsoleCommands.h' and add this

    Code:
    bool HandleScriptReloadCommand(BaseConsole * pConsole, int argc, const char * argv[]);
    between

    Code:
    #ifndef _CONSOLECOMMANDS_H
    #define _CONSOLECOMMANDS_H
    and

    Code:
    #endif


    Now open 'ConsoleCommands.cpp' and add this

    Code:
    bool HandleScriptReloadCommand(BaseConsole * pConsole, int argc, const char * argv[])
    {
    	sScriptMgr.UnloadScripts();
    	sScriptMgr.LoadScripts();
    	return true;
    }
    at the end of the file.



    That should be all.

    Proof:



    becomes to:



    Please do not copy this guide.. if you want to post it in another forum PM me and post credits!

    Greetz Asha

    PS: My english is not that good I'm sorry.
    Last edited by AshanĂ­ta; 08-19-2009 at 01:16 PM.

    [Guide] Add a 'Reload ScriptEngine Command' - ArcEmu Version
  2. #2
    DarkFever's Avatar Contributor
    Reputation
    84
    Join Date
    Aug 2007
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is very useful for me when i make new lua scripts +Rep.


Similar Threads

  1. [Guide] Add a 'Reload ScriptEngine Command'
    By AshanĂ­ta in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 08-16-2009, 08:18 AM
  2. Forrest's Guide to GM Lvl 3 commands for Mangos
    By Forrest in forum WoW EMU Guides & Tutorials
    Replies: 17
    Last Post: 03-09-2008, 02:40 PM
  3. [Guide] Add Azshara Crater To Your Server
    By MathWizard in forum WoW EMU Guides & Tutorials
    Replies: 25
    Last Post: 02-06-2008, 12:07 PM
  4. [GUIDE] Add Voice Chat to your ascent server! [GUIDE]
    By Dryice in forum WoW EMU Guides & Tutorials
    Replies: 26
    Last Post: 12-09-2007, 11:29 AM
  5. [Guide] Add Enchants (Mangos)
    By leetnesspur in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 11-04-2007, 03:37 PM
All times are GMT -5. The time now is 05:37 PM. 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