WARNING: If you are using a repack, This guide wont work for you.
NOTICE: Theres alot of red in this guide, It might burn your eyes!
This is the way I learned how to compile my own scripts or any scripts!
First compile Ascent, You can find any guide here that tells you how to do this.
Now from the root folder of ascent go to the src folder then go to the scripts folder then to src again.
You should see four folders.
AscentStats
GossipScripts
InstanceScripts
ServerStatusPlugin
SpellHandlers
Now create a copy of the GossipScripts folder and rename it to anything you want, Lets go with MyScripts.
You should still be in the src folder, Now you should see a file called Makefile. Open it with notepad and you should see...
Code:
SUBDIRS = GossipScripts InstanceScripts ServerStatusPlugin SpellHandlers
Now make it look like this.
Code:
SUBDIRS = GossipScripts MyScripts InstanceScripts ServerStatusPlugin SpellHandlers
Now open the MyScripts folder, and delete these following scripts.
Gossip_Battlemaster
Gossip_Innkeeper
GuardGossip
Put your scripts inside this folder.
Now that your scripts are inside lets edit the Makefile inside this folder.
It should say this
Code:
libGossipScripts_la_SOURCES = Gossip_Battlemaster.cpp Gossip_Innkeepers.cpp GuardGossip.cpp Setup.cpp
Now remove
Gossip_Battlemaster.cpp
Gossip_Innkeepers.cpp
GuardGossip.cpp
Now type in all your scripts with spaces, Keep Setup.cpp.
So lets say I added my PortableMorpher and my PortableTeleporter, My Makefile will say this.
Code:
libGossipScripts_la_SOURCES = PortableTeleporter.cpp PortableMorpher.cpp Setup.cpp
Great! Now we should be add the step that we need to edit the Setup.cpp and Setup.h in the folder. Open Setup.cpp, You should see this.
Code:
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
SetupInnkeepers(mgr);
SetupBattlemaster(mgr);
SetupGuardGossip(mgr);
}
Now this part gets a bit tricky...
You must change it to the class in your script, So lets take my PortableMorpher for example. Open the script and search for
Code:
class SCRIPT_DECL
My PortableMorpher says
Code:
class SCRIPT_DECL Morpher : public GossipScript
Now go back to Setup.cpp and I would change it to this.
Code:
Code:
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
SetupMorpher(mgr);
}
See what i'm trying to say? Now I wanna add in my PortableTeleporter into their, and that scripts class is Warper. So lets change that part to...
Code:
Code:
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
SetupMorpher(mgr);
SetupWarper(mgr);
}
Congratulations your very close to the end of this guide.
Now save Setup.cpp and open Setup.h
Now in there you should see
Code:
void SetupInnkeepers(ScriptMgr * mgr);
void SetupGuardGossip(ScriptMgr * mgr);
void SetupBattlemaster(ScriptMgr * mgr);
This is the same thing now, so with my PortableMorpher and my PortableTeleporter I would change it to this.
Code:
void SetupMorpher(ScriptMgr * mgr);
void SetupWarper(ScriptMgr * mgr);
See? Simple.
Save that and close it.
Now go back to the Ascent root folder(the main folder)
Find configure.ac, Scroll all the way to the bottom and find,
Code:
src/Makefile
src/ascent/Makefile
src/shared/Makefile
src/logonserver/Makefile
src/game/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
dep/Makefile
dep/src/Makefile
dep/src/pcre/Makefile
dep/src/lua/Makefile
dep/src/zlib/Makefile
Add in this
Code:
src/Makefile
src/ascent/Makefile
src/shared/Makefile
src/logonserver/Makefile
src/game/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/MyScripts/Makefile
src/scripts/src/SpellHandlers/Makefile
dep/Makefile
dep/src/Makefile
dep/src/pcre/Makefile
dep/src/lua/Makefile
dep/src/zlib/Makefile
Remember, MyScripts is the name of the folder you made.
Close and save that, Now go to the src folder, the scripts folder, and then open the projects folder.
Copy the GossipScripts project, Now there are three of them, GossipScripts2003, GossipScripts2005, GossipScripts2008.
This depends on what version of Microsoft Visual Studio your using.
Lets say we are using GossipScripts2008, Make a copy of that project. Rename it to whatever you want, I named it MyScripts2008.
Now open it with notepad.
This is the easy and lazy part, Do a Find And Replace
For the find type in GossipScripts and for the Replace type in MyScripts.
Now click replace all. Save it and close it, Now open it with Microsoft Visual Studio.
Ok, don't build it yet, Click on click on the little + next to MyScripts and you should see the folders Main Resources and Scripts.
Click on the + and you should see Setup.cpp and Setup.h, remove both of those.
Now right click it and go to Add -> Existing Item, and go to open your MyScripts folder and add Setup.cpp and Setup.h. Now inside the project remove the three scripts which should be
Gossip_Battlemaster.cpp
Gossip_Innkeepers.cpp
GuardGossip.cpp
Now go to Add -> Existing Item and go to your MyScripts folder once again and add all your scripts into there.
So I would add
PortableMorpher.cpp
and
PortableTeleporter.cpp
Now look for Solution MyScripts right click it and go to build.
If you get
Code:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Congratulations you compiled your scripts successfully and your .dll will be in your scripts_bin folder.
Note: The classes in your scripts cannot be the same, for example two scripts cannot both have the class Warper.
PS.: I am not taking credit for this All credit goes to Aldaus , who posted this , I am just trying to bring that old forgotten post back to life , cuz its pretty cool one