- joined: Oct 2, 2010
- messages: 3,342
- Reaction score: 226
- Points: 63
- Location: somewhere between <?php and ?>
- Website trinitycore-sql-generator.com
- Credits: 25
Hi ! A few days ago i released a query that allows you to set correct health for creatures. Now i have decided to also release a query for mana armor and damage. If you want to see how to set the correct health click This Link. I decided to make a completly new thread instead of updating the one for health since these queries is not related to health (except from the all in one query) and i wrote in title that its query for set correct health. And also because no one would actually see that i've updated the post. So i make a new thread so everyone can see it and hopefully someone wants to use these queries
Set Mana (This query requires unit_class 2 or 4 in creature_template)
Set Armor
Set Damage
Set Attackpower (I dont think anyone ever needs this since you can set the damage for your creature instead of changing the attackpower but if anyone really do needs it here you go)
All in One Query (This query requires unit_class 2 or 4 in creature_template)
Attackpower query is not included in this one because its useless
Set Mana (This query requires unit_class 2 or 4 in creature_template)
Code:
SET
@mana = 100000, -- Choose how much mana you want here
@entry = 28948; -- Set Creature Entry ID here
UPDATE creature_template ct
INNER JOIN creature_classlevelstats cc
ON ct.unit_class = cc.class
SET ct.ManaModifier = @mana / cc.basemana
WHERE ct.entry = @entry AND cc.level = ROUND((ct.minlevel + ct.maxlevel)/2, 1);
Set Armor
Code:
SET
@armor = 100000, -- Choose how much armor you want here
@entry = 28948; -- Set Creature Entry ID here
UPDATE creature_template ct
INNER JOIN creature_classlevelstats cc
ON ct.unit_class = cc.class
SET ct.ArmorModifier = @armor / cc.basearmor
WHERE ct.entry = @entry AND cc.level = ROUND((ct.minlevel + ct.maxlevel)/2, 1);
Set Damage
Code:
SET
@damage = 100000, -- Choose how much damage you want here
@entry = 28948; -- Set Creature Entry ID here
UPDATE creature_template ct
INNER JOIN creature_classlevelstats cc
ON ct.unit_class = cc.class
SET ct.DamageModifier = @damage / CASE
WHEN ct.exp = 0 THEN cc.damage_base
WHEN ct.exp = 1 THEN cc.damage_exp1
WHEN ct.exp = 2 THEN cc.damage_exp2
END
WHERE ct.entry = @entry AND cc.level = ROUND((ct.minlevel + ct.maxlevel)/2, 1);
Set Attackpower (I dont think anyone ever needs this since you can set the damage for your creature instead of changing the attackpower but if anyone really do needs it here you go)
Code:
SET
@atkpwr = 2000, -- Choose how much Attackpower you want here
@entry = 28948; -- Set Creature Entry ID here
UPDATE creature_template ct
INNER JOIN creature_classlevelstats cc
ON ct.unit_class = cc.class
SET ct.baseVariance = @atkpwr / cc.attackpower
WHERE ct.entry = @entry AND cc.level = ROUND((ct.minlevel + ct.maxlevel)/2, 1);
All in One Query (This query requires unit_class 2 or 4 in creature_template)
Attackpower query is not included in this one because its useless
Code:
SET
@health = 100000, -- Choose how much hp you want here
@mana = 100000, -- Choose how much mana you want here
@armor = 100000, -- Choose how much armor you want here
@damage = 100000, -- Choose how much damage you want here
@entry = 28948; -- Set Creature Entry ID here
UPDATE creature_template ct
INNER JOIN creature_classlevelstats cc
ON ct.unit_class = cc.class
SET ct.HealthModifier = @health / CASE
WHEN ct.exp = 0 THEN cc.basehp0
WHEN ct.exp = 1 THEN cc.basehp1
WHEN ct.exp = 2 THEN cc.basehp2
END,
ct.ManaModifier = @mana / cc.basemana,
ct.ArmorModifier = @armor / cc.basearmor,
ct.DamageModifier = @damage / CASE
WHEN ct.exp = 0 THEN cc.damage_base
WHEN ct.exp = 1 THEN cc.damage_exp1
WHEN ct.exp = 2 THEN cc.damage_exp2
END
WHERE ct.entry = @entry AND cc.level = ROUND((ct.minlevel + ct.maxlevel)/2, 1);
Last edited: