[tutorial] Compiling custom scripts menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Trle94's Avatar Contributor
    Reputation
    167
    Join Date
    May 2009
    Posts
    329
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [tutorial] Compiling custom scripts

    Here is a handy guide on how to compile custom scripts for those who don't know how


    THE SCRIPT IM USING AS AN EXAMPLE IS TELEPORTER FROM Gastricpenguin

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

    First you need to compile Ascent/Arcemu core.

    Now head to ascentdirectory/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
    What you want it to say is

    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 Ascent root folder and look for configure.ac

    Inside configure.ac search for ASCENT_CONFIG_FILES

    You should see
    Code:
    AC_CONFIG_FILES([
       ./Makefile
       src/Makefile
       src/ascent-shared/Makefile
       src/ascent-world/Makefile
       src/ascent-logonserver/Makefile
       src/ascent-voicechat/Makefile
       src/ascent-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/ascent-shared/Makefile
       src/ascent-world/Makefile
       src/ascent-logonserver/Makefile
       src/ascent-voicechat/Makefile
       src/ascent-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 Ascent/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 ascent

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

    Trle94 for making tutorial
    Gastricpenguin for perfect script

    [tutorial] Compiling custom scripts
  2. #2
    Ezio's Avatar Active Member
    Reputation
    58
    Join Date
    Nov 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good Tutorial

    Web Designer Professional.

  3. #3
    Trle94's Avatar Contributor
    Reputation
    167
    Join Date
    May 2009
    Posts
    329
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tnx mate

  4. #4
    stendun's Avatar Member
    Reputation
    1
    Join Date
    Jul 2009
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good tut man. Bump.
    For the best Private Server experience visit us at www.righteouswow.com

  5. #5
    Trle94's Avatar Contributor
    Reputation
    167
    Join Date
    May 2009
    Posts
    329
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tnx Stendun for comment ... Bump


  6. #6
    dj_d2's Avatar Member
    Reputation
    3
    Join Date
    Mar 2008
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This seems to work... but when i try to generate de proyect, it says:

    fatal error C1083:Cant open the file: '2008_int_release_CustomScripts\CustomScripts.pch': No such file or directory

    what can i do?

Similar Threads

  1. Compiling custom scripts on Linux
    By pcrew in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 10-30-2009, 10:38 AM
  2. Error compiling with custom scripts
    By Nadromar in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 06-14-2009, 01:16 PM
  3. [Compiling Custom Scripts] Arena Event
    By Pwntzyou in forum WoW EMU Guides & Tutorials
    Replies: 26
    Last Post: 06-14-2009, 07:17 AM
  4. [Release] Custom scripts
    By ion564 in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 05-12-2008, 07:02 PM
  5. [Release] |Custom Scripted Instance| Shadow Lair
    By wurstbr0t in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 03-05-2008, 12:03 PM
All times are GMT -5. The time now is 05:01 AM. 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