Network: WoW Gold | WoW Accounts | MPS Games | FPSowned
MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides
Homepage »      Register »      Hall of Fame »      Ranks And Awards »      Advertise »      Marketplace »
 
Sign up



Do you like this excellent information? Then Donate HERE to remove ads and support the MMOwned community.


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > WoW Emulator Server > Emulator Server Guides > Mangos Guides

Mangos Guides This section is for WoW emulated server, Mangos guides.
[NO QUESTIONS HERE]

Reply
 
LinkBack Thread Tools
  #1  
Old 04-10-2009
Lonehwolf is offline.
Sergeant
  
 
Join Date: Sep 2008
Posts: 56
Reputation: 15
Points: 309, Level: 1
Points: 309, Level: 1 Points: 309, Level: 1 Points: 309, Level: 1
Level up: 78%, 91 Points needed
Level up: 78% Level up: 78% Level up: 78%
Activity: 10.1%
Activity: 10.1% Activity: 10.1% Activity: 10.1%
Wow Guides [GUIDE]Through the Database [MOB SCRIPTING]

So you made a server, put in some custom mobs, and now you feel like giving them some "intelligent" functionality... Maybe make them to fry the player's arse or punt them away?

Well, it's possible with MaNGOS as well. The key?

ACID and ScriptDev2.

Now I'm skipping the explanation of the above to type it in further below, but since most people just want to speed it all up and get going, it's essential that you have your SD2 installed and configured correctly. Other guides covered that thoroughly so no need to repeat.

What I'll be tackling, is the simpler, database-related scripting of mobs.

Pros and Cons to it:
-It's fairly straight forward.
-It's lightweight and avoids compiling and such.

-It lacks the reload functionality. So restarting the server is still a requirement.
-It's not too comprehensive. Scripting simple mobs is fine, bosses... ScriptDev2 is there for that.

Basic Setup:
Knowing the limitation of ACID, aka Database Mob Scripting, it's time to get started on the basics to scripting it.

Let's start with what you'll want:

-A mob.
-The EventAI_Scripts table inside the Scripting Database (used by SD2)
-Stay sober. Please - Do it. If you get drunk at this step you'll end up in quite some trouble to figure out how to undo what you did and redo it the right way.


Let's start off by considering the first basic entry of a mob, at ID "60k". We'll make it so that it makes use of the mob_eventai script.

Quote:
UPDATE `DATABASENAME`.`creature_template` SET `ScriptName` = 'mob_eventai' WHERE `creature_template`.`entry` =CREATUREID LIMIT 1 ;
DATABASENAME: The name of your WORLD Database.
CREATUREID: The Creature to whom you'll bind this script to.

So now we configured the mob to make use of the scripts table. What's left for us is to make the mob cast da frigging spell

Now this is the complicated part. And it will require some playing around with, I personally spend 2 days working and testing possible outcomes, so don't expect to pull it off in one go. SD2 have their own IRC where you can pop in and ask questions there, but I'll leave searching that to you

So we're stuck with building the mob itself. This is where your head spins with all the values and such. I recommend this website to acquiring the general layout: [Only registered and activated users can see links. ]

Once you grab the SQL file, run through it and check if it's all fine or not. I'm guiding you through a simple spell for a mob at id "60k" in the following quote:

Quote:
/*60k Mob Frostbolt Rank 5*/
INSERT INTO `itagback_mfs`.`eventai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`)
VALUES ('87000', '60000', '0', '0', '70', '1', '10', '20', '9000', '12000', '11', '16766', '1', '3', '0', '0', '0', '0', '0', '0', '0', '0', '60kMob Frostbolt');
Ok let's break it down quickly.
- The First Value is what SQL always asks you for, and ID to identify that particular script entry. Keep it unique.
- The second value is the mob you're binding this to. Make sure it's correct, it can be duplicate if you're adding more than one event.
- Now the Event_Type is set to 0 which indicates a TIMED EVENT.
- Phase Mask is slightly more advanced so we're skipping on that.
- Event Chance is how possible is it for that event to take place? The value is percentage, do NOT include the % sign. 100 indicates an action which will trigger, 70 means it will occur slightly more oftenly than twice every 3 times. Etc.
-The Event_Flags is set to 1. This indicates it's repeatable.
-The next 4 values are the event parameters. Since our event is a TIMED EVENT, they are: MinTime, MaxTime, MinRepeat, MaxRepeat. They are in MILLISECONDS, thus 1000 = 1s. The event will trigger nearly immediately upon the mob entering combat. It will repeat the spell every 9 to 12 seconds.

The next values are the Action Values. Each entry is based on an EVENT. Once the event triggers, you're allowed to setup at most 3 actions.

I've only inputted one action in this case, that is to make it cast a spell. Each action has the Action_Type and 3 parameters.

In this case, the Action Type is "11" which indicates CAST.
The First Paramater is set to "1" This is the target type. Aka Hostile Player that the mob is focusing its attacks on.

The Second paramater holds the CAST FLAGS in the case of a CAST action.
I set it to three which basically interrupts any previous spell, and triggers the spell, even if the mob is lacking mana or particular reagants.


Now the question must be in your head by now:

How the **** do you know all that? The answer is the documentation. It explains what each field is for and what you can input in it.

Where to find the Documentation? Well, hoping you installed SD2 correctly, it's in there. It's a text file called EventAI.txt A quick search in the SVN should make it pop up.

I understand it's not the nicest-looking guide, and your eyes may be all messed up by now, but I just wanted to build a guide for getting people off on scripting, since most people end up staring at how to start off mob scripting and eventually give up.

Let me know if you have questions, and make sure you follow the Documentation to building your setups.

Last edited by Lonehwolf; 04-10-2009 at 09:51 AM.
Reply With Quote


Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.

  #2  
Old 04-12-2009
Lonehwolf is offline.
Sergeant
  
 
Join Date: Sep 2008
Posts: 56
Reputation: 15
Points: 309, Level: 1
Points: 309, Level: 1 Points: 309, Level: 1 Points: 309, Level: 1
Level up: 78%, 91 Points needed
Level up: 78% Level up: 78% Level up: 78%
Activity: 10.1%
Activity: 10.1% Activity: 10.1% Activity: 10.1%
I'm guessing nobody liked this? =/
Reply With Quote
  #3  
Old 04-12-2009
Henkke is offline.
Knight-Lieutenant
  
 
Join Date: Sep 2008
Posts: 282
Reputation: 26
Points: 568, Level: 1
Points: 568, Level: 1 Points: 568, Level: 1 Points: 568, Level: 1
Level up: 34%, 332 Points needed
Level up: 34% Level up: 34% Level up: 34%
Activity: 3.8%
Activity: 3.8% Activity: 3.8% Activity: 3.8%

It's nicely made guide, but the audience in here might be a little low since all the repack users and simple lua guys, anyways rep for taking time and writing this.
Reply With Quote
  #4  
Old 04-13-2009
resinate is offline.
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
  
 
Join Date: May 2008
Posts: 23
Reputation: 3
well with the new eventAI they elimated scriptdev2 and now u cant use custom Ai in instance or raid maps only outdoor maps now.

i want script dev back so badly now the new eventAI system was built by a retard
Reply With Quote
  #5  
Old 04-17-2009
Lonehwolf is offline.
Sergeant
  
 
Join Date: Sep 2008
Posts: 56
Reputation: 15
Points: 309, Level: 1
Points: 309, Level: 1 Points: 309, Level: 1 Points: 309, Level: 1
Level up: 78%, 91 Points needed
Level up: 78% Level up: 78% Level up: 78%
Activity: 10.1%
Activity: 10.1% Activity: 10.1% Activity: 10.1%
Technically, using the Normal or Heroic flags, you should be able to script for instances as well. At least it works for us

Btw, SD2 ain't dead. In fact, it's functioning to the maximum. Since ACID is far simpler to use, they wanted to migrate as many simple scripts as possible over to it. SD2 is mainly used for more complicated boss events.

Wolf.
P.S. Thanks for rep, no longer a leecher
Reply With Quote
  #6  
Old 05-25-2009
Synginn75 is offline.
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
  
 
Join Date: May 2009
Posts: 1
Reputation: 1
Nice guide, Was just looking for different ways to manipulate my server when I saw this guide.....awesome
Reply With Quote
  #7  
Old 05-31-2009
Rayuski is offline.
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
  
 
Join Date: May 2009
Posts: 21
Reputation: 3
guide

great guide
Reply With Quote
  #8  
Old 06-08-2009
Jokera is offline.
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
  
 
Join Date: Sep 2006
Posts: 4
Reputation: 1
Points: 576, Level: 1
Points: 576, Level: 1 Points: 576, Level: 1 Points: 576, Level: 1
Level up: 36%, 324 Points needed
Level up: 36% Level up: 36% Level up: 36%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Very good explained guide!
Reply With Quote
  #9  
Old 06-09-2009
Dibes's Avatar
Dibes is offline.
Sergeant
  
 
Join Date: May 2008
Posts: 46
Reputation: 16
THIS IS AWESOME +rep!!!
Reply With Quote
Reply

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



All times are GMT -4. The time now is 09:48 PM.




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1

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 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490