• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Helpful SQL querrys [dont hate me, maybe some beginner needs it :)]

qtt

Enthusiast
Hello guys this is my 1st post to help the community and people out since you guys help me a bit! I made these querys and i use them quite often, these are basic but its nice to have them if you're beginner in SQL and they help a TON i use them often !! if you need me to make any just comment i will help you ;)


Update item set stats. *0.5 = -50% *1.5 = +50%
----------------------------------------------------------------------
Code:
UPDATE `Item_template` SET stat_value1 = (stat_value1 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value2 = (stat_value2 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value3 = (stat_value3 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value4 = (stat_value4 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value5 = (stat_value5 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value6 = (stat_value6 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value7 = (stat_value7 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value8 = (stat_value8 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value9 = (stat_value9 * .) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET stat_value10 = (stat_value10 * .) WHERE `Name` LIKE '%%';


Set Stat type
------------------------------------------------
UPDATE item_template SET stat_type4 = '35' WHERE `Name` LIKE '%%';

Rename
----------------------------------------------
UPDATE item_template SET name = '' WHERE `Name` LIKE '%%';

set required level of item/s
-------------------------------------------
UPDATE `Item_template` SET requiredLevel = 19 WHERE `Name` LIKE '%%';



Set minimum and maximum damage.
------------------------------------------------------
UPDATE `Item_template` SET dmg_min1 = 19 WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET dmg_max1 = 19 WHERE `Name` LIKE '%%';

UPDATE `Item_template` SET dmg_min1 = (dmg_min1 * 1.3) WHERE `Name` LIKE '%%';
UPDATE `Item_template` SET dmg_max1 = (dmg_max1 * 1.3) WHERE `Name` LIKE '%%';


Set Allowable class on item, this is for dk and warrior.
-------------------------------------------------------------------------
UPDATE `Item_template` SET AllowableClass = 33 WHERE `entry` LIKE '%16545%';

Quest update
---------------------------------------------
UPDATE quest_template SET RewardMoneyMaxLevel=0 WHERE id LIKE '%%';

Delete from CLT
--------------------------------------------------------------
DELETE FROM creature_loot_template WHERE entry = "10391";

Mass lower a "Stat value" by % and flat 


UPDATE `Item_template` SET stat_value1 = (stat_value1 * .) WHERE `Stat_type1` = 36;
UPDATE `Item_template` SET stat_value2 = (stat_value2 * .) WHERE `Stat_type2` = 36;
UPDATE `Item_template` SET stat_value3 = (stat_value3 * .) WHERE `Stat_type3` = 36;
UPDATE `Item_template` SET stat_value4 = (stat_value4 * .) WHERE `Stat_type4` = 36;
UPDATE `Item_template` SET stat_value5 = (stat_value5 * .) WHERE `Stat_type5` = 36;
UPDATE `Item_template` SET stat_value6 = (stat_value6 * .) WHERE `Stat_type6` = 36;
UPDATE `Item_template` SET stat_value7 = (stat_value7 * .) WHERE `Stat_type7` = 36;
UPDATE `Item_template` SET stat_value8 = (stat_value8 * .) WHERE `Stat_type8` = 36;
UPDATE `Item_template` SET stat_value9 = (stat_value9 * .) WHERE `Stat_type9` = 36;
UPDATE `Item_template` SET stat_value10 = (stat_value10 * .) WHERE `Stat_type10` = 36;


UPDATE `Item_template` SET stat_value1 = 0 WHERE `Stat_type1` = 34;
UPDATE `Item_template` SET stat_value2 = 0 WHERE `Stat_type2` = 34;
UPDATE `Item_template` SET stat_value3 = 0 WHERE `Stat_type3` = 34;
UPDATE `Item_template` SET stat_value4 = 0 WHERE `Stat_type4` = 34;
UPDATE `Item_template` SET stat_value5 = 0 WHERE `Stat_type5` = 34;
UPDATE `Item_template` SET stat_value6 = 0 WHERE `Stat_type6` = 34;
UPDATE `Item_template` SET stat_value7 = 0 WHERE `Stat_type7` = 34
UPDATE `Item_template` SET stat_value8 = 0 WHERE `Stat_type8` = 34;
UPDATE `Item_template` SET stat_value9 = 0 WHERE `Stat_type9` = 34;
UPDATE `Item_template` SET stat_value10 = 0 WHERE `Stat_type10` = 34;
 
Last edited by a moderator:

Tommy

Founder
Thanks for sharing this with us! Why would people hate it? :/

I put everything in the code tags by the way!
 

qtt

Enthusiast
oh thanks sorry i didnt do that, and well everyone is so advanced around here i thought i might get made fun of or something haha,
 

Black Ace

Insane Member
oh thanks sorry i didnt do that, and well everyone is so advanced around here i thought i might get made fun of or something haha,

No man , this is great and we don't make fun in emudevs ( P.s tommy sucks )
 

Marko

Enthusiast
level requirement stats update sql

hmmmm i'm sure i saw somewhere similar sql to update stats of items for required lvl but now can't find it anywhere. :thoughtful:

so i experimetned a little and got it to work, here is the code (even if nobody else needs it, im sure ill loose it again and will look here to remember it) :yuno:


Code:
UPDATE item_template SET `stat_value1` = `stat_value1` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value2` = `stat_value2` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value3` = `stat_value3` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value4` = `stat_value4` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value5` = `stat_value5` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value6` = `stat_value6` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value7` = `stat_value7` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value8` = `stat_value8` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value9` = `stat_value9` * 5 WHERE `requiredlevel` = 24;
UPDATE item_template SET `stat_value10` = `stat_value10` * 5 WHERE `requiredlevel` = 24;

this for example will multiply all stats by x5 for all items that require lvl 24 to equip.
Have fun :hfag:
 
Top