Jump to content

Recommended Posts

Hello,

I'm a .NET developer at a software company and would like to contribute in the long run. It's been a long while since I wrote anything in c++ but we'll see how it goes.

I just started last night with downloading all the required files by using two guides. I started with the first one but finished with the other. I had several issues:

  • mangosd.conf not anywhere to be found
  • realmd.conf not anywhere to be found
  • server/bin does not exist like mentioned in the guide
  • InstallDatabases.bat did not create all tables it should have for me

It's my hope the guide could be a little outdated, either that or I suck pretty bad. No biggie, I got it running after a couple of hours searching.

Right now I'm trying to see how everything works together. And I have stumbled upon some questions.

  • I'm assuming not every creature has scripts, but where are they?
  • So far the only thing I've been able to change in the database and that actually changed inside the game is the creature_template.maxlevel. I'm assuming the base AI just casts creature_template.spell1 over and over until out of mana. I tried changing that but the creature does not cast the other spell. It's like the change wasn't there. I tried changing the modelid1 to see if the in-game model would change but it didn't. I changed the subname to see if it would pop up somewhere, nothing. I restarted realmd and mangosd inbetween changes.

SELECT * FROM creature_template_spells WHERE entry = 2953;

UPDATE creature_template_spells SET spell1 = 116, spell2 = 0 WHERE entry = 2953;
UPDATE creature_template_spells SET spell1 = 9532, spell2 = 0 WHERE entry = 2953;

SELECT * FROM creature_template WHERE entry = 2953;

UPDATE creature_template SET maxlevel = 10 WHERE entry = 2953;
UPDATE creature_template SET maxlevel = 4 WHERE entry = 2953;

UPDATE creature_template SET modelid1 = 15115 WHERE entry = 2953;
UPDATE creature_template SET modelid1 = 6090 WHERE entry = 2953;

UPDATE creature_template SET subname = 'Bristlurbucks' WHERE entry = 2953;
UPDATE creature_template SET subname = '' WHERE entry = 2953;

Kind regards,

bdebaere

Link to comment
Share on other sites

I'm assuming not every creature has scripts, but where are they?

In the sources, C++ scripts are found under src/modules/SD3/scripts folder. They are bound to the corresponding entities in the world table `script_binding`. Here the `type` field defines the object type, =0 for mobs (details here). In between, there are also 3 different script engines: Eluna, EventAI, simple DB scripts. The two latter are active by default. The EventAI scripts are bound through the `creature_template`.`AIName` field.

So far the only thing I've been able to change in the database and that actually changed inside the game is the creature_template.maxlevel.

Since the client is using his cache heavily, you need to clean the client cache (*.wdb files; you could choose the affected file by name) each time you modify *_template tables. Also, I would not experiment myself with the world DB until reading the table descriptions briefly at least.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use