[Release] Usefull Database Queries [Part 2] menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Usefull Database Queries [Part 2]

    well to continue my last topic with usefull DB queries i made this one...
    Part 1 is here: http://www.mmowned.com/forums/emulat...e-queries.html
    NOTE: the query to delete old unused accs/chars is in the first part !!!

    You made a vendor? and want all items that the vendor sells to be sold at 1 price? use this query to do so:
    Code:
    UPDATE items SET buyprice = '1337' WHERE entry IN (SELECT item FROM vendors WHERE entry = 50000);
    change the buyprice to whatever you want and the entry too to the entry you chosen for your custom vendor


    Maintenance Queries thx to NCDB:
    Code:
    -- Delete vendors with none existing creatures/items.
    DELETE FROM `vendors` WHERE `entry` not in (SELECT `entry` from `creature_proto`);
    DELETE FROM `vendors` WHERE `item` not in (SELECT `entry` from `items`);
    
    -- Delete waypoints with none existing spawns
    DELETE FROM `creature_waypoints` WHERE `spawnid` not in (SELECT `id` from `creature_spawns`);
    
    -- Delete trainers with none existing creatures ** New table **
    DELETE FROM `trainer_spells` WHERE `entry` not in (SELECT `entry` from `creature_proto`);
    DELETE FROM `trainer_defs` WHERE `entry` not in (SELECT `entry` from `creature_proto`);
    
    -- Delete quest starter/finisher where quests doesn't exist
    DELETE FROM `creature_quest_starter` WHERE `quest` not in (SELECT `entry` from `quests`);
    DELETE FROM `creature_quest_finisher` WHERE `quest` not in (SELECT `entry` from `quests`);
    DELETE FROM `gameobject_quest_starter` WHERE `quest` not in (SELECT `entry` from `quests`);
    DELETE FROM `gameobject_quest_finisher` WHERE `quest` not in (SELECT `entry` from `quests`);
    
    -- Delete quest starter/finisher where creature/gameobject doesn't exist
    DELETE FROM `creature_quest_starter` WHERE `id` not in (SELECT `entry` from `creature_proto`);
    DELETE FROM `creature_quest_finisher` WHERE `id` not in (SELECT `entry` from `creature_proto`);
    DELETE FROM `gameobject_quest_starter` WHERE `id` not in (SELECT `entry` from `gameobject_names`);
    DELETE FROM `gameobject_quest_finisher` WHERE `id` not in (SELECT `entry` from `gameobject_names`);
    
    -- Delete loots that itemid not exists.
    DELETE FROM `itemloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    DELETE FROM `objectloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    DELETE FROM `creatureloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    DELETE FROM `pickpocketingloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    DELETE FROM `fishingloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    DELETE FROM `skinningloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    DELETE FROM `prospectingloot` WHERE `itemid` not in (SELECT `entry` from `items`);
    
    -- Delete loots that entryid not exists.
    DELETE FROM `itemloot` WHERE `entryid` not in (SELECT `entry` from `items`);
    DELETE FROM `prospectingloot` WHERE `entryid` not in (SELECT `entry` from `items`);
    DELETE FROM `fishingloot` WHERE `entryid` not in (SELECT `Zone` from `fishing`);
    DELETE FROM `objectloot` WHERE `entryid` not in (SELECT `entry` from `gameobject_names`);
    DELETE FROM `creatureloot` WHERE `entryid` not in (SELECT `entry` from `creature_proto`);
    DELETE FROM `pickpocketingloot` WHERE `entryid` not in (SELECT `entry` from `creature_proto`);
    DELETE FROM `skinningloot` WHERE `entryid` not in (SELECT `entry` from `creature_proto`);
    Query to order you tables again thx to NCDB:

    Code:
    ALTER TABLE `areatriggers` ORDER BY `entry` ASC;
    ALTER TABLE `creature_spawns` ORDER BY `id` ASC;
    ALTER TABLE `creature_quest_starter` ORDER BY `id` ASC, `quest` ASC;
    ALTER TABLE `creature_proto` ORDER BY `entry` ASC;
    ALTER TABLE `creature_names` ORDER BY `entry` ASC;
    ALTER TABLE `gameobject_names` ORDER BY `entry` ASC;
    ALTER TABLE `gameobject_quest_finisher` ORDER BY `id` ASC, `quest` ASC;
    ALTER TABLE `gameobject_quest_starter` ORDER BY `id` ASC, `quest` ASC;
    ALTER TABLE `gameobject_spawns` ORDER BY `id` ASC;
    ALTER TABLE `itempages` ORDER BY `entry` ASC;
    ALTER TABLE `items` ORDER BY `entry` ASC;
    ALTER TABLE `npc_text` ORDER BY `entry` ASC;
    ALTER TABLE `playercreateinfo_spells` ORDER BY `indexid` ASC;
    ALTER TABLE `quests` ORDER BY `entry` ASC;
    ALTER TABLE `recall` ORDER BY `name` ASC;
    ALTER TABLE `vendors` ORDER BY `vendorGUID` ASC, `entry` ASC;
    ALTER TABLE `weather` ORDER BY `zoneId` ASC;
    Query to change playercreateinfo:
    Code:
    INSERT INTO `playercreateinfo` (`Index`, `race`, `factiontemplate`, `class`, `mapID`, `zoneID`, `positionX`, `positionY`, 
    `positionZ`, `displayID`, `BaseStrength`, `BaseAgility`, `BaseStamina`, `BaseIntellect`, `BaseSpirit`, 
    `BaseHealth`, `BaseMana`, `BaseRage`, `BaseFocus`, `BaseEnergy`, `attackpower`, `mindmg`, `maxdmg`) VALUES
    (58, 10, 1610, 1, 530, 3430, -6257.02, -13931.2, 33.4026, 15476, 20, 25, 50, 20, 20, 50, 0, 1000, 0, 0, 23, 4, 5);
    just mod values to what you wnt it to be

    Removing Costs and Conditions of obtaining items by xeneth, give him rep by pressing here:+Rep
    UPDATE `items` SET ItemExtendedCost = 0 WHERE `entry` BETWEEN '1' and '40000';
    note: once you changed the itemextendedcost, you can not change it back to original by 1 query!
    info on that query:
    Code:
                                  UPDATE "items" = Table that the query is being executed in. (replace ascent with whatever your world database is named)
     
    WHERE "entry" = Column 
     
    BETWEEN '1' and '40000'; = Lines to be Edited according to selected column.
    what can be used instead of itemextendedcost:
    SET ? = 0

    ? = Item Extended Cost = Removes Arena point requirement/Honor Point Requirement

    ? = ArenaRankRequirement = Disables Arena Rank Requirement

    ? = RequiredFaction = Disables Faction Requirment (Revered, Exalted, Et'cetra)

    ? = RequiredFactionStanding = Disables Required Faction Standing (Thrallmar, Scryers, Et'cetra)

    ? = buyprice = How much the item will cost if in a shop

    ? = sellprice = How much the item will sell for (I set to 1 for every item in the game, So when you trash items you'd normally have to type in "Delete" for, You can just sell to vendor, It's faster and your players will thank you for it)
    additional credit notes to his query:
    Code:
                                  Special thanks goes to
     
    Mafiaboy
     
    Julianx
     
    Illadin1
     
    Gastric
    here is something i just posted to help someone:
    to make a race/class start with a skill you wnt and the amount of skill you wnt
    use this query:
    Code:
    INSERT INTO `playercreateinfo_skills` VALUES('2','762', '300', '300');
    first number is IndexID that is the index number of the playercreateinfo table
    more info on this: well in total you have 52 possible class/race combinations all of them are in playercreateinfo table... so you need to check that table...
    if you wnt all players to start with maxed skill then just use this query with all indexIDs if you wnt a specific race/class to start with maxed skill then check playercreateinfo for class/race and pick the index of the one you want to use... for example

    Blood elf Paladin with maxed out riding skill (in my DB):
    playercreateinfo search for raceID: 10
    classID: 2
    corresponding index: 50

    Second number = skillID
    3th and 4th number = skill/maxskill
    example 300riding skill would be:
    762,300,300

    so if i wnt all Blood elf paladins to start with 300 riding skill the query would be:
    Code:
    INSERT INTO `playercreateinfo_skills` VALUES('50','762', '300', '300');
    and voila done all blood elf paladins will start with 300 riding skill now

    Update: 25-03-08

    Code:
    update characters set taximask = '4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295' where name like '%Latruwski%';
    Change latruwski to a other character name to give it all taxi nodes...

    Code:
    update characters set taximask = '4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295';
    This query gives all texi nodes to all characters...

    Code:
    update characters set taximask = '4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295' where acct = (select acct from accounts where login like '%Latruwski%');
    Change latruwski to an account name to unlock all flight nodes on all characters on that account...


    more to come

    link to part 1 of this post:
    http://www.mmowned.com/forums/emulat...e-queries.html

    grtz
    Last edited by latruwski; 03-25-2008 at 08:23 AM.

    [Release] Usefull Database Queries [Part 2]
  2. #2
    chaoticd35's Avatar Site Donator
    Reputation
    44
    Join Date
    Jun 2007
    Posts
    337
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really like this, Especially the set buy price code you got..Got to spread some rep before I can give it to you again but this is nice.

  3. #3
    Illidan1's Avatar Banned
    Reputation
    244
    Join Date
    Jul 2007
    Posts
    2,251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice mate, keep them coming aye

  4. #4
    Xeneth's Avatar Member
    Reputation
    157
    Join Date
    Oct 2007
    Posts
    534
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is pretty useful, you could add it to the list

    http://www.mmowned.com/forums/emulat...tml#post496164


  5. #5
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by xeneth View Post
    this is pretty useful, you could add it to the list

    http://www.mmowned.com/forums/emulat...tml#post496164
    updated with new query and yours !
    remember: you can submit queries to, i'll add them

    grtz

  6. #6
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    updated again with new query i just posted to help someone

    grtz

  7. #7
    Xeneth's Avatar Member
    Reputation
    157
    Join Date
    Oct 2007
    Posts
    534
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for adding mine ^_^


  8. #8
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by xeneth View Post
    Thanks for adding mine ^_^
    np people should share more queries

    grtz

  9. #9
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated with queries to unlock all flight nodes...

    enjoy

  10. #10
    klorox's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    UPDATE items SET buyprice = '1337' WHERE entry IN (SELECT item FROM vendors WHERE entry = 50000);
    Just says processing for a long time, then if i click stop it says lost connection, other querys dont do this though.

  11. #11
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by klorox View Post
    Code:
    UPDATE items SET buyprice = '1337' WHERE entry IN (SELECT item FROM vendors WHERE entry = 50000);
    Just says processing for a long time, then if i click stop it says lost connection, other querys dont do this though.
    worked perfectly for me... are u sure you used a existing vendorID ?

  12. #12
    Lich King's Avatar Contributor
    Reputation
    100
    Join Date
    May 2007
    Posts
    911
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great queries latruwski

  13. #13
    klorox's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The id for my vendor is 70003, its a S3 vendor. So yeah im pretty sure its all correct. I used the UPDATE `items` SET buyprice = 500000 WHERE `entry` BETWEEN '1' and '40000'; and that works fine

  14. #14
    Lich King's Avatar Contributor
    Reputation
    100
    Join Date
    May 2007
    Posts
    911
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well if you want everything on your server free, then do this:
    Code:
    UPDATE `items` SET buyprice = 0 WHERE `entry` BETWEEN '1' and '99999999';

  15. #15
    klorox's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well never mind iv managed to figure out another way

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] Usefull Database Queries
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 28
    Last Post: 03-20-2008, 07:10 AM
  2. [RELEASE]Snailz Databases
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 30
    Last Post: 01-30-2008, 04:44 PM
  3. [RELEASE] Venice Database Revision 121 [ +Video Included on Upcoming Event's]
    By ~SaiLyn~ in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 01-15-2008, 06:39 PM
  4. [Release] Starting Gear Query Generator (May be Updated)
    By wowcomputer in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-25-2007, 11:43 PM
  5. [Release]Blizzlike Database - Fully Functioning
    By ~SaiLyn~ in forum World of Warcraft Emulator Servers
    Replies: 17
    Last Post: 11-12-2007, 09:52 PM
All times are GMT -5. The time now is 11:40 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search