Starting With Scripting

Hello guys,

now im decided for sure - i am going to contribute!

i got a working core, i got all the tools.

and i want to start learning with simple things

C:\Users\Rhazi\Downloads\tc\TrinityCore\src\server\scripts\Examples\example_creature.cpp

i understand more or less all the code but how can i add this creature to the core and summon/add it to the world?

any guidelines?

You first need to pick which creature you want that script to be executed on, lets say you pick npc 1234.

Then you set its ‘ScriptName’ field in the database to the name of your script.

Example:

UPDATE creature_template SET scriptname = 'example_creature' WHERE entry = 1234;

And thats it! now you only have to add the creature to the world, you can use the “.npc add” command ingame

[/CODE]

this looks really simple… ok will give it a try.

thank you my dear friend

Sup rhaziel!

I strongly suggest you to checkout CreatureAI, ScriptedAI and BossAI classes and master them, as you’ll be working with those.

And ofc, to read and understand existing scripts in the core.

And above all that, imo at least, have fun with it. /emoticons/default_wink.png