MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides

Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > WoW Emulator Server > Emulator Server Guides
Reload this Page How to Compile a DLL with Video
Emulator Server Guides Guides for working with World of Warcraft Emulator servers. Learn how to create a WoW Server here.
[NO QUESTIONS HERE]

Reply
 
LinkBack Thread Tools
How to Compile a DLL with Video
(#1)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,965
Join Date: Oct 2007
Wow Guides How to Compile a DLL with Video - 06-14-2008

I know Cursed made a guide on compiling a DLL, but I didn't think he explained how to make setup files, and project files, so I have created a video and text guide to help you. I suggest you use them together, and refer to the video if you have questions.

Please download these files or make sure you have them before you begin:
Microsoft Visual C++ v9: [Only registered and activated users can see links. ]

Video made by me:
[Only registered and activated users can see links. ]

Step 1: Getting the Source
The source is the .cpp where the actions and behavior of the script is defined. For this example, we will use GastricPenguin's GlobalNPC script. Here is the link to the pastebin: [Only registered and activated users can see links. ]. The password is "gastric". Now that we have the source code, we need to save it as the correct file extension. Copy all the script from the pastebin page, and open up Notepad or Wordpad and paste it in. Go to File, Save As, name the file "GlobalNPC.cpp" and make sure you have "Save as type:" set to "All Files". Click the save button and close out.



Step 2: Setting Up Source Files
Create a folder on your Desktop called "GlobalNPC", exactly like that. Drag the GlobalNPC.cpp file into this folder. Now, open up the GlobalNPC.cpp file. It should open in Microsoft Visual C++ now, not Notepad or Wordpad. When we do this, we are looking for one thing, the word after the "void" statement in blue. As we look through the script, we can see that the only void statement is "void GlobalNPC". But wait, there is one that says "void SetupGlobalNPC", we will ignore this statement because it has Setup infront of it. Sometimes you will have more than one "void" statement that you will use for each script. Also, this line:
Quote:
mgr->register_gossip_script(112230, gs);
is giving the NPC ID, you can change it to anything you want. However, you must do this prior to compiling the DLL.

Now that we have the statements of the script, we need to actually do the Setup files. Now, we need to get the latest "format" for our setup files. You must have Ascent compiled prior to doing this, if you don't, please stop here and compile Ascent. If you don't know how, then search for my guide on it. Browse to the "\trunk\src\scripts\src\GossipScripts" folder. Copy the Setup files in that folder to the GlobalNPC folder. You do NOT need the Makefile.am with the method that we're using to compile. We just need the Setup.cpp and Setup.h files. Open the Setup.cpp file from the GlobalNPC folder. Delete the
Quote:
SetupInnkeepers(mgr);
SetupBattlemaster(mgr);
SetupGuardGossip(mgr);

Now, we will use our void statement we got earlier "GlobalNPC". So type this line inbetween the brackets:
Quote:
SetupGlobalNPC(mgr);
We will always have the protions in red there, just replace the portion in blue with your "void" statement you got earlier. Save the file and close out.

Now open up the Setup.h file. Delete the:
Quote:
void SetupInnkeepers(ScriptMgr * mgr);
void SetupGuardGossip(ScriptMgr * mgr);
void SetupBattlemaster(ScriptMgr * mgr);

Replace this with the void statement. Once again, the portions in red will always need to be there, and the portion in blue is what you change, or the void statement.
Quote:
void SetupGlobalNPC(ScriptMgr * mgr);
Save and close out of Setup.h. Your more than halfway there!

Step 3: Setting Up Your Project File
This is an easy thing to do, just don't make it hard. Browse in your Ascent directory to: \trunk\src\scripts\projects. Now copy the "GossipScripts2008" file to your Desktop. Right click it, and go to "Open With". We are going to want to open it with Notepad or Wordpad. Now go to Edit, Replace (CTRL H). In the "Find What:" field, enter "GossipScripts". For the "Replace With:" field, we are going to enter what the name of our source file (.cpp) is, which is GlobalNPC. Hit "Replace All" and close out of that window. Now scroll down to the bottom until you see a line that has Name:"Main Recources" there. Make sure that the directories below it are set correctly in the format:
Quote:
srcScriptNameSetup.cpp or .h
Now, look just below that to the Name:"Scripts" line. Delete these two sections of code:
Quote:
<File
RelativePath="..srcGlobalNPCGossip_Innkeepers.cpp"
>
</File>
<File
RelativePath="..srcGlobalNPCGuardGossip.cpp"
>
</File>
And make sure its in the correct format.
Quote:
srcScriptNameScriptName.cpp
Make nessicary changes and then do: File, Save As, File Name: GlobalNPC.vcproj and "Save as type:" to all files. Click Save and close out.



Step 4: Compiling the DLL
Now, browse to "\trunk\src\scripts\src" and copy your GlobalNPC folder to this location. Next, browse to "\trunk\src\scripts\projects". Copy your GlobalNPC.vcproj here. Now double click GlobalNPC.vcproj and set the build to Release. If you really have compiled Ascent before, then you know what I'm talking about. Go to Build, Build Solution or hit F7. It may ask if you want to save a file, hit save, and the compiling should begin. You should either get a "1 succeeded" message or a "1 up-to-date" message.



You have just successfully compiled a DLL! It should be in your \bin\Release\script_bin\ folder.This should take about 3-4 minutes each time after you get the hang of it, so it will become much easier. If you liked my guide or video please leave comments and/or suggestions!

Hope you enjoyed my guide/video!

-SectorSeven out! (No I'm not gay like Secrest...)


Last edited by SectorSeven; 06-14-2008 at 09:37 PM.
Reply With Quote

Donate to remove ads.
(#2)
Old
Power of Illuminati's Avatar
Power of Illuminati is Offline
Contributor
Rep Power: 2
Reputation: 170
Power of Illuminati has a spectacular aura aboutPower of Illuminati has a spectacular aura about
 
Posts: 1,367
Join Date: May 2008
Location: Pyramid of Anubis
06-14-2008

Wow...

It's good that you updated Cursed guide as it was old. This gave me alot of "aha" experience now

Very detailed... God, maybe to much? Also.. I didn't know about ctr + h... New and VERY useful for me, looking for that

ofc S7!


Reply With Quote
(#3)
Old
Cursed's Avatar
Cursed is Online
Contributor
Rep Power: 3
Reputation: 228
Cursed has a spectacular aura aboutCursed has a spectacular aura aboutCursed has a spectacular aura about
 
Posts: 1,121
Join Date: Jun 2007
Location: Germany
06-15-2008

You have my rep and a link in my thread


Reply With Quote
(#4)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,965
Join Date: Oct 2007
06-15-2008

Thanks guys!
Reply With Quote
(#5)
Old
thegame240 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 2
thegame240 is an unknown quantity at this point
 
Posts: 131
Join Date: Mar 2008
Location: MADRID
06-20-2008

in the final step he shows me that, what i do bad, help pls !


Code:
1>------ Build started: Project: GlobalNPC, Configuration: Release Win32 ------
1>Compiling...
1>GlobalNPC.cpp
1>..srcGlobalNPCGlobalNPC.cpp(1) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(3) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(5) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(18) : error C2059: syntax error : 'public'
1>..srcGlobalNPCGlobalNPC.cpp(20) : error C2143: syntax error : missing ';' before '{'
1>..srcGlobalNPCGlobalNPC.cpp(20) : error C2447: '{' : missing function header (old-style formal list?)
1>..srcGlobalNPCGlobalNPC.cpp(39) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(40) : error C2653: 'GlobalNPC' : is not a class or namespace name
1>..srcGlobalNPCGlobalNPC.cpp(42) : error C2143: syntax error : missing ';' before '{'
1>..srcGlobalNPCGlobalNPC.cpp(42) : error C2447: '{' : missing function header (old-style formal list?)
1>..srcGlobalNPCGlobalNPC.cpp(83) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(86) : error C2653: 'GlobalNPC' : is not a class or namespace name
1>..srcGlobalNPCGlobalNPC.cpp(88) : error C2143: syntax error : missing ';' before '{'
1>..srcGlobalNPCGlobalNPC.cpp(88) : error C2447: '{' : missing function header (old-style formal list?)
1>..srcGlobalNPCGlobalNPC.cpp(1457) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(1460) : error C2653: 'GlobalNPC' : is not a class or namespace name
1>..srcGlobalNPCGlobalNPC.cpp(1462) : error C2143: syntax error : missing ';' before '{'
1>..srcGlobalNPCGlobalNPC.cpp(1462) : error C2447: '{' : missing function header (old-style formal list?)
1>..srcGlobalNPCGlobalNPC.cpp(1467) : error C2059: syntax error : 'constant'
1>..srcGlobalNPCGlobalNPC.cpp(1472) : error C2143: syntax error : missing ';' before '{'
1>..srcGlobalNPCGlobalNPC.cpp(1472) : error C2447: '{' : missing function header (old-style formal list?)
1>Setup.cpp
1>Build log was saved at "file://h:ArcEmutrunksrcscriptsprojects2008_int_release_GlobalNPCBuildLog.htm"
1>GlobalNPC - 21 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Reply With Quote
(#6)
Old
Cursed's Avatar
Cursed is Online
Contributor
Rep Power: 3
Reputation: 228
Cursed has a spectacular aura aboutCursed has a spectacular aura aboutCursed has a spectacular aura about
 
Posts: 1,121
Join Date: Jun 2007
Location: Germany
06-21-2008

That means your C++ Code for the WarpNPC is incorrect...


Reply With Quote
(#7)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,965
Join Date: Oct 2007
06-22-2008

^^ Yes. You probably forgot the last line >.>
Reply With Quote
(#8)
Old
DemonElite119 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 1
DemonElite119 is an unknown quantity at this point
 
Posts: 5
Join Date: Mar 2008
06-23-2008

I am getting a
Code:
1>------ Build started: Project: GlobalNPC, Configuration: Release Win32 ------
1>Compiling...
1>Gossip_Battlemaster.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..srcGlobalNPCGossip_Battlemaster.cpp': No such file or directory
1>Setup.cpp
1>c:Documents and SettingsJJDesktopNCDBAscentsrcascent-worldScriptSetup.h(25) : fatal error C1083: Cannot open include file: 'svn_revision.h': No such file or directory
1>Build log was saved at "file://c:Documents and SettingsJJDesktopNCDBAscentsrcscriptsprojects2008_int_release_GlobalNPCBuildLog.htm"
1>GlobalNPC - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Error (Don't ask why Ascent is in the NCDB folder )
Reply With Quote
(#9)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,965
Join Date: Oct 2007
06-23-2008

Thats because it needs to be in the right folder.
Reply With Quote
(#10)
Old
riizu's Avatar
riizu is Online
Sergeant Major
Rep Power: 1
Reputation: 13
riizu is on a distinguished road
 
Posts: 170
Join Date: Oct 2007
06-23-2008

Yeah, im also getting the code error referencing a billion syntax errors. Any idea how to fix this? I know when I originally compiled this, I used the edited code released by Jedi I think it was.


EDIT: found the fix. Make sure you copy the code from the text box at the bottom. Just copying the code off the main page creates the syntax errors.



Last edited by riizu; 06-23-2008 at 02:31 AM.
Reply With Quote
(#11)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,965
Join Date: Oct 2007
06-23-2008

Well first of all, I would try the "official" GlobalNPC, as we know it compiles 100% perfect (Because I prooved in video) and we know you made a mistake

Otherwise, you don't know if its the script or just you
Reply With Quote
(#12)
Old
jb200206's Avatar
jb200206 is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 2
jb200206 is an unknown quantity at this point
 
Posts: 5
Join Date: Jun 2008
Location: Florida
06-26-2008

Thanks Sector, seems that all your posts seem to come in handy for me and my new private server. I know this is off topic for this page but your Lua guide was amazing, already know a lil bit about it but you opened the door for meh. Thanks again man.
Reply With Quote
(#13)
Old
SectorSeven's Avatar
SectorSeven is Offline
Banned
Rep Power: 0
Reputation: 444
SectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really niceSectorSeven is just really nice
 
Posts: 1,965
Join Date: Oct 2007
06-26-2008

Haha no problemo
Reply With Quote
(#14)
Old
**Sweeny**'s Avatar
**Sweeny** is Offline
Knight-Lieutenant
Rep Power: 1
Reputation: 33
**Sweeny** is on a distinguished road
 
Posts: 284
Join Date: Dec 2007
06-26-2008

What do I put here
Quote:
<File
RelativePath="..srcMorphNPCGossip_Battlemaster.cpp"
>
</File>

(Bit in red)


Reply With Quote
(#15)
Old
Immüñé's Avatar
Immüñé is Offline
Site Donator
Rep Power: 1
Reputation: 9
Immüñé is an unknown quantity at this point
 
Posts: 53
Join Date: Apr 2008
Location: Jinx-WoW Ownage
06-26-2008

Nice Guide Sector Helped a Bunch
Reply With Quote
Reply

Donate to remove ads.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On




Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284