Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 2 of 2
  1. #1
    Grunt
    mako's Avatar
    Join Date
    Feb 2009
    Location
    England
    Posts
    35
    Post Thanks / Like
    Rep Power
    16
    Reputation
    30

    [HOWTO] Compile Custom Scripts


    Register to remove this ad
    Here is a handy guide on how to compiel custom scripts for those who dont know how


    THE SCRIPT IM USING AS AN EXAMPLE IS PORTABLE TELEPORTER FROM
    ASPIREDEV

    Heres one way to compile scripts even if you have almost 0 C++ knowledge.

    First off do a fresh compile of ArcEmu




    Now head to arcemudirectory/src/scripts/src



    Now take GossipScripts and copy and paste a new folder out of it by right clicking it and copy then right clicking and paste.

    You now have this



    Now rename it to anything you want i will be renaming it CustomScript just for the guide youu can name it anything you want.

    Now its time to edit the makefile.am Open up MakeFile.am still inside the src/scripts/src folder and it shoudl say the following

    Code:
    SUBDIRS = GossipScripts InstanceScripts ServerStatusPlugin SpellHandlers LUAScripting
    Code:
    SUBDIRS = GossipScripts CustomScript InstanceScripts ServerStatusPlugin SpellHandlers LUAScripting
    Change customscript to whatever you named your folder

    Now close the makefile and delete

    Code:
    Gossip_Battlemaster.cpp
    Gossip_Innkeeper.cpp
    GuardGossip.cpp
    you should have this


    Now you add your scripts in (the .cpp's)

    I am only adding the teleporter so i have this now




    Now head to CustomScript and open makefile.am in notepad

    You should see this on the bottom line

    Code:
    libGossipScripts_la_SOURCES = Gossip_Battlemaster.cpp Gossip_Innkeepers.cpp GuardGossip.cpp Setup.cpp
    Change it to

    Code:
    libGossipScripts_la_SOURCES = Script Name.cpp Setup.cpp

    Change Script Name to your script name


    Ok Now it is time to open up Setup.cpp and this should be in the middle


    Code:
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
        SetupInnkeepers(mgr);
        SetupBattlemaster(mgr);
        SetupGuardGossip(mgr);
    }
    
    #ifdef WIN32
    delete

    Code:
     SetupInnkeepers(mgr);
        SetupBattlemaster(mgr);
        SetupGuardGossip(mgr);
    LEAVE THIS OPEN

    now open your script (.cpp) and search for

    Code:
     class SCRIPT_DECL
    For example the Portable Teleporter says

    Code:
    class SCRIPT_DECL Pwarper : public GossipScript
    Pwarper is what you need.

    Now go back to your Setup.cpp and where the

    Code:
     SetupInnkeepers(mgr);
        SetupBattlemaster(mgr);
        SetupGuardGossip(mgr);
    Was, add

    Code:
    SetupPwarper(mgr);
    change Pwarper to whatever your script says

    it now looks like this

    Code:
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
        SetupPwarper(mgr);
    }
    
    #ifdef WIN32
    Now close and save Setup.cpp and open up Setup.h

    Should say

    Code:
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupInnkeepers(ScriptMgr * mgr);
    void SetupGuardGossip(ScriptMgr * mgr);
    void SetupBattlemaster(ScriptMgr * mgr);
    
    #endif
    Delete

    Code:
    void SetupInnkeepers(ScriptMgr * mgr);
    void SetupGuardGossip(ScriptMgr * mgr);
    void SetupBattlemaster(ScriptMgr * mgr);
    And add

    Code:
    void SetupPwarper(ScriptMgr * mgr);
    Pwarper being what you got from your script.

    ALMOST DONE!!!!

    Head to the Arcemu root folder and look for configure.ac

    Inside configure.ac search for ARCEMU_CONFIG_FILES

    You should see

    Code:
    AC_CONFIG_FILES([
       ./Makefile
       src/Makefile
       src/arcemu-shared/Makefile
       src/arcemu-world/Makefile
       src/arcemu-logonserver/Makefile
       src/arcemu-voicechat/Makefile
       src/arcemu-realmserver/Makefile
       src/scripts/Makefile
       src/scripts/src/Makefile
       src/scripts/src/GossipScripts/Makefile
       src/scripts/src/InstanceScripts/Makefile
       src/scripts/src/ServerStatusPlugin/Makefile
       src/scripts/src/SpellHandlers/Makefile
       src/scripts/src/LUAScripting/Makefile
       extras/Makefile
       extras/collision/Makefile
       extras/collision/collision_dll/Makefile
    ])
    and your going to want to change it to this

    Code:
    AC_CONFIG_FILES([
       ./Makefile
       src/Makefile
       src/arcemu-shared/Makefile
       src/arcemu-world/Makefile
       src/arcemu-logonserver/Makefile
       src/arcemu-voicechat/Makefile
       src/arcemu-realmserver/Makefile
       src/scripts/Makefile
       src/scripts/src/Makefile
       src/scripts/src/GossipScripts/Makefile
       src/scripts/src/InstanceScripts/Makefile
       src/scripts/src/ServerStatusPlugin/Makefile
       src/scripts/src/CustomScript/Makefile
       src/scripts/src/SpellHandlers/Makefile
       src/scripts/src/LUAScripting/Makefile
       extras/Makefile
       extras/collision/Makefile
       extras/collision/collision_dll/Makefile
    ])
    REMEMBER CUSTOMSCRIPT IS YOUR FOLDER NAME.

    head to ArcEmu/src/scripts/projects

    And look for GossipScripts2003,2005, or 2008 depending on what visual studio you have. I am using 2008

    Copy and paste it to make a copy then rename your copy anything you want.

    Now you have to open it up with notepad and use Find and Replace you want to change the word GossipScripts to CustomScript then click replace all now save and open with Visual Studio.

    Now click the little + sign next to CustomScript and delete all the files in them then go to Add then Existing Item and add your Setup.h and Setup.cpp from your CustomScript folder and also add your script.

    the Setup files go in main resources and your script goes in Scripts.

    Now just hit F7 and away you go!

    This will not work unless you have already compiled Arcemu

    --------------------------------
    CREDITS

    Aldaus for the original guide.
    HellSpawn for spending hours re-writing and updating it to look like the recent ArcEmu


    › See More: [HOWTO] Compile Custom Scripts



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Grunt

    Join Date
    Feb 2009
    Posts
    35
    Post Thanks / Like
    Rep Power
    16
    Reputation
    5

    Thumbs up Thanks...


    Register to remove this ad
    Thanks for this useful guide it helped me out alot. I have been struggling with this for a while now, lol...

 

 

Visitors found this page by searching for:

aspiredev

how to compile custom script in trinity

how to compile a c script for arcemu

how compile mangos with custom script

how to change facebook custom scripts

arcemu auto restart script

arcemu customscripts source code

how to modify script arcemu

custom scripts for trinity

compile script trinity

hoa to compile custom script trinity

how to add custom scipts to mangos compile

mangos wow

wow arcemu custom script

Pwarpers.net.in

recompile trinity script

How to compile scripts trinity

how to compile trinity script

how to make scripts to compiled arcemu

compilar script trinity

how to compile custom scripts mangos zero

facebook custom scripts

how to edit arcemu cpp files

how to compile a custom script in trinity

arcemu custom scripts

compilar scripts en trinity

How to compile trinity scripts

how to compile a trinity script

script trinity kompilieren

how can src add to arcemu

how to setup a custom mangos script

how to compile new scripts trinity

how to compile scripts arcemu

how to make custom scripts work in arcemu

how to make script arcemu

how edit a script trinity and compile

arcemu create custom script

Makefile.am custom compilation

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 02:35 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org