Basic understanding of SQL Scripting. menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    Drop_Warcrack's Avatar Member
    Reputation
    43
    Join Date
    Feb 2007
    Posts
    110
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Basic understanding of SQL Scripting.

    Before we begin, this guide was made by me no help from other guides or people. You can repost this to any website, but please just put credits thats all I ask.


    Alright, today I'm going to teach you a little bit about SQL file scripting and what all those mumbo jumbo letters, and numbers mean. It's really easy once you know it, it's just writing it in the format thats annoying. Thats why you got programs to do that these days.



    I'll start by giving you a test of an SQL file coming from a custom weapon

    [INSERT INTO items (entry, class, subclass, field4, name1, name2, name3, name4, displayid, quality, flags, buyprice, sellprice, inventorytype, allowableclass, allowablerace, itemlevel, requiredlevel, RequiredSkill, RequiredSkillRank, RequiredSkillSubRank, RequiredPlayerRank1, RequiredPlayerRank2, RequiredFaction, RequiredFactionStanding, `Unique`, maxcount, ContainerSlots, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, dmg_min1, dmg_max1, dmg_type1, dmg_min2, dmg_max2, dmg_type2, dmg_min3, dmg_max3, dmg_type3, dmg_min4, dmg_max4, dmg_type4, dmg_min5, dmg_max5, dmg_type5, armor, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, ammo_type, `range`, spellid_1, spelltrigger_1, spellcharges_1, spellcooldown_1, spellcategory_1, spellcategorycooldown_1, spellid_2, spelltrigger_2, spellcharges_2, spellcooldown_2, spellcategory_2, spellcategorycooldown_2, spellid_3, spelltrigger_3, spellcharges_3, spellcooldown_3, spellcategory_3, spellcategorycooldown_3, spellid_4, spelltrigger_4, spellcharges_4, spellcooldown_4, spellcategory_4, spellcategorycooldown_4, spellid_5, spelltrigger_5, spellcharges_5, spellcooldown_5, spellcategory_5, spellcategorycooldown_5, bonding, description, page_id, page_language, page_material, quest_id, lock_id, lock_material, sheathID, randomprop, unk203_1, block, itemset, MaxDurability, ZoneNameID, mapid, bagfamily, TotemCategory, socket_color_1, unk201_3, socket_color_2, unk201_5, socket_color_3, unk201_7, socket_bonus, GemProperties, ItemExtendedCost, ReqDisenchantSkill, unk2)
    VALUES (12,2,0,-1,"test","test","test","test",21332,5,0,0000,0000,13,-1,-1,70,70,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,200,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,1,"test",0,0,0,0,0,1,3,0,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0); QUOTE]
    [/quote]


    Well as you can see at the top it has "Insert INTO items"

    (entry, class, subclass, field4, name1, name2, name3, name4, displayid, quality, flags, buyprice, sellprice, inventorytype, allowableclass, allowablerace, itemlevel, requiredlevel, RequiredSkill, RequiredSkillRank, RequiredSkillSubRank, RequiredPlayerRank1, RequiredPlayerRank2, RequiredFaction, RequiredFactionStanding, `Unique`, maxcount, ContainerSlots, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, dmg_min1, dmg_max1, dmg_type1, dmg_min2, dmg_max2, dmg_type2, dmg_min3, dmg_max3, dmg_type3, dmg_min4, dmg_max4, dmg_type4, dmg_min5, dmg_max5, dmg_type5, armor, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, ammo_type, `range`, spellid_1, spelltrigger_1, spellcharges_1, spellcooldown_1, spellcategory_1, spellcategorycooldown_1, spellid_2, spelltrigger_2, spellcharges

    Let me try explain that best I can, "Insert INTO ITEMS" Means what's going into the item, example *10 hp, 20 shadow resistance, basically just it's stats and skills ect*

    Entry: The Entry ID used to put into the game.
    Class: Which class can use this.
    Name: Names.. Lol
    Display ID: What the item looks like
    Flags: Quest giver, NPC, vendor ect.
    Buyprice: What you buy it for.
    Sellprice: What you sell it for.
    Inventorytype: Just the equip slot. (I think)
    Itemlevel: Item level.. Duh :P
    allowableclass: Umm.. :P
    allowablerace: Thats for mounts ect.
    Itemlevel: Item level.
    requiredlevel: Level you need to weild / equip / use ect.
    RequiredSkill: Example riding skill. (You can remove that so you can just use it)
    Requiredskill rank: So if you need the basic mount, put 75.
    RequiredSkillSubRank: not really used.
    RequiredPlayerRank1: Example Gladiator, or Highwarlord ect.
    RequiredPlayerRank2: Blacksmith weapon maker guy thingo :P
    RequiredFaction: Example Ironforge
    RequiredFaction Standing: Example Ironforge Exalted.
    'Unique': Can only equip one.
    Maxcount: How many you can have.

    Then you have your stats, not quite sure on the order it goes in. But you would not make an item manually just use WoW Vendetta.

    Then you have your damage, same as your stats.

    Then you got your resists, you can edit them manually but I still prefer to just use WoW Vendetta. Remember I'm teaching you what the text means :P Not teaching you how to script manually.

    Ammotype: Bow, Gun, Wand ect.
    Range: It's range.
    SpellID: Proc Spell.
    Spelltrigger: Thats the proc.
    Spellchargers: Example *increase hp by 100* *Charges Left: 10*
    Spellcooldown: The spell cooldown.

    Rest of the spells, not sure. Sorry if someone can post what they mean +Rep for them.

    Note: About the "Spells" I don't know much about since I have never used them.

    The rest of the SQL

    bonding, description, page_id, page_language, page_material, quest_id, lock_id, lock_material, sheathID, randomprop, unk203_1, block, itemset, MaxDurability, ZoneNameID, mapid, bagfamily, TotemCategory, socket_color_1, unk201_3, socket_color_2, unk201_5, socket_color_3, unk201_7, socket_bonus, GemProperties, ItemExtendedCost, ReqDisenchantSkill, unk2)
    VALUES (12,2,0,-1,"test","test","test","test",21332,5,0,0000,0000,13,-1,-1,70,70,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,200,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,1,"test",0,0,0,0,0,1,3,0,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0);

    Description: "This guide was made by Wreckless"
    Page_ID, page_language, Page_material = Unused in a weapon.
    Quest_ID: Quest ID
    Lock: Locks the table.
    SheathID: The sheath ID that you want.
    Randomprop: Random bonus, like 990+ Spell damage.
    Unk203_1: Need help on this one.
    Block: The block stats.
    Itemsets: Like a tier.
    Maxdurability: It's durability.
    ZonenameID: Like Stranglethorn or something.
    MapID: The map's ID.
    Bagfamily: I think they slots? Not sure.
    Totemcategory: Like fire totems.
    Socket colors: Just the socket colors, red, blue, yellow meta ect.
    Reqdisenchanted skill: The skill you need to disenchant the item.

    Alright now heres the values part.

    VALUES (12,2,0,-1,"test","test","test","test",21332,5,0,0000,0000,13,-1,-1,70,70,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,200,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,1,"test",0,0,0,0,0,1,3,0,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0);

    VALUES ('x', 'x', 'x', 'x,' 'x', 'x,' 'x'); Spaces after each , and have ' between each x - That is the basic way to script.
    If you don't understand that, this is how it works. Say you want 100 Strength+, 200 intellect and 300 agility, it would work out like this. '100', '200', '300', '0,' '0', '0,' '0'


    And if you look over the entire SQL file, you will see how it works out.



    Example you see "1"? Thats the entry ID, and the "70" Next to it? Thats the required level, and the "70" After that thats the item level.
    The 0's after that was because I made this weapon in 2 seconds, and I added no stats to them. So it says "0" Stats. See the "100" Further along? Thats the damage, and next to it is "200" Thats the max damage. It's extremly easy once you get it.




    Remember I'm teaching you what the text means :P Not teaching you how to script manually. And I'm not a proffesional at SQL I just know a little bit and I'm tring to help the people to start.

    Remember you don't need to know any of this, you can just use ADE (Ascent Database Editor) And make it all with a program, but if you ever need to fix something and ADE can't it's good to know a little bit about SQL.

    Any Errors, or if I'm missing something please let me know and I'll add it to the thread, and put your names at the bottom with credits for the fix.

    Thanks all for reading, I hope you all enjoy!

    Edit: Most of the 0,0,0's are because they were not used. Example "MapID" Was not used, since I made a weapon :P

    If you would like to learn more about SQL Scripting http://www.mmowned.com/forums/emulat...-sql-more.html
    Last edited by Drop_Warcrack; 12-28-2007 at 08:50 PM.
    Children use capitals it makes all the difference, I helped my uncle jack off the horse. I helped my uncle Jack off the horse.

    Basic understanding of SQL Scripting.

Similar Threads

  1. Naxxramas 80 Update SQL script
    By Iksf in forum WoW EMU General Releases
    Replies: 34
    Last Post: 06-22-2009, 05:04 AM
  2. Vendor SQL Scripting
    By Karyuudo in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 08-04-2008, 11:51 PM
  3. Basic SQL Scripting Guide
    By R0flz0r in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 04-17-2008, 06:34 PM
  4. Need SQL script.
    By EmuX in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 03-17-2008, 07:43 AM
  5. 2 Mount SQL Scripts and a World Enlarger!
    By Festigio in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-26-2008, 09:08 PM
All times are GMT -5. The time now is 01:53 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search