World of Warcraft - How to Set Creatures to Wander Randomly

znzz

Silver Supporter
MoP Premium
Superior Member
162
2015
28
World of Warcraft - How to Set Creatures to Wander Randomly

Notes:

There are four fields in the creature table of the world database that we will be dealing with. The fields are as follows.

spawndist - The distance, in yards, in which a creature can wander from it's spawn point.
MovementType - The type of movement of the creature. This should always be set to 1 to specify that the creature should wander randomly.
id - The ID of the creature from the creature_template table.
guid - The unique ID of a single creature. This can be found by selecting a creature in-game and using the .npc info command.
There are two, slightly, different queries which you can use, depending on what you wish to do. The first query will set all creatures, of the specified ID, to wander randomly in the specified spawndist radius. The second query will set a single creature, of the specified GUID, to wander randomly in the specified spawndist radius.

To use the queries, just replace 40 and 90201 with whichever values you require.

UPDATE creature SET spawndist = 40, MovementType = 1 WHERE id = 90201;

UPDATE creature SET spawndist = 40, MovementType = 1 WHERE guid = 90201;

Big thanks to Valkryst.
 
Top