Wise
29-11-14, 09:49 PM
To learn more about the health calculation check rochet2's first comment ![/COLOR]
Hello,
I had an idea on how to update instance mobs by percentage, So the health and mana and stuff gets updated. But instead of going inside each instance and do .npc info for each mob to find their entry and then go in DB and update them one by one. I had a better idea... I made a inner join query so the query will join creature table to select the creatures by their Map ID. So now with this query all you have to do is to go inside the instance and do .gps, You will see the Map ID for the instance. So then add the MapID to the query and run the query and wollah ! All mobs in the instance have been updated
Upgrade Query
SET
/* Edit these values */
@Health = 10,
@Mana = 10,
@minlevel = 255,
@maxlevel = 255,
@MapID = 548;
/* Do not edit anything under this text unless you know what you are doing */
UPDATE creature_template AS t
INNER JOIN creature AS c
ON t.entry = c.id
SET
t.Health_mod = t.health_mod * @Health, t.minlevel = @minlevel, t.maxlevel = @maxlevel, t.Mana_mod = t.Mana_mod * @Mana
WHERE
c.map = @MapID;
Keep in mind that if you use this query and update the level to 255 then the creature will get lower health if you dont have edited anything in creature_classlevelstats. But you can run the query multiple times or choose a higher percentage value.
If you want to downgrade the mobs in the instance you can use this query
Downgrade Query
SET
/* Edit these values */
@Health = 10,
@Mana = 10,
@minlevel = 255,
@maxlevel = 255,
@MapID = 548;
/* Do not edit anything under this text unless you know what you are doing */
UPDATE creature_template AS t
INNER JOIN creature AS c
ON t.entry = c.id
SET
t.Health_mod = t.health_mod / @Health, t.minlevel = @minlevel, t.maxlevel = @maxlevel, t.Mana_mod = t.Mana_mod / @Mana
WHERE
c.map = @MapID;
This query will downgrade the mobs by percentage, So if you set the health to 10 for this query then it will downgrade health by 10
Good luck with the query, Let me know if you want me to edit anything, Like adding more columns or something
Hello,
I had an idea on how to update instance mobs by percentage, So the health and mana and stuff gets updated. But instead of going inside each instance and do .npc info for each mob to find their entry and then go in DB and update them one by one. I had a better idea... I made a inner join query so the query will join creature table to select the creatures by their Map ID. So now with this query all you have to do is to go inside the instance and do .gps, You will see the Map ID for the instance. So then add the MapID to the query and run the query and wollah ! All mobs in the instance have been updated
Upgrade Query
SET
/* Edit these values */
@Health = 10,
@Mana = 10,
@minlevel = 255,
@maxlevel = 255,
@MapID = 548;
/* Do not edit anything under this text unless you know what you are doing */
UPDATE creature_template AS t
INNER JOIN creature AS c
ON t.entry = c.id
SET
t.Health_mod = t.health_mod * @Health, t.minlevel = @minlevel, t.maxlevel = @maxlevel, t.Mana_mod = t.Mana_mod * @Mana
WHERE
c.map = @MapID;
Keep in mind that if you use this query and update the level to 255 then the creature will get lower health if you dont have edited anything in creature_classlevelstats. But you can run the query multiple times or choose a higher percentage value.
If you want to downgrade the mobs in the instance you can use this query
Downgrade Query
SET
/* Edit these values */
@Health = 10,
@Mana = 10,
@minlevel = 255,
@maxlevel = 255,
@MapID = 548;
/* Do not edit anything under this text unless you know what you are doing */
UPDATE creature_template AS t
INNER JOIN creature AS c
ON t.entry = c.id
SET
t.Health_mod = t.health_mod / @Health, t.minlevel = @minlevel, t.maxlevel = @maxlevel, t.Mana_mod = t.Mana_mod / @Mana
WHERE
c.map = @MapID;
This query will downgrade the mobs by percentage, So if you set the health to 10 for this query then it will downgrade health by 10
Good luck with the query, Let me know if you want me to edit anything, Like adding more columns or something