Skip to content

Instantly share code, notes, and snippets.

@Subv
Created October 19, 2013 23:16
Show Gist options
  • Save Subv/7062764 to your computer and use it in GitHub Desktop.
Save Subv/7062764 to your computer and use it in GitHub Desktop.
Another update for the schema of SunDofus's DB
<?xml version="1.0" encoding="utf-8" ?>
<!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ -->
<!-- Active URL: file:///C:/Users/Sebastian/Documents/Utils/www%20SQL%20Designer/index.html -->
<sql>
<datatypes db="mysql">
<group label="Numeric" color="rgb(238,238,170)">
<type label="TINYINT" length="0" sql="TINYINT" quote=""/>
<type label="SMALLINT" length="0" sql="SMALLINT" quote=""/>
<type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote=""/>
<type label="INT" length="0" sql="INT" quote=""/>
<type label="Integer" length="0" sql="INTEGER" quote=""/>
<type label="BIGINT" length="0" sql="BIGINT" quote=""/>
<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/>
<type label="Single precision" length="0" sql="FLOAT" quote=""/>
<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/>
</group>
<group label="Character" color="rgb(255,200,200)">
<type label="Char" length="1" sql="CHAR" quote="'"/>
<type label="Varchar" length="1" sql="VARCHAR" quote="'"/>
<type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>
<type label="Binary" length="1" sql="BINARY" quote="'"/>
<type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>
<type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
</group>
<group label="Date &amp; Time" color="rgb(200,255,200)">
<type label="Date" length="0" sql="DATE" quote="'"/>
<type label="Time" length="0" sql="TIME" quote="'"/>
<type label="Datetime" length="0" sql="DATETIME" quote="'"/>
<type label="Year" length="0" sql="YEAR" quote=""/>
<type label="Timestamp" length="0" sql="TIMESTAMP" quote="'"/>
</group>
<group label="Miscellaneous" color="rgb(200,200,255)">
<type label="ENUM" length="1" sql="ENUM" quote=""/>
<type label="SET" length="1" sql="SET" quote=""/>
<type label="Bit" length="0" sql="bit" quote=""/>
</group>
</datatypes><table x="643" y="44" name="characters">
<row name="guid" null="1" autoincrement="1">
<datatype>TINYINT</datatype>
<default>NULL</default></row>
<row name="name" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
<default>'NULL'</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>1</default></row>
<row name="class" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="gender" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="color_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_3" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="map_id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="map_cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="map_dir" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="health" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="energy" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="vitality" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="wisdom" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="force" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="intelligence" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="luck" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="agility" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>NULL</default></row>
<row name="statpoints" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="spellpoints" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="kamas" null="0" autoincrement="0">
<datatype>BIGINT(100)</datatype>
<default>0</default></row>
<row name="experience" null="0" autoincrement="0">
<datatype>BIGINT(100)</datatype>
<default>0</default></row>
<row name="bank_money" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="save_map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="save_cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guid</part>
</key>
<comment>Holds character information</comment>
</table>
<table x="92" y="79" name="item_instance">
<row name="guid" null="0" autoincrement="1">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="itemEntry" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>NULL</default><relation table="item_template" row="id" />
</row>
<row name="owner" null="0" autoincrement="0">
<datatype>BIGINT(100)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="count" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guid</part>
</key>
</table>
<table x="341" y="211" name="character_inventory">
<row name="guid" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="position" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_instance" row="guid" />
</row>
<row name="bank" null="0" autoincrement="0">
<datatype>TINYINT(1)</datatype>
<default>0</default><comment>Is the item in the bank?</comment>
</row>
<key type="PRIMARY" name="">
<part>guid</part>
<part>position</part>
</key>
</table>
<table x="413" y="3" name="item_instance_effects">
<row name="guid" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_instance" row="guid" />
</row>
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="effect" null="0" autoincrement="0">
<datatype>VARCHAR</datatype>
</row>
<row name="value_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_3" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guid</part>
<part>id</part>
</key>
<comment>Holds the effects of the items</comment>
</table>
<table x="918" y="432" name="character_alignment">
<row name="guid" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="faction" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="honor" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="deshonor" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guid</part>
</key>
<comment>Holds alignment/faction info</comment>
</table>
<table x="995" y="250" name="character_spells">
<row name="guid" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="spellId" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>1</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="position" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guid</part>
<part>spellId</part>
</key>
</table>
<table x="440" y="356" name="character_zaaps">
<row name="guid" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="zaap" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="zaaps" row="map" />
</row>
<key type="PRIMARY" name="">
<part>guid</part>
</key>
<comment>Stores the zaaps that a character has saved</comment>
</table>
<table x="1202" y="101" name="collectors">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="name_0" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="name_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="owner" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="guild" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="guilds" row="id" />
</row>
<row name="map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="dir" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Collectors for the guilds</comment>
</table>
<table x="250" y="361" name="creature_template">
<row name="id" null="1" autoincrement="1">
<datatype>TINYINT</datatype>
<default>NULL</default></row>
<row name="name" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
<default>'NULL'</default></row>
<row name="gfx" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="alignment" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_3" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="ai_type" null="0" autoincrement="0">
<datatype>TINYINT(4)</datatype>
<default>1</default></row>
<row name="minkamas" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="maxkamas" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Stores static information about creatures (monsters)</comment>
</table>
<table x="8" y="253" name="creature_loot_template">
<row name="id" null="1" autoincrement="1">
<datatype>TINYINT</datatype>
<default>NULL</default><relation table="creature_template" row="id" />
</row>
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<relation table="item_template" row="id" />
</row>
<row name="chance" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>NULL</default></row>
<row name="maxcount" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>NULL</default></row>
<key type="PRIMARY" name="">
<part>id</part>
<part>item</part>
</key>
<comment>Loot info for creatures</comment>
</table>
<table x="90" y="842" name="authservers">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="ip" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
<default>'NULL'</default></row>
<row name="port" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="passkey" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Holds the authservers passkey and id</comment>
</table>
<table x="773" y="902" name="creature_levels">
<row name="id" null="0" autoincrement="1">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="creatureId" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="creature_template" row="id" />
</row>
<row name="grade" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="PA" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="PM" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="hp" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_neutral" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_earth" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_fire" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_water" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_air" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_pa" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="resist_pm" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="wisdom" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="force" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="intelligence" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="luck" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="agility" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="experience" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Stat info for creatures of every level</comment>
</table>
<table x="417" y="1003" name="creature_level_spells">
<row name="level_id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="creature_levels" row="id" />
</row>
<row name="spell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>level_id</part>
<part>spell</part>
</key>
<comment>Spells for every creature level</comment>
</table>
<table x="197" y="1072" name="guild_emblem">
<row name="guild" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="guilds" row="id" />
</row>
<row name="backgroundId" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="backgroundColor" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="emblemId" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="emblemColor" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guild</part>
</key>
</table>
<table x="8" y="1213" name="guilds">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="name" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="experience" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="520" y="1414" name="guild_member">
<row name="guild" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="guilds" row="id" />
</row>
<row name="member" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="characters" row="guid" />
</row>
<row name="rank" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="rights" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="exp_given" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="exp_pct" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guild</part>
<part>member</part>
</key>
<comment>Stores members of the guilds</comment>
</table>
<table x="316" y="1460" name="guild_stats">
<row name="guild" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="guilds" row="id" />
</row>
<row name="max_collectors" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="collector_pods" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="collector_prospection" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="collector_wisdom" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="points" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guild</part>
</key>
<comment>Stat information for guilds</comment>
</table>
<table x="326" y="1259" name="collector_spells">
<row name="guild" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="guilds" row="id" />
</row>
<row name="spell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>guild</part>
<part>spell</part>
</key>
<comment>Spells for the collectors of the guilds</comment>
</table>
<table x="944" y="610" name="item_template">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="name" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<row name="description" null="0" autoincrement="0">
<datatype>BLOB</datatype>
</row>
<row name="type" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="weight" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="price" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="gfx" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="consumes" null="0" autoincrement="0">
<datatype>TINYINT(1)</datatype>
<default>0</default><comment>Is destroyed after use</comment>
</row>
<row name="usable" null="0" autoincrement="0">
<datatype>TINYINT(1)</datatype>
<default>0</default></row>
<row name="conditions" null="0" autoincrement="0">
<datatype>BLOB</datatype>
<comment>ToDo: Remove this once the general Conditions system is implemented (see TrinityCore conditions)</comment>
</row>
<row name="weapons_info" null="0" autoincrement="0">
<datatype>BLOB</datatype>
<comment>ToDo: Figure out what this is and separate it into another table</comment>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Item template information</comment>
</table>
<table x="1291" y="688" name="item_effect_template">
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_template" row="id" />
</row>
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="effect" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<row name="value_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_3" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>id</part>
<part>item</part>
</key>
</table>
<table x="997" y="941" name="item_sets">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="name" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Item set definition</comment>
</table>
<table x="1289" y="972" name="item_set_items">
<row name="itemset" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_sets" row="id" />
</row>
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_template" row="id" />
</row>
<key type="PRIMARY" name="">
<part>itemset</part>
<part>item</part>
</key>
<comment>List of items of each itemset</comment>
</table>
<table x="1206" y="1115" name="item_set_bonus">
<row name="itemset" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_sets" row="id" />
</row>
<row name="pieces" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>2</default></row>
<row name="effect" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>itemset</part>
<part>pieces</part>
<part>effect</part>
</key>
<comment>Bonuses for the itemsets</comment>
</table>
<table x="1574" y="644" name="usable_item_effects">
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_template" row="id" />
</row>
<row name="effect" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>item</part>
<part>effect</part>
</key>
<comment>Holds info about which items are usable and what their effects are.</comment>
</table>
<table x="1458" y="394" name="level_info">
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="character" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<row name="job" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<row name="mount" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<row name="alignment" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<row name="living" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<row name="incarnation" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<row name="guild" null="0" autoincrement="0">
<datatype>BIGINT(110)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>level</part>
</key>
<comment>Experience requirements for each level</comment>
</table>
<table x="1576" y="1314" name="zaaps">
<row name="map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>map</part>
</key>
<comment>Zaap templates</comment>
</table>
<table x="1214" y="1342" name="zaapis">
<row name="map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="zone" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>map</part>
</key>
<comment>Zaapi templates</comment>
</table>
<table x="1228" y="1537" name="spells_learn_level">
<row name="class" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="spell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="position" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<key type="PRIMARY" name="">
<part>class</part>
<part>level</part>
<part>spell</part>
</key>
<comment>Spells and their level requirements</comment>
</table>
<table x="1000" y="1191" name="map_template">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="date" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="width" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="height" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="key" null="0" autoincrement="0">
<datatype>BLOB</datatype>
</row>
<row name="data" null="0" autoincrement="0">
<datatype>BLOB</datatype>
</row>
<row name="capabilities" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="groups" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="groupsize" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="pos_x" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="pos_y" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="subarea" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Maps</comment>
</table>
<table x="989" y="1557" name="creature_spawns">
<row name="map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="creature" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="creature_template" row="id" />
</row>
<row name="level" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>map</part>
<part>creature</part>
<part>level</part>
</key>
<comment>Holds information about which creatures are spawned on which maps, the emulator will pick a random creature and then pick a random level from that creature to build the mob lists</comment>
</table>
<table x="712" y="1612" name="npc_template">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="name" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<row name="gfx" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="size" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="sex" null="0" autoincrement="0">
<datatype>TINYINT(1)</datatype>
<default>0</default></row>
<row name="color_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="color_3" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default></row>
<row name="gossip_menu" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>-1</default><relation table="gossip_menu" row="id" />
</row>
<row name="map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="dir" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="movement" null="0" autoincrement="0">
<datatype>TINYINT(1)</datatype>
<default>0</default><comment>Should the NPC move</comment>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Holds template and spawn information about non-player characters</comment>
</table>
<table x="1278" y="1756" name="npc_vendor">
<row name="npc" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="npc_template" row="id" />
</row>
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_template" row="id" />
</row>
<key type="PRIMARY" name="">
<part>npc</part>
<part>item</part>
</key>
<comment>Holds information about which items a specific NPC sells</comment>
</table>
<table x="1050" y="1872" name="npc_equip_template">
<row name="npc" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="npc_template" row="id" />
</row>
<row name="item" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="item_template" row="id" />
<comment>Has to be converted to hex</comment>
</row>
<row name="slot" null="0" autoincrement="1">
<datatype>INT(11)</datatype>
<default>0</default><comment>The table will be sorted by this field</comment>
</row>
<key type="PRIMARY" name="">
<part>npc</part>
<part>item</part>
<part>slot</part>
</key>
<comment>Holds information about the visual items that an NPC wears in the map.</comment>
</table>
<table x="1487" y="1645" name="gossip_menu">
<row name="id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="conditions" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<comment>Holds gossip information</comment>
</table>
<table x="1678" y="1601" name="gossip_menu_params">
<row name="menu_id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="gossip_menu" row="id" />
</row>
<row name="param" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="slot" null="0" autoincrement="1">
<datatype>INT(11)</datatype>
<default>0</default><comment>The table will be ordered by this field</comment>
</row>
<key type="PRIMARY" name="">
<part>menu_id</part>
<part>param</part>
</key>
<comment>Player parameters for gossip menus</comment>
</table>
<table x="1428" y="1844" name="gossip_menu_options">
<row name="menu_id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="gossip_menu" row="id" />
</row>
<row name="answer_id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="conditions" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<key type="PRIMARY" name="">
<part>menu_id</part>
<part>answer_id</part>
</key>
<comment>Possible answers to the gossip menus</comment>
</table>
<table x="1724" y="1810" name="gossip_menu_option_effects">
<row name="option_id" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="gossip_menu_options" row="answer_id" />
</row>
<row name="effect" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<key type="PRIMARY" name="">
<part>option_id</part>
</key>
<comment>Effects applied to the player when a gossip answer is selected</comment>
</table>
<table x="1512" y="1412" name="triggers">
<row name="map" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default><relation table="map_template" row="id" />
</row>
<row name="cell" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="action" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_1" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="value_2" null="0" autoincrement="0">
<datatype>INT(11)</datatype>
<default>0</default></row>
<row name="conditions" null="0" autoincrement="0">
<datatype>VARCHAR(255)</datatype>
</row>
<key type="PRIMARY" name="">
<part>map</part>
</key>
<comment>Triggers on the maps</comment>
</table>
</sql>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment