How to Set Creatures to Wander Randomly

Published

In this post I will assume that you know enough to be able to execute SQL queries on your database.

Just in case anyone wants to know what Iā€™m running:

Notes:

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

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.

Query #1:

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

Query #2:

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