mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Database] Implement native database migrations in server (#2857)
* [Database] Implement native database updates in server * Cleanup * Delete db_update_manifest.txt * Bots updates * Final tweaks * Revert manifest * Tweaks * Remove code from eqemu_server.pl * Update database_update.cpp * Add user prompt update skipping with timeouts * Add termcolor IS_TTY is check * Update database_conversions.cpp * Remove large migrations * Push * fix headers. * Remove last of non-bot large migrations * Update database_update_manifest.cpp * More purging * Tweaks * Bot migrations * More work * Tweaks * Implement multi-statement query execution only for migrations * Add CLI database:updates * Add bootstrap commands * Upload bootstrap sql's * Update bot_tables_bootstrap.sql * Update bot_tables_bootstrap.sql * Add mercs:bootstrap and bots:bootstrap * Update bot_tables_bootstrap.sql * Update database.cpp * Update bot_tables_bootstrap.sql * More cleanup * Add mercs:disable and bots:disable * Update eqemu_server.pl * Update eqemu_server.pl * Update eqemu_server.pl * Test cases * Update eqemu_server.pl * Delete 2023_05_08_character_tribute_primary_key.sql * Post rebase fixes * Post rebase tweaks * Delete errant files * Rebase files from master * More adjustments * Delete files no longer used * Add missing migrations * bots:bootstrap is now bots:enable --------- Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
9000|2015_09_30_bots.sql|SHOW TABLES LIKE 'bot_data'|empty|
|
||||
9001|2016_03_24_bots_command_settings.sql|SHOW TABLES LIKE 'bot_command_settings'|empty|
|
||||
9002|2016_03_24_bots_command_rules.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CommandSpellRank'|empty|
|
||||
9003|2016_04_05_bots_pet_spell_id_field.sql|SHOW COLUMNS FROM `bot_pets` LIKE 'pet_id'|not_empty|
|
||||
9004|2016_04_07_bots_heal_override_target.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'healrotationclearhot'|empty|
|
||||
9005|2016_04_08_bots_heal_rotations.sql|SHOW TABLES LIKE 'bot_heal_rotations'|empty|
|
||||
9006|2016_04_12_bots_inventory_window.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'inventorywindow'|empty|
|
||||
9007|2016_06_23_bots_camel_case_name_rule.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE 'Bots:AllowCamelCaseNames'|empty|
|
||||
9008|2016_06_28_bots_inventory_charges_update.sql|SELECT * FROM `information_schema`.`COLUMNS` isc WHERE isc.`TABLE_SCHEMA` = DATABASE() AND isc.`TABLE_NAME` = 'bot_inventories' AND isc.`COLUMN_NAME` = 'inst_charges' AND isc.`DATA_TYPE` = 'tinyint'|not_empty|
|
||||
9009|2017_02_15_bots_bot_spells_entries.sql|SELECT `id` FROM `npc_spells_entries` WHERE `npc_spells_id` >= 701 AND `npc_spells_id` <= 712|not_empty|
|
||||
9010|2017_02_20_bots_bard_spell_update.sql|SELECT * FROM `bot_spells_entries` WHERE (`npc_spells_id` = 711 OR `npc_spells_id` = 3008) AND `type` >= 0xFFFF0000|empty|
|
||||
9011|2017_02_23_bots_spell_casting_chances.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty|
|
||||
9012|2017_02_26_bots_npc_spells_update_for_bots.sql|SELECT * FROM `npc_spells` WHERE `id` = '701' AND `name` = 'Cleric Bot'|not_empty|
|
||||
9013|2017_02_26_bots_spells_id_update_for_saved_bots.sql|SELECT * FROM `bot_data` WHERE `spells_id` >= '701' AND `spells_id` <= '712'|not_empty|
|
||||
9014|2017_02_26_bots_spells_id_update_for_bot_spells_entries.sql|SELECT * FROM `bot_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712'|not_empty|
|
||||
9015|2017_02_26_bots_spell_casting_chances_update.sql|SHOW COLUMNS FROM `bot_spell_casting_chances` LIKE 'value'|not_empty|
|
||||
9016|2017_02_26_bots_spell_casting_chances_update.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty|
|
||||
9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty|
|
||||
9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty|
|
||||
9019|2018_04_12_bots_stop_melee_level.sql|SHOW COLUMNS FROM `bot_data` LIKE 'stop_melee_level'|empty|
|
||||
9020|2018_08_13_bots_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `bot_step` = 0|not_empty|
|
||||
9021|2018_10_09_bots_owner_options.sql|SHOW TABLES LIKE 'bot_owner_options'|empty|
|
||||
9022|2019_02_07_bots_stance_type_update.sql|SELECT * FROM `bot_spell_casting_chances` WHERE `spell_type_index` = '255' AND `class_id` = '255' AND `stance_index` = '0'|not_empty|
|
||||
9023|2019_06_22_bots_owner_option_stats_update.sql|SELECT * FROM db_version WHERE bots_version >= 9023|empty|
|
||||
9024|2019_06_27_bots_pet_get_lost.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'petgetlost'|empty|
|
||||
9025|2019_08_26_bots_owner_option_spawn_message.sql|SELECT * FROM db_version WHERE bots_version >= 9025|empty|
|
||||
9026|2019_09_09_bots_owner_options_rework.sql|SHOW COLUMNS FROM `bot_owner_options` LIKE 'option_type'|empty|
|
||||
9027|2020_03_30_bots_view_update.sql|SELECT * FROM db_version WHERE bots_version >= 9027|empty|
|
||||
9028|2021_06_04_bot_create_combinations.sql|SHOW TABLES LIKE 'bot_create_combinations'|empty|
|
||||
9029|2022_06_21_bot_groups_auto_spawn.sql|SHOW COLUMNS from `bot_groups` LIKE 'auto_spawm'|empty|
|
||||
9030|2022_10_27_bot_data_buckets.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'bucket_name'|empty|
|
||||
9031|2022_11_13_bot_spells_entries.sql|SELECT * FROM db_version WHERE bots_version >= 9031|empty|
|
||||
9032|2022_11_07_bot_expansion_bitmask.sql|SHOW COLUMNS FROM `bot_data` LIKE 'expansion_bitmask'|empty|
|
||||
9033|2022_11_19_bot_spell_settings.sql|SHOW TABLES LIKE 'bot_spell_settings'|empty|
|
||||
9034|2022_12_02_bot_spell_settings.sql|SHOW COLUMNS FROM `bot_data` LIKE 'enforce_spell_settings'|empty|
|
||||
9035|2022_12_04_bot_archery.sql|SHOW COLUMNS FROM `bot_data` LIKE 'archery_setting'|empty|
|
||||
9036|2023_01_19_drop_bot_views.sql|SHOW TABLES LIKE 'vw_groups'|not_empty|
|
||||
9037|2023_01_22_add_name_index.sql||show index from bot_data WHERE key_name = 'name`|empty|
|
||||
9038|2023_02_16_add_caster_range.sql|SHOW COLUMNS FROM `bot_data` LIKE 'caster_range'|empty|
|
||||
9039|2023_03_31_remove_bot_groups.sql|SHOW TABLES LIKE 'bot_groups'|not_empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
# yet using the versioning system to figure out where the database is schema wise to determine
|
||||
# which updates are necessary to run
|
||||
#
|
||||
# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
|
||||
# 0 = Database Version
|
||||
# 1 = Filename.sql
|
||||
# 2 = Query_to_Check_Condition_For_Needed_Update
|
||||
# 3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
|
||||
# contains = If query results contains text from 4th value
|
||||
# match = If query results matches text from 4th value
|
||||
# missing = If query result is missing text from 4th value
|
||||
# empty = If the query results in no results
|
||||
# not_empty = If the query is not empty
|
||||
# 4 = Text to match
|
||||
#
|
||||
#
|
||||
@@ -1,27 +0,0 @@
|
||||
ALTER TABLE `botguildmembers` ADD `alt` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `public_note`;
|
||||
|
||||
DROP VIEW IF EXISTS `vwGuildMembers`;
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
select 'C' as mobtype,
|
||||
cm.char_id,
|
||||
cm.guild_id,
|
||||
cm.rank,
|
||||
cm.tribute_enable,
|
||||
cm.total_tribute,
|
||||
cm.last_tribute,
|
||||
cm.banker,
|
||||
cm.public_note,
|
||||
cm.alt
|
||||
from guild_members as cm
|
||||
union all
|
||||
select 'B' as mobtype,
|
||||
bm.char_id,
|
||||
bm.guild_id,
|
||||
bm.rank,
|
||||
bm.tribute_enable,
|
||||
bm.total_tribute,
|
||||
bm.last_tribute,
|
||||
bm.banker,
|
||||
bm.public_note,
|
||||
bm.alt
|
||||
from botguildmembers as bm;
|
||||
@@ -1,74 +0,0 @@
|
||||
-- A fix for the auto-conversion view renaming issue
|
||||
|
||||
|
||||
DROP VIEW IF EXISTS `vwbotcharactermobs`;
|
||||
DROP VIEW IF EXISTS `vwbotgroups`;
|
||||
DROP VIEW IF EXISTS `vwgroups`;
|
||||
DROP VIEW IF EXISTS `vwguildmembers`;
|
||||
|
||||
|
||||
CREATE VIEW `vwBotCharacterMobs` AS
|
||||
SELECT _utf8'C' AS mobtype,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`last_login`,
|
||||
c.`zone_id`
|
||||
FROM `character_data` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mobtype,
|
||||
b.`BotID` AS id,
|
||||
b.`Name` AS name,
|
||||
b.`Class` AS class,
|
||||
b.`BotLevel` AS level,
|
||||
0 AS timelaston,
|
||||
0 AS zoneid
|
||||
FROM bots AS b;
|
||||
|
||||
CREATE VIEW `vwGroups` AS
|
||||
SELECT g.`groupid` AS groupid,
|
||||
GetMobType(g.`name`) AS mobtype,
|
||||
g.`name` AS name,
|
||||
g.`charid` AS mobid,
|
||||
IFNULL(c.`level`, b.`BotLevel`) AS level
|
||||
FROM `group_id` AS g
|
||||
LEFT JOIN `character_data` AS c ON g.`name` = c.`name`
|
||||
LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;
|
||||
|
||||
CREATE VIEW `vwBotGroups` AS
|
||||
SELECT g.`BotGroupId`,
|
||||
g.`BotGroupName`,
|
||||
g.`BotGroupLeaderBotId`,
|
||||
b.`Name` AS BotGroupLeaderName,
|
||||
b.`BotOwnerCharacterId`,
|
||||
c.`name` AS BotOwnerCharacterName
|
||||
FROM `botgroup` AS g
|
||||
JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`
|
||||
JOIN `character_data` AS c ON b.`BotOwnerCharacterID` = c.`id`
|
||||
ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;
|
||||
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
SELECT 'C' AS mobtype,
|
||||
cm.`char_id`,
|
||||
cm.`guild_id`,
|
||||
cm.`rank`,
|
||||
cm.`tribute_enable`,
|
||||
cm.`total_tribute`,
|
||||
cm.`last_tribute`,
|
||||
cm.`banker`,
|
||||
cm.`public_note`,
|
||||
cm.`alt`
|
||||
FROM `guild_members` AS cm
|
||||
UNION ALL
|
||||
SELECT 'B' AS mobtype,
|
||||
bm.`char_id`,
|
||||
bm.`guild_id`,
|
||||
bm.`rank`,
|
||||
bm.`tribute_enable`,
|
||||
bm.`total_tribute`,
|
||||
bm.`last_tribute`,
|
||||
bm.`banker`,
|
||||
bm.`public_note`,
|
||||
bm.`alt`
|
||||
FROM `botguildmembers` AS bm;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,85 +0,0 @@
|
||||
-- 'drop_bots (pre-update script)' sql script file
|
||||
-- current as of 11/30/2015
|
||||
--
|
||||
-- Note: This file will remove bot schema loaded by 'load_bots' sql scripts.
|
||||
-- There may still be remnants of bot activity in tables `guild_members` and
|
||||
-- `group_id`. If these entries are causing issues, you may need to manually
|
||||
-- remove them.
|
||||
|
||||
|
||||
SELECT "dropping views...";
|
||||
DROP VIEW IF EXISTS `vwGuildMembers`;
|
||||
DROP VIEW IF EXISTS `vwGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
|
||||
|
||||
|
||||
SELECT "dropping functions...";
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByName`;
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByID`;
|
||||
DROP FUNCTION IF EXISTS `GetMobType`;
|
||||
|
||||
|
||||
SELECT "dropping tables...";
|
||||
DROP TABLE IF EXISTS `botguildmembers`;
|
||||
DROP TABLE IF EXISTS `botgroupmembers`;
|
||||
DROP TABLE IF EXISTS `botgroup`;
|
||||
DROP TABLE IF EXISTS `botgroups`; -- this table is not a part of 'load_bots.sql'
|
||||
DROP TABLE IF EXISTS `botpetinventory`;
|
||||
DROP TABLE IF EXISTS `botpetbuffs`;
|
||||
DROP TABLE IF EXISTS `botpets`;
|
||||
DROP TABLE IF EXISTS `botinventory`;
|
||||
DROP TABLE IF EXISTS `botbuffs`;
|
||||
DROP TABLE IF EXISTS `bottimers`;
|
||||
DROP TABLE IF EXISTS `botstances`;
|
||||
DROP TABLE IF EXISTS `bots`;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `DropBotsSchema`;
|
||||
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE PROCEDURE `DropBotsSchema` ()
|
||||
BEGIN
|
||||
SELECT "deleting rules...";
|
||||
DELETE FROM `rule_values` WHERE `rule_name` LIKE 'Bots%';
|
||||
|
||||
|
||||
SELECT "deleting command...";
|
||||
DELETE FROM `commands` WHERE `command` LIKE 'bot';
|
||||
|
||||
|
||||
SELECT "restoring keys...";
|
||||
IF (EXISTS(SELECT `CONSTRAINT_NAME` FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'group_id' AND `CONSTRAINT_NAME` = 'PRIMARY')) THEN
|
||||
ALTER TABLE `group_id` DROP PRIMARY KEY;
|
||||
END IF;
|
||||
ALTER TABLE `group_id` ADD PRIMARY KEY (`groupid`, `charid`, `ismerc`);
|
||||
|
||||
IF (EXISTS(SELECT `CONSTRAINT_NAME` FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'guild_members' AND `CONSTRAINT_NAME` = 'PRIMARY')) THEN
|
||||
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
||||
END IF;
|
||||
ALTER TABLE `guild_members` ADD PRIMARY KEY (`char_id`);
|
||||
|
||||
|
||||
SELECT "de-activating spawns...";
|
||||
UPDATE `spawn2` SET `enabled` = 0 WHERE `id` IN (59297,59298);
|
||||
|
||||
|
||||
SELECT "clearing database version...";
|
||||
IF (EXISTS(SELECT `COLUMN_NAME` FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'db_version' AND `COLUMN_NAME` = 'bots_version')) THEN
|
||||
UPDATE `db_version`
|
||||
SET `bots_version` = 0;
|
||||
END IF;
|
||||
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
|
||||
CALL `DropBotsSchema`();
|
||||
|
||||
SELECT "dropping procedure...";
|
||||
DROP PROCEDURE IF EXISTS `DropBotsSchema`;
|
||||
|
||||
|
||||
-- End of File
|
||||
@@ -1,280 +0,0 @@
|
||||
-- 'load_bots' sql script file
|
||||
-- current as of 10/15/2014
|
||||
--
|
||||
-- Use this file on databases where the player profile blob has been converted.
|
||||
--
|
||||
-- Note: This file assumes a database free of bot remnants. If you have a prior
|
||||
-- bot installation and wish to reload the default schema and entries, then
|
||||
-- source 'drop_bots.sql' before sourcing this file.
|
||||
|
||||
|
||||
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
||||
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`, `ismerc`);
|
||||
|
||||
UPDATE `spawn2` SET `enabled` = 1 WHERE `id` IN (59297,59298);
|
||||
|
||||
-- old command kept for reference (`commands` now only has 2 columns - `command` and `access`)
|
||||
-- INSERT INTO `commands` VALUES ('bot', '0', 'Type \"#bot help\" to the see the list of available commands for bots.');
|
||||
INSERT INTO `commands` VALUES ('bot', '0');
|
||||
|
||||
INSERT INTO `rule_values` VALUES
|
||||
('1', 'Bots:BotAAExpansion', '8', 'The expansion through which bots will obtain AAs'),
|
||||
('1', 'Bots:BotFinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.'),
|
||||
('1', 'Bots:BotGroupBuffing', 'false', 'Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.'),
|
||||
('1', 'Bots:BotManaRegen', '3.0', 'Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.'),
|
||||
('1', 'Bots:BotQuest', 'false', 'Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl'),
|
||||
('1', 'Bots:BotSpellQuest', 'false', 'Anita Thrall\'s (Anita_Thrall.pl) Bot Spell Scriber quests.'),
|
||||
('1', 'Bots:CreateBotCount', '150', 'Number of bots that each account can create'),
|
||||
('1', 'Bots:SpawnBotCount', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');
|
||||
|
||||
CREATE TABLE `bots` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotOwnerCharacterID` INT(10) UNSIGNED NOT NULL,
|
||||
`BotSpellsID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NOT NULL,
|
||||
`LastName` VARCHAR(32) DEFAULT NULL,
|
||||
`BotLevel` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Race` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Class` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Gender` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Size` FLOAT NOT NULL DEFAULT '0',
|
||||
`Face` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairStyle` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor2` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeardColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeard` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinHeritage` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinTattoo` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinDetails` INT(10) NOT NULL DEFAULT '0',
|
||||
`HP` INTEGER NOT NULL DEFAULT '0',
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`MR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`CR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`DR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`FR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`PR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Corrup` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`AC` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`STR` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`STA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`DEX` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`AGI` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`_INT` MEDIUMINT(8) NOT NULL DEFAULT '80',
|
||||
`WIS` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`CHA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`ATK` MEDIUMINT(9) NOT NULL DEFAULT '0',
|
||||
`BotCreateDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`LastSpawnDate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`TotalPlayTime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`LastZoneId` SMALLINT(6) NOT NULL DEFAULT '0',
|
||||
`BotInspectMessage` VARCHAR(256) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botstances` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`StanceID` TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_botstances_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `bottimers` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TimerID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Value` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_bottimers_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `botbuffs` (
|
||||
`BotBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DurationFormula` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TicsRemaining` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`PoisonCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DiseaseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CurseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CorruptionCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`HitCount` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MeleeRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MagicRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DeathSaveSuccessChance` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterAARank` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Persistent` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotBuffId`),
|
||||
KEY `FK_botbuff_1` (`BotId`),
|
||||
CONSTRAINT `FK_botbuff_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botinventory` (
|
||||
`BotInventoryID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SlotID` INTEGER SIGNED NOT NULL DEFAULT '0',
|
||||
`ItemID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`charges` TINYINT(3) UNSIGNED DEFAULT 0,
|
||||
`color` INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot5` MEDIUMINT(7) UNSIGNED DEFAULT 0,
|
||||
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`BotInventoryID`),
|
||||
KEY `FK_botinventory_1` (`BotID`),
|
||||
CONSTRAINT `FK_botinventory_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botpets` (
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PetId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NULL,
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`HitPoints` INTEGER NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetsId`),
|
||||
KEY `FK_botpets_1` (`BotId`),
|
||||
CONSTRAINT `FK_botpets_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`),
|
||||
CONSTRAINT `U_botpets_1` UNIQUE (`BotId`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetbuffs` (
|
||||
`BotPetBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Duration` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetBuffId`),
|
||||
KEY `FK_botpetbuffs_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetbuffs_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetinventory` (
|
||||
`BotPetInventoryId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`ItemId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetInventoryId`),
|
||||
KEY `FK_botpetinventory_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetinventory_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botgroup` (
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupLeaderBotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotGroupName` VARCHAR(64) NOT NULL,
|
||||
PRIMARY KEY (`BotGroupId`),
|
||||
KEY `FK_botgroup_1` (`BotGroupLeaderBotId`),
|
||||
CONSTRAINT `FK_botgroup_1` FOREIGN KEY (`BotGroupLeaderBotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botgroupmembers` (
|
||||
`BotGroupMemberId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotGroupMemberId`),
|
||||
KEY `FK_botgroupmembers_1` (`BotGroupId`),
|
||||
CONSTRAINT `FK_botgroupmembers_1` FOREIGN KEY (`BotGroupId`) REFERENCES `botgroup` (`BotGroupId`),
|
||||
KEY `FK_botgroupmembers_2` (`BotId`),
|
||||
CONSTRAINT `FK_botgroupmembers_2` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botguildmembers` (
|
||||
`char_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`guild_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`rank` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`tribute_enable` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`total_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`last_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`banker` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`public_note` TEXT NULL,
|
||||
`alt` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`char_id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
|
||||
BEGIN
|
||||
DECLARE Result CHAR(1);
|
||||
|
||||
SET Result = NULL;
|
||||
|
||||
IF (SELECT COUNT(*) FROM `character_data` WHERE `name` = mobname) > 0 THEN
|
||||
SET Result = 'C';
|
||||
ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN
|
||||
SET Result = 'B';
|
||||
END IF;
|
||||
|
||||
RETURN Result;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
CREATE VIEW `vwBotCharacterMobs` AS
|
||||
SELECT _utf8'C' AS mobtype,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`last_login`,
|
||||
c.`zone_id`
|
||||
FROM `character_data` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mobtype,
|
||||
b.`BotID` AS id,
|
||||
b.`Name` AS name,
|
||||
b.`Class` AS class,
|
||||
b.`BotLevel` AS level,
|
||||
0 AS timelaston,
|
||||
0 AS zoneid
|
||||
FROM bots AS b;
|
||||
|
||||
CREATE VIEW `vwGroups` AS
|
||||
SELECT g.`groupid` AS groupid,
|
||||
GetMobType(g.`name`) AS mobtype,
|
||||
g.`name` AS name,
|
||||
g.`charid` AS mobid,
|
||||
IFNULL(c.`level`, b.`BotLevel`) AS level
|
||||
FROM `group_id` AS g
|
||||
LEFT JOIN `character_data` AS c ON g.`name` = c.`name`
|
||||
LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;
|
||||
|
||||
CREATE VIEW `vwBotGroups` AS
|
||||
SELECT g.`BotGroupId`,
|
||||
g.`BotGroupName`,
|
||||
g.`BotGroupLeaderBotId`,
|
||||
b.`Name` AS BotGroupLeaderName,
|
||||
b.`BotOwnerCharacterId`,
|
||||
c.`name` AS BotOwnerCharacterName
|
||||
FROM `botgroup` AS g
|
||||
JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`
|
||||
JOIN `character_data` AS c ON b.`BotOwnerCharacterID` = c.`id`
|
||||
ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;
|
||||
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
SELECT 'C' AS mobtype,
|
||||
cm.`char_id`,
|
||||
cm.`guild_id`,
|
||||
cm.`rank`,
|
||||
cm.`tribute_enable`,
|
||||
cm.`total_tribute`,
|
||||
cm.`last_tribute`,
|
||||
cm.`banker`,
|
||||
cm.`public_note`,
|
||||
cm.`alt`
|
||||
FROM `guild_members` AS cm
|
||||
UNION ALL
|
||||
SELECT 'B' AS mobtype,
|
||||
bm.`char_id`,
|
||||
bm.`guild_id`,
|
||||
bm.`rank`,
|
||||
bm.`tribute_enable`,
|
||||
bm.`total_tribute`,
|
||||
bm.`last_tribute`,
|
||||
bm.`banker`,
|
||||
bm.`public_note`,
|
||||
bm.`alt`
|
||||
FROM `botguildmembers` AS bm;
|
||||
@@ -1,280 +0,0 @@
|
||||
-- 'load_bots_old' sql script file
|
||||
-- current as of 10/15/2014
|
||||
--
|
||||
-- Use this file on databases where the player profile blob has not been converted
|
||||
--
|
||||
-- Note: This file assumes a database free of bot remnants. If you have a prior
|
||||
-- bot installation and wish to reload the default schema and entries, then
|
||||
-- source 'drop_bots.sql' before sourcing this file.
|
||||
|
||||
|
||||
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
||||
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`, `ismerc`);
|
||||
|
||||
UPDATE `spawn2` SET `enabled` = 1 WHERE `id` IN (59297,59298);
|
||||
|
||||
-- old command kept for reference (`commands` now only has 2 columns - `command` and `access`)
|
||||
-- INSERT INTO `commands` VALUES ('bot', '0', 'Type \"#bot help\" to the see the list of available commands for bots.');
|
||||
INSERT INTO `commands` VALUES ('bot', '0');
|
||||
|
||||
INSERT INTO `rule_values` VALUES
|
||||
('1', 'Bots:BotAAExpansion', '8', 'The expansion through which bots will obtain AAs'),
|
||||
('1', 'Bots:BotFinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.'),
|
||||
('1', 'Bots:BotGroupBuffing', 'false', 'Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.'),
|
||||
('1', 'Bots:BotManaRegen', '3.0', 'Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.'),
|
||||
('1', 'Bots:BotQuest', 'false', 'Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl'),
|
||||
('1', 'Bots:BotSpellQuest', 'false', 'Anita Thrall\'s (Anita_Thrall.pl) Bot Spell Scriber quests.'),
|
||||
('1', 'Bots:CreateBotCount', '150', 'Number of bots that each account can create'),
|
||||
('1', 'Bots:SpawnBotCount', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');
|
||||
|
||||
CREATE TABLE `bots` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotOwnerCharacterID` INT(10) UNSIGNED NOT NULL,
|
||||
`BotSpellsID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NOT NULL,
|
||||
`LastName` VARCHAR(32) DEFAULT NULL,
|
||||
`BotLevel` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Race` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Class` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Gender` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Size` FLOAT NOT NULL DEFAULT '0',
|
||||
`Face` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairStyle` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor2` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeardColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeard` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinHeritage` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinTattoo` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinDetails` INT(10) NOT NULL DEFAULT '0',
|
||||
`HP` INTEGER NOT NULL DEFAULT '0',
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`MR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`CR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`DR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`FR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`PR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Corrup` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`AC` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`STR` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`STA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`DEX` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`AGI` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`_INT` MEDIUMINT(8) NOT NULL DEFAULT '80',
|
||||
`WIS` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`CHA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`ATK` MEDIUMINT(9) NOT NULL DEFAULT '0',
|
||||
`BotCreateDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`LastSpawnDate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`TotalPlayTime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`LastZoneId` SMALLINT(6) NOT NULL DEFAULT '0',
|
||||
`BotInspectMessage` VARCHAR(256) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botstances` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`StanceID` TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_botstances_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `bottimers` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TimerID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Value` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_bottimers_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `botbuffs` (
|
||||
`BotBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DurationFormula` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TicsRemaining` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`PoisonCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DiseaseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CurseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CorruptionCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`HitCount` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MeleeRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MagicRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DeathSaveSuccessChance` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterAARank` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Persistent` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotBuffId`),
|
||||
KEY `FK_botbuff_1` (`BotId`),
|
||||
CONSTRAINT `FK_botbuff_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botinventory` (
|
||||
`BotInventoryID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SlotID` INTEGER SIGNED NOT NULL DEFAULT '0',
|
||||
`ItemID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`charges` TINYINT(3) UNSIGNED DEFAULT 0,
|
||||
`color` INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot5` MEDIUMINT(7) UNSIGNED DEFAULT 0,
|
||||
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`BotInventoryID`),
|
||||
KEY `FK_botinventory_1` (`BotID`),
|
||||
CONSTRAINT `FK_botinventory_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botpets` (
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PetId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NULL,
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`HitPoints` INTEGER NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetsId`),
|
||||
KEY `FK_botpets_1` (`BotId`),
|
||||
CONSTRAINT `FK_botpets_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`),
|
||||
CONSTRAINT `U_botpets_1` UNIQUE (`BotId`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetbuffs` (
|
||||
`BotPetBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Duration` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetBuffId`),
|
||||
KEY `FK_botpetbuffs_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetbuffs_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetinventory` (
|
||||
`BotPetInventoryId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`ItemId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetInventoryId`),
|
||||
KEY `FK_botpetinventory_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetinventory_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botgroup` (
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupLeaderBotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotGroupName` VARCHAR(64) NOT NULL,
|
||||
PRIMARY KEY (`BotGroupId`),
|
||||
KEY `FK_botgroup_1` (`BotGroupLeaderBotId`),
|
||||
CONSTRAINT `FK_botgroup_1` FOREIGN KEY (`BotGroupLeaderBotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botgroupmembers` (
|
||||
`BotGroupMemberId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotGroupMemberId`),
|
||||
KEY `FK_botgroupmembers_1` (`BotGroupId`),
|
||||
CONSTRAINT `FK_botgroupmembers_1` FOREIGN KEY (`BotGroupId`) REFERENCES `botgroup` (`BotGroupId`),
|
||||
KEY `FK_botgroupmembers_2` (`BotId`),
|
||||
CONSTRAINT `FK_botgroupmembers_2` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botguildmembers` (
|
||||
`char_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`guild_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`rank` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`tribute_enable` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`total_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`last_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`banker` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`public_note` TEXT NULL,
|
||||
`alt` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`char_id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
|
||||
BEGIN
|
||||
DECLARE Result CHAR(1);
|
||||
|
||||
SET Result = NULL;
|
||||
|
||||
IF (SELECT COUNT(*) FROM `character_` WHERE `name` = mobname) > 0 THEN
|
||||
SET Result = 'C';
|
||||
ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN
|
||||
SET Result = 'B';
|
||||
END IF;
|
||||
|
||||
RETURN Result;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
CREATE VIEW `vwBotCharacterMobs` AS
|
||||
SELECT _utf8'C' AS mobtype,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`timelaston`,
|
||||
c.`zoneid`
|
||||
FROM `character_` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mobtype,
|
||||
b.`BotID` AS id,
|
||||
b.`Name` AS name,
|
||||
b.`Class` AS class,
|
||||
b.`BotLevel` AS level,
|
||||
0 AS timelaston,
|
||||
0 AS zoneid
|
||||
FROM bots AS b;
|
||||
|
||||
CREATE VIEW `vwGroups` AS
|
||||
SELECT g.`groupid` AS groupid,
|
||||
GetMobType(g.`name`) AS mobtype,
|
||||
g.`name` AS name,
|
||||
g.`charid` AS mobid,
|
||||
IFNULL(c.`level`, b.`BotLevel`) AS level
|
||||
FROM `group_id` AS g
|
||||
LEFT JOIN `character_` AS c ON g.`name` = c.`name`
|
||||
LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;
|
||||
|
||||
CREATE VIEW `vwBotGroups` AS
|
||||
SELECT g.`BotGroupId`,
|
||||
g.`BotGroupName`,
|
||||
g.`BotGroupLeaderBotId`,
|
||||
b.`Name` AS BotGroupLeaderName,
|
||||
b.`BotOwnerCharacterId`,
|
||||
c.`name` AS BotOwnerCharacterName
|
||||
FROM `botgroup` AS g
|
||||
JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`
|
||||
JOIN `character_` AS c ON b.`BotOwnerCharacterID` = c.`id`
|
||||
ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;
|
||||
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
SELECT 'C' AS mobtype,
|
||||
cm.`char_id`,
|
||||
cm.`guild_id`,
|
||||
cm.`rank`,
|
||||
cm.`tribute_enable`,
|
||||
cm.`total_tribute`,
|
||||
cm.`last_tribute`,
|
||||
cm.`banker`,
|
||||
cm.`public_note`,
|
||||
cm.`alt`
|
||||
FROM `guild_members` AS cm
|
||||
UNION ALL
|
||||
SELECT 'B' AS mobtype,
|
||||
bm.`char_id`,
|
||||
bm.`guild_id`,
|
||||
bm.`rank`,
|
||||
bm.`tribute_enable`,
|
||||
bm.`total_tribute`,
|
||||
bm.`last_tribute`,
|
||||
bm.`banker`,
|
||||
bm.`public_note`,
|
||||
bm.`alt`
|
||||
FROM `botguildmembers` AS bm;
|
||||
@@ -1,74 +0,0 @@
|
||||
-- 'drop_bots' sql script file
|
||||
-- current as of 12/11/2015
|
||||
--
|
||||
-- Note: This file will remove bot schema loaded by 'load_bots' sql scripts.
|
||||
-- There may still be remnants of bot activity in tables `guild_members` and
|
||||
-- `group_id`. If these entries are causing issues, you may need to manually
|
||||
-- remove them.
|
||||
--
|
||||
-- Use eqemu_update.pl to administer this script
|
||||
|
||||
|
||||
DROP VIEW IF EXISTS `vwguildmembers`;
|
||||
DROP VIEW IF EXISTS `vwgroups`;
|
||||
DROP VIEW IF EXISTS `vwbotgroups`;
|
||||
DROP VIEW IF EXISTS `vwbotcharactermobs`;
|
||||
|
||||
DROP VIEW IF EXISTS `vwGuildMembers`;
|
||||
DROP VIEW IF EXISTS `vwGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
|
||||
|
||||
DROP VIEW IF EXISTS `vw_guild_members`;
|
||||
DROP VIEW IF EXISTS `vw_groups`;
|
||||
DROP VIEW IF EXISTS `vw_bot_groups`;
|
||||
DROP VIEW IF EXISTS `vw_bot_character_mobs`;
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByName`;
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByID`;
|
||||
DROP FUNCTION IF EXISTS `GetMobType`;
|
||||
|
||||
DROP TABLE IF EXISTS `botguildmembers`;
|
||||
DROP TABLE IF EXISTS `botgroupmembers`;
|
||||
DROP TABLE IF EXISTS `botgroup`;
|
||||
DROP TABLE IF EXISTS `botpetinventory`;
|
||||
DROP TABLE IF EXISTS `botpetbuffs`;
|
||||
DROP TABLE IF EXISTS `botpets`;
|
||||
DROP TABLE IF EXISTS `botinventory`;
|
||||
DROP TABLE IF EXISTS `botbuffs`;
|
||||
DROP TABLE IF EXISTS `bottimers`;
|
||||
DROP TABLE IF EXISTS `botstances`;
|
||||
DROP TABLE IF EXISTS `bots`;
|
||||
|
||||
DROP TABLE IF EXISTS `botgroups`; -- this table is not a part of 'load_bots.sql'
|
||||
|
||||
DROP TABLE IF EXISTS `botguildmembers_old`;
|
||||
DROP TABLE IF EXISTS `botgroupmembers_old`;
|
||||
DROP TABLE IF EXISTS `botgroup_old`;
|
||||
DROP TABLE IF EXISTS `botpetinventory_old`;
|
||||
DROP TABLE IF EXISTS `botpetbuffs_old`;
|
||||
DROP TABLE IF EXISTS `botpets_old`;
|
||||
DROP TABLE IF EXISTS `botinventory_old`;
|
||||
DROP TABLE IF EXISTS `botbuffs_old`;
|
||||
DROP TABLE IF EXISTS `bottimers_old`;
|
||||
DROP TABLE IF EXISTS `botstances_old`;
|
||||
DROP TABLE IF EXISTS `bots_old`;
|
||||
|
||||
DROP TABLE IF EXISTS `bot_guild_members`;
|
||||
DROP TABLE IF EXISTS `bot_group_members`;
|
||||
DROP TABLE IF EXISTS `bot_groups`;
|
||||
DROP TABLE IF EXISTS `bot_pet_inventories`;
|
||||
DROP TABLE IF EXISTS `bot_pet_buffs`;
|
||||
DROP TABLE IF EXISTS `bot_pets`;
|
||||
DROP TABLE IF EXISTS `bot_inventories`;
|
||||
DROP TABLE IF EXISTS `bot_buffs`;
|
||||
DROP TABLE IF EXISTS `bot_timers`;
|
||||
DROP TABLE IF EXISTS `bot_stances`;
|
||||
DROP TABLE IF EXISTS `bot_inspect_messages`;
|
||||
DROP TABLE IF EXISTS `bot_data`;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `LoadBotsSchema`;
|
||||
DROP PROCEDURE IF EXISTS `DropBotsSchema`;
|
||||
|
||||
|
||||
-- End of File
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES
|
||||
(1, 'Bots:CommandSpellRank', '1', 'Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)'),
|
||||
(1, 'Bots:HealRotationMaxMembers', '24', 'Maximum number of heal rotation members'),
|
||||
(1, 'Bots:HealRotationMaxTargets', '12', 'Maximum number of heal rotation targets'),
|
||||
(1, 'Bots:PreferNoManaCommandSpells', 'true', 'Give sorting priority to newer no-mana spells (i.e., \'Bind Affinity\')');
|
||||
@@ -1,102 +0,0 @@
|
||||
CREATE TABLE `bot_command_settings` (
|
||||
`bot_command` varchar(128) NOT NULL DEFAULT '',
|
||||
`access` int(11) NOT NULL DEFAULT '0',
|
||||
`aliases` varchar(256) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`bot_command`),
|
||||
UNIQUE KEY `UK_bot_command_settings_1` (`bot_command`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('actionable', 0, ''),
|
||||
('aggressive', 0, 'agg'),
|
||||
('attack', 0, 'atk'),
|
||||
('bindaffinity', 0, 'bind'),
|
||||
('bot', 0, 'b'),
|
||||
('botappearance', 0, 'app|appearance'),
|
||||
('botbeardcolor', 0, 'bc|beardcolor'),
|
||||
('botbeardstyle', 0, 'bs|beardstyle'),
|
||||
('botcamp', 0, 'camp'),
|
||||
('botclone', 200, 'clone'),
|
||||
('botcreate', 0, 'create'),
|
||||
('botdelete', 0, 'delete'),
|
||||
('botdetails', 0, 'details'),
|
||||
('botdyearmor', 0, 'dyearmor'),
|
||||
('boteyes', 0, 'eyes'),
|
||||
('botface', 0, 'face'),
|
||||
('botfollowdistance', 0, 'followd'),
|
||||
('botgroup', 0, 'bg'),
|
||||
('botgroupaddmember', 0, 'bgadd'),
|
||||
('botgroupcreate', 0, 'bgcreate'),
|
||||
('botgroupdelete', 0, 'bgdelete'),
|
||||
('botgrouplist', 0, 'bglist'),
|
||||
('botgroupload', 0, 'bgload'),
|
||||
('botgroupremovemember', 0, 'bgremove'),
|
||||
('bothaircolor', 0, 'hc|haircolor'),
|
||||
('bothairstyle', 0, 'hs|hairstyle'),
|
||||
('botheritage', 0, 'her|heritage'),
|
||||
('botinspectmessage', 0, 'inspect'),
|
||||
('botlist', 0, 'list'),
|
||||
('botoutofcombat', 0, 'ooc|outofcombat'),
|
||||
('botreport', 0, 'report|health|mana'),
|
||||
('botspawn', 0, 'spawn'),
|
||||
('botstance', 0, 'stance'),
|
||||
('botsummon', 0, 'summon'),
|
||||
('bottattoo', 0, 'tattoo'),
|
||||
('bottogglearcher', 0, 'archer|togglearcher'),
|
||||
('bottogglehelm', 0, 'helm|togglehelm'),
|
||||
('botupdate', 0, 'update'),
|
||||
('botwoad', 0, 'woad'),
|
||||
('charm', 0, ''),
|
||||
('circle', 0, 'cir'),
|
||||
('cure', 0, ''),
|
||||
('defensive', 0, 'def'),
|
||||
('depart', 0, 'dep'),
|
||||
('escape', 0, 'evac|succor'),
|
||||
('findaliases', 0, 'alias'),
|
||||
('follow', 0, ''),
|
||||
('guard', 0, ''),
|
||||
('healrotation', 0, 'hr'),
|
||||
('healrotationadaptivetargeting', 0, 'hradapt'),
|
||||
('healrotationaddmember', 0, 'hraddm'),
|
||||
('healrotationaddtarget', 0, 'hraddt'),
|
||||
('healrotationadjustcritical', 0, 'hrcrit'),
|
||||
('healrotationadjustsafe', 0, 'hrsafe'),
|
||||
('healrotationcastingoverride', 0, 'hroverride'),
|
||||
('healrotationchangeinterval', 0, 'hrinterval'),
|
||||
('healrotationcleartargets', 0, 'hrclear'),
|
||||
('healrotationcreate', 0, 'hrcreate'),
|
||||
('healrotationfastheals', 0, 'hrfastheals'),
|
||||
('healrotationlist', 0, 'hrlist'),
|
||||
('healrotationremovemember', 0, 'hrremm'),
|
||||
('healrotationremovetarget', 0, 'hrremt'),
|
||||
('healrotationresetlimits', 0, 'hrreset'),
|
||||
('healrotationstart', 0, 'hrstart'),
|
||||
('healrotationstop', 0, 'hrstop'),
|
||||
('help', 0, '?'),
|
||||
('hold', 0, ''),
|
||||
('identify', 0, 'lore'),
|
||||
('inventory', 0, 'inv'),
|
||||
('inventorygive', 0, 'invgive'),
|
||||
('inventorylist', 0, 'invlist'),
|
||||
('inventoryremove', 0, 'invremove'),
|
||||
('invisibility', 0, 'invis'),
|
||||
('levitation', 0, 'lev'),
|
||||
('lull', 0, 'calm|pacify'),
|
||||
('mesmerize', 0, 'mez'),
|
||||
('movementspeed', 0, 'sow'),
|
||||
('pet', 0, 'p'),
|
||||
('petremove', 0, 'prem'),
|
||||
('petsettype', 0, 'pset'),
|
||||
('picklock', 0, 'pl'),
|
||||
('portal', 0, 'port'),
|
||||
('pull', 0, ''),
|
||||
('release', 0, ''),
|
||||
('resistance', 0, 'resist'),
|
||||
('resurrect', 0, 'revive'),
|
||||
('rune', 0, ''),
|
||||
('sendhome', 0, 'gate'),
|
||||
('size', 0, ''),
|
||||
('summoncorpse', 0, 'scorpse'),
|
||||
('taunt', 0, ''),
|
||||
('track', 0, ''),
|
||||
('waterbreathing', 0, 'wb|eb');
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `bot_pets` CHANGE COLUMN `pet_id` `spell_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `pets_index`;
|
||||
@@ -1,3 +0,0 @@
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('healrotationclearhot', 0, 'hrclearhot'),
|
||||
('healrotationsethot', 0, 'hrsethot');
|
||||
@@ -1,41 +0,0 @@
|
||||
CREATE TABLE `bot_heal_rotations` (
|
||||
`heal_rotation_index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`bot_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`interval` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`fast_heals` INT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`adaptive_targeting` INT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`casting_override` INT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_base` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_cloth` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_leather` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_chain` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_plate` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_base` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_cloth` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_leather` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_chain` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_plate` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`heal_rotation_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotations` FOREIGN KEY (`bot_id`) REFERENCES `bot_data` (`bot_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `bot_heal_rotation_members` (
|
||||
`member_index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`heal_rotation_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`bot_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`member_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotation_members_1` FOREIGN KEY (`heal_rotation_index`) REFERENCES `bot_heal_rotations` (`heal_rotation_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotation_members_2` FOREIGN KEY (`bot_id`) REFERENCES `bot_data` (`bot_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `bot_heal_rotation_targets` (
|
||||
`target_index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`heal_rotation_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`target_name` varchar(64) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`target_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotation_targets` FOREIGN KEY (`heal_rotation_index`) REFERENCES `bot_heal_rotations` (`heal_rotation_index`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('healrotationdelete', 0, 'hrdelete'),
|
||||
('healrotationsave', 0, 'hrsave');
|
||||
@@ -1,2 +0,0 @@
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('inventorywindow', 0, 'invwindow');
|
||||
@@ -1,2 +0,0 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES
|
||||
(1, 'Bots:AllowCamelCaseNames', 'false', 'Allows the use of \'MyBot\' type names');
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `bot_inventories` MODIFY COLUMN `inst_charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0';
|
||||
@@ -1,29 +0,0 @@
|
||||
-- Delete any existing `bots_spells_entries` table
|
||||
DROP TABLE IF EXISTS `bots_spells_entries`;
|
||||
|
||||
-- Create new bot spells entries table (new table does not have spells_id_spellid constraint)
|
||||
CREATE TABLE `bot_spells_entries` (
|
||||
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`npc_spells_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`spellid` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`type` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`minlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`maxlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
|
||||
`manacost` SMALLINT(5) NOT NULL DEFAULT '-1',
|
||||
`recast_delay` INT(11) NOT NULL DEFAULT '-1',
|
||||
`priority` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`resist_adjust` INT(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=1
|
||||
;
|
||||
|
||||
-- Copy bots spells into new table
|
||||
INSERT INTO `bot_spells_entries` (`npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`)
|
||||
SELECT `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`
|
||||
FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
|
||||
-- Delete bot spells from old table
|
||||
DELETE FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
@@ -1,153 +0,0 @@
|
||||
DELETE FROM `bot_spells_entries` WHERE `npc_spells_id` = '711';
|
||||
|
||||
INSERT INTO `bot_spells_entries`(`npc_spells_id`,`spellid`,`type`,`minlevel`,`maxlevel`,`manacost`,`recast_delay`,`priority`,`resist_adjust`) VALUES
|
||||
|
||||
-- versioning entry
|
||||
('711', '0', '4294901760', '0', '0', '-1', '-1', '0', NULL), -- 0xFFFF0000
|
||||
|
||||
-- nuke
|
||||
('711', '704', '1', '12', '54', '-1', '-1', '1', NULL),
|
||||
('711', '1747', '1', '55', '127', '-1', '-1', '1', NULL),
|
||||
|
||||
-- escape
|
||||
('711', '1749', '16', '60', '127', '-1', '-1', '1', NULL),
|
||||
|
||||
-- dot
|
||||
('711', '743', '256', '38', '64', '-1', '-1', '1', NULL),
|
||||
('711', '3367', '256', '65', '69', '-1', '-1', '1', NULL),
|
||||
('711', '5385', '256', '70', '79', '-1', '-1', '1', NULL),
|
||||
('711', '14074', '256', '80', '84', '-1', '-1', '1', NULL),
|
||||
('711', '18059', '256', '85', '89', '-1', '-1', '1', NULL),
|
||||
('711', '26084', '256', '90', '94', '-1', '-1', '1', NULL),
|
||||
('711', '29182', '256', '95', '127', '-1', '-1', '1', NULL),
|
||||
('711', '3566', '256', '50', '62', '-1', '-1', '2', NULL),
|
||||
('711', '3370', '256', '63', '67', '-1', '-1', '2', NULL),
|
||||
('711', '5378', '256', '68', '77', '-1', '-1', '2', NULL),
|
||||
('711', '14071', '256', '78', '82', '-1', '-1', '2', NULL),
|
||||
('711', '18056', '256', '83', '87', '-1', '-1', '2', NULL),
|
||||
('711', '26033', '256', '88', '92', '-1', '-1', '2', NULL),
|
||||
('711', '29128', '256', '93', '127', '-1', '-1', '2', NULL),
|
||||
('711', '744', '256', '46', '62', '-1', '-1', '3', NULL),
|
||||
('711', '3373', '256', '63', '66', '-1', '-1', '3', NULL),
|
||||
('711', '5379', '256', '67', '76', '-1', '-1', '3', NULL),
|
||||
('711', '14068', '256', '77', '81', '-1', '-1', '3', NULL),
|
||||
('711', '18053', '256', '82', '86', '-1', '-1', '3', NULL),
|
||||
('711', '26003', '256', '87', '91', '-1', '-1', '3', NULL),
|
||||
('711', '29101', '256', '92', '127', '-1', '-1', '3', NULL),
|
||||
('711', '3567', '256', '42', '60', '-1', '-1', '4', NULL),
|
||||
('711', '3363', '256', '61', '65', '-1', '-1', '4', NULL),
|
||||
('711', '5371', '256', '66', '75', '-1', '-1', '4', NULL),
|
||||
('711', '14065', '256', '76', '80', '-1', '-1', '4', NULL),
|
||||
('711', '18050', '256', '81', '85', '-1', '-1', '4', NULL),
|
||||
('711', '25976', '256', '86', '90', '-1', '-1', '4', NULL),
|
||||
('711', '29077', '256', '91', '127', '-1', '-1', '4', NULL),
|
||||
('711', '707', '256', '30', '59', '-1', '-1', '5', NULL),
|
||||
('711', '4210', '256', '60', '127', '-1', '-1', '5', NULL),
|
||||
|
||||
-- slow
|
||||
('711', '738', '8192', '23', '50', '-1', '-1', '1', NULL),
|
||||
('711', '1751', '8192', '51', '59', '-1', '-1', '1', NULL),
|
||||
('711', '1748', '8192', '60', '63', '-1', '-1', '1', NULL),
|
||||
('711', '3066', '8192', '64', '127', '-1', '-1', '1', NULL),
|
||||
('711', '738', '8192', '51', '63', '-1', '-1', '2', NULL),
|
||||
('711', '1751', '8192', '64', '127', '-1', '-1', '2', NULL),
|
||||
('711', '738', '8192', '64', '127', '-1', '-1', '3', NULL),
|
||||
|
||||
-- cure
|
||||
('711', '3682', '32768', '45', '85', '-1', '-1', '1', NULL),
|
||||
('711', '25958', '32768', '86', '90', '-1', '-1', '1', NULL),
|
||||
('711', '29059', '32768', '91', '127', '-1', '-1', '1', NULL),
|
||||
('711', '3681', '32768', '52', '127', '-1', '-1', '2', NULL),
|
||||
('711', '10448', '32768', '74', '78', '-1', '-1', '3', NULL),
|
||||
('711', '14029', '32768', '79', '83', '-1', '-1', '3', NULL),
|
||||
('711', '18023', '32768', '84', '127', '-1', '-1', '3', NULL),
|
||||
|
||||
-- hate redux
|
||||
('711', '1754', '131072', '53', '127', '-1', '-1', '1', NULL),
|
||||
('711', '10436', '131072', '73', '127', '-1', '-1', '2', NULL),
|
||||
|
||||
-- in-combat buff songs
|
||||
('711', '2606', '262144', '52', '59', '-1', '-1', '1', NULL),
|
||||
('711', '2610', '262144', '60', '127', '-1', '-1', '1', NULL),
|
||||
('711', '700', '262144', '1', '9', '-1', '-1', '2', NULL),
|
||||
('711', '701', '262144', '10', '35', '-1', '-1', '2', NULL),
|
||||
('711', '740', '262144', '36', '41', '-1', '-1', '2', NULL),
|
||||
('711', '702', '262144', '42', '49', '-1', '-1', '2', NULL),
|
||||
('711', '747', '262144', '50', '61', '-1', '-1', '2', NULL),
|
||||
('711', '3374', '262144', '62', '64', '-1', '-1', '2', NULL),
|
||||
('711', '4871', '262144', '65', '67', '-1', '-1', '2', NULL),
|
||||
('711', '5376', '262144', '68', '78', '-1', '-1', '2', NULL),
|
||||
('711', '14080', '262144', '79', '83', '-1', '-1', '2', NULL),
|
||||
('711', '18065', '262144', '84', '88', '-1', '-1', '2', NULL),
|
||||
('711', '26042', '262144', '89', '93', '-1', '-1', '2', NULL),
|
||||
('711', '29143', '262144', '94', '127', '-1', '-1', '2', NULL),
|
||||
('711', '7', '262144', '6', '19', '-1', '-1', '2', NULL),
|
||||
('711', '1287', '262144', '20', '31', '-1', '-1', '3', NULL),
|
||||
('711', '723', '262144', '32', '33', '-1', '-1', '3', NULL),
|
||||
('711', '1448', '262144', '34', '54', '-1', '-1', '3', NULL),
|
||||
('711', '1759', '262144', '55', '61', '-1', '-1', '3', NULL),
|
||||
('711', '3651', '262144', '62', '66', '-1', '-1', '3', NULL),
|
||||
('711', '5377', '262144', '67', '70', '-1', '-1', '3', NULL),
|
||||
('711', '10421', '262144', '71', '75', '-1', '-1', '3', NULL),
|
||||
('711', '14008', '262144', '76', '80', '-1', '-1', '3', NULL),
|
||||
('711', '18008', '262144', '81', '87', '-1', '-1', '3', NULL),
|
||||
('711', '26015', '262144', '88', '92', '-1', '-1', '3', NULL),
|
||||
('711', '29107', '262144', '93', '127', '-1', '-1', '3', NULL),
|
||||
('711', '734', '262144', '7', '8', '-1', '-1', '4', NULL),
|
||||
('711', '710', '262144', '9', '12', '-1', '-1', '4', NULL),
|
||||
('711', '711', '262144', '13', '16', '-1', '-1', '4', NULL),
|
||||
('711', '709', '262144', '17', '40', '-1', '-1', '4', NULL),
|
||||
('711', '714', '262144', '41', '46', '-1', '-1', '4', NULL),
|
||||
('711', '748', '262144', '47', '57', '-1', '-1', '4', NULL),
|
||||
('711', '1763', '262144', '58', '72', '-1', '-1', '4', NULL),
|
||||
('711', '11881', '262144', '73', '77', '-1', '-1', '4', NULL),
|
||||
('711', '14056', '262144', '78', '82', '-1', '-1', '4', NULL),
|
||||
('711', '18041', '262144', '83', '87', '-1', '-1', '4', NULL),
|
||||
('711', '26027', '262144', '88', '92', '-1', '-1', '4', NULL),
|
||||
('711', '29122', '262144', '93', '127', '-1', '-1', '4', NULL),
|
||||
('711', '734', '262144', '9', '24', '-1', '-1', '5', NULL),
|
||||
('711', '712', '262144', '25', '28', '-1', '-1', '5', NULL),
|
||||
('711', '715', '262144', '29', '32', '-1', '-1', '5', NULL),
|
||||
('711', '713', '262144', '33', '36', '-1', '-1', '5', NULL),
|
||||
('711', '716', '262144', '37', '44', '-1', '-1', '5', NULL),
|
||||
('711', '4083', '262144', '45', '52', '-1', '-1', '5', NULL),
|
||||
('711', '4084', '262144', '53', '63', '-1', '-1', '5', NULL),
|
||||
('711', '3362', '262144', '64', '64', '-1', '-1', '5', NULL),
|
||||
('711', '4872', '262144', '65', '68', '-1', '-1', '5', NULL),
|
||||
('711', '5382', '262144', '69', '75', '-1', '-1', '5', NULL),
|
||||
('711', '14062', '262144', '76', '80', '-1', '-1', '5', NULL),
|
||||
('711', '18047', '262144', '81', '85', '-1', '-1', '5', NULL),
|
||||
('711', '25961', '262144', '86', '90', '-1', '-1', '5', NULL),
|
||||
('711', '29062', '262144', '91', '127', '-1', '-1', '5', NULL),
|
||||
('711', '734', '262144', '25', '43', '-1', '-1', '6', NULL),
|
||||
('711', '4085', '262144', '44', '51', '-1', '-1', '6', NULL),
|
||||
('711', '4086', '262144', '52', '62', '-1', '-1', '6', NULL),
|
||||
('711', '4087', '262144', '63', '68', '-1', '-1', '6', NULL),
|
||||
('711', '5374', '262144', '69', '71', '-1', '-1', '6', NULL),
|
||||
('711', '10439', '262144', '72', '76', '-1', '-1', '6', NULL),
|
||||
('711', '14020', '262144', '77', '81', '-1', '-1', '6', NULL),
|
||||
('711', '18014', '262144', '82', '86', '-1', '-1', '6', NULL),
|
||||
('711', '25991', '262144', '87', '127', '-1', '-1', '6', NULL),
|
||||
('711', '734', '262144', '30', '82', '-1', '-1', '7', NULL),
|
||||
('711', '18020', '262144', '83', '127', '-1', '-1', '7', NULL),
|
||||
('711', '734', '262144', '83', '127', '-1', '-1', '8', NULL),
|
||||
('711', '2603', '262144', '30', '127', '-1', '-1', '9', NULL),
|
||||
|
||||
-- out-of-combat buff songs
|
||||
('711', '7', '524288', '6', '19', '-1', '-1', '1', NULL),
|
||||
('711', '1287', '524288', '20', '31', '-1', '-1', '1', NULL),
|
||||
('711', '723', '524288', '32', '33', '-1', '-1', '1', NULL),
|
||||
('711', '1448', '524288', '34', '54', '-1', '-1', '1', NULL),
|
||||
('711', '1759', '524288', '55', '61', '-1', '-1', '1', NULL),
|
||||
('711', '3651', '524288', '62', '66', '-1', '-1', '1', NULL),
|
||||
('711', '5377', '524288', '67', '70', '-1', '-1', '1', NULL),
|
||||
('711', '10421', '524288', '71', '75', '-1', '-1', '1', NULL),
|
||||
('711', '14008', '524288', '76', '80', '-1', '-1', '1', NULL),
|
||||
('711', '18008', '524288', '81', '87', '-1', '-1', '1', NULL),
|
||||
('711', '26015', '524288', '88', '92', '-1', '-1', '1', NULL),
|
||||
('711', '29107', '524288', '93', '127', '-1', '-1', '1', NULL),
|
||||
('711', '717', '524288', '5', '29', '-1', '-1','2', NULL),
|
||||
('711', '2603', '524288', '30', '127', '-1', '-1','2', NULL),
|
||||
('711', '717', '524288', '30', '48', '-1', '-1','3', NULL),
|
||||
('711', '2605', '524288', '49', '127', '-1', '-1','3', NULL),
|
||||
('711', '2602', '524288', '15', '127', '-1', '-1','4', NULL);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
-- Re-ordered entries according to actual class values and added melee types (for future expansion)
|
||||
DELETE FROM `npc_spells` WHERE `id` >= '701' AND `id` <= '712';
|
||||
|
||||
INSERT INTO `npc_spells` VALUES (3001, 'Warrior Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3002, 'Cleric Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3003, 'Paladin Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3004, 'Ranger Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3005, 'Shadowknight Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3006, 'Druid Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3007, 'Monk Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3008, 'Bard Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3009, 'Rogue Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3010, 'Shaman Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3011, 'Necromancer Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3012, 'Wizard Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3013, 'Magician Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3014, 'Enchanter Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3015, 'Beastlord Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3016, 'Berserker Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
File diff suppressed because it is too large
Load Diff
-13
@@ -1,13 +0,0 @@
|
||||
-- Update npc_spells_id to new values
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3002' WHERE `npc_spells_id` = '701';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3012' WHERE `npc_spells_id` = '702';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3011' WHERE `npc_spells_id` = '703';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3013' WHERE `npc_spells_id` = '704';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3014' WHERE `npc_spells_id` = '705';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3010' WHERE `npc_spells_id` = '706';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3006' WHERE `npc_spells_id` = '707';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3003' WHERE `npc_spells_id` = '708';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3005' WHERE `npc_spells_id` = '709';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3004' WHERE `npc_spells_id` = '710';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3008' WHERE `npc_spells_id` = '711';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3015' WHERE `npc_spells_id` = '712';
|
||||
@@ -1,17 +0,0 @@
|
||||
-- Update spells_id to new values
|
||||
UPDATE `bot_data` SET `spells_id` = '3001' WHERE `class` = '1';
|
||||
UPDATE `bot_data` SET `spells_id` = '3002' WHERE `class` = '2';
|
||||
UPDATE `bot_data` SET `spells_id` = '3003' WHERE `class` = '3';
|
||||
UPDATE `bot_data` SET `spells_id` = '3004' WHERE `class` = '4';
|
||||
UPDATE `bot_data` SET `spells_id` = '3005' WHERE `class` = '5';
|
||||
UPDATE `bot_data` SET `spells_id` = '3006' WHERE `class` = '6';
|
||||
UPDATE `bot_data` SET `spells_id` = '3007' WHERE `class` = '7';
|
||||
UPDATE `bot_data` SET `spells_id` = '3008' WHERE `class` = '8';
|
||||
UPDATE `bot_data` SET `spells_id` = '3009' WHERE `class` = '9';
|
||||
UPDATE `bot_data` SET `spells_id` = '3010' WHERE `class` = '10';
|
||||
UPDATE `bot_data` SET `spells_id` = '3011' WHERE `class` = '11';
|
||||
UPDATE `bot_data` SET `spells_id` = '3012' WHERE `class` = '12';
|
||||
UPDATE `bot_data` SET `spells_id` = '3013' WHERE `class` = '13';
|
||||
UPDATE `bot_data` SET `spells_id` = '3014' WHERE `class` = '14';
|
||||
UPDATE `bot_data` SET `spells_id` = '3015' WHERE `class` = '15';
|
||||
UPDATE `bot_data` SET `spells_id` = '3016' WHERE `class` = '16';
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
-- Fix spells_id for existing Shadowknight entries
|
||||
UPDATE `bot_data` SET `spells_id` = '3005' WHERE `class` = '5';
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE `bot_spells_entries` ADD `min_hp` SMALLINT(5) DEFAULT '0';
|
||||
ALTER TABLE `bot_spells_entries` ADD `max_hp` SMALLINT(5) DEFAULT '0';
|
||||
@@ -1,8 +0,0 @@
|
||||
ALTER TABLE `bot_data` ADD COLUMN `stop_melee_level` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255' AFTER `follow_distance`;
|
||||
|
||||
INSERT INTO `bot_command_settings`(`bot_command`, `access`, `aliases`) VALUES ('botstopmeleelevel', '0', 'sml');
|
||||
|
||||
SELECT @csml_raw := (SELECT `rule_value` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CasterStopMeleeLevel' LIMIT 1);
|
||||
SELECT @csml_value := IF((SELECT @csml_raw REGEXP '^[0-9]+$') = '1', @csml_raw, '13');
|
||||
|
||||
UPDATE `bot_data` SET `stop_melee_level` = @csml_value WHERE `class` IN ('2', '6', '10', '11', '12', '13', '14');
|
||||
@@ -1,5 +0,0 @@
|
||||
-- update `bot_inventories` slots
|
||||
UPDATE `bot_inventories` SET `slot_id` = 22 WHERE `slot_id` = 21; -- adjust ammo slot
|
||||
UPDATE `bot_inventories` SET `slot_id` = 21 WHERE `slot_id` = 9999; -- adjust powersource slot
|
||||
|
||||
UPDATE `inventory_versions` SET `bot_step` = 1 WHERE `version` = 2;
|
||||
@@ -1,11 +0,0 @@
|
||||
DROP TABLE IF EXISTS `bot_owner_options`;
|
||||
|
||||
CREATE TABLE `bot_owner_options` (
|
||||
`owner_id` INT(11) UNSIGNED NOT NULL,
|
||||
`death_marquee` SMALLINT(3) UNSIGNED NULL DEFAULT '0',
|
||||
PRIMARY KEY (`owner_id`)
|
||||
)
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=MyISAM;
|
||||
|
||||
INSERT INTO `bot_command_settings`(`bot_command`, `access`, `aliases`) VALUES ('owneroption', '0', 'oo');
|
||||
@@ -1,11 +0,0 @@
|
||||
-- Update `bot_stances`.`stance_id` to new values
|
||||
UPDATE `bot_stances` SET `stance_id` = '9' WHERE `stance_id` = '6';
|
||||
UPDATE `bot_stances` SET `stance_id` = '7' WHERE `stance_id` = '5';
|
||||
UPDATE `bot_stances` SET `stance_id` = (`stance_id` + 1) WHERE `stance_id` in (0,1,2,3,4);
|
||||
|
||||
-- Update `bot_spell_casting_chances`.`stance_index` to new values
|
||||
UPDATE `bot_spell_casting_chances` SET `stance_index` = '8' WHERE `stance_index` = '6';
|
||||
UPDATE `bot_spell_casting_chances` SET `stance_index` = '6' WHERE `stance_index` = '5';
|
||||
|
||||
-- Update `bot_spell_casting_chances` implicit versioning
|
||||
UPDATE `bot_spell_casting_chances` SET `stance_index` = '1' WHERE `spell_type_index` = '255' AND `class_id` = '255';
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `bot_owner_options` ADD COLUMN `stats_update` SMALLINT(3) UNSIGNED NULL DEFAULT '0' AFTER `death_marquee`;
|
||||
@@ -1 +0,0 @@
|
||||
INSERT INTO `bot_command_settings`(`bot_command`, `access`, `aliases`) VALUES ('petgetlost', '0', 'pgl');
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE `bot_owner_options` ADD COLUMN `spawn_message_enabled` SMALLINT(3) UNSIGNED NULL DEFAULT '1' AFTER `stats_update`;
|
||||
ALTER TABLE `bot_owner_options` ADD COLUMN `spawn_message_type` SMALLINT(3) UNSIGNED NULL DEFAULT '1' AFTER `spawn_message_enabled`;
|
||||
@@ -1,10 +0,0 @@
|
||||
DROP TABLE IF EXISTS `bot_owner_options`;
|
||||
|
||||
CREATE TABLE `bot_owner_options` (
|
||||
`owner_id` INT(11) UNSIGNED NOT NULL,
|
||||
`option_type` SMALLINT(3) UNSIGNED NOT NULL,
|
||||
`option_value` SMALLINT(3) UNSIGNED NULL DEFAULT '0',
|
||||
PRIMARY KEY (`owner_id`, `option_type`)
|
||||
)
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB;
|
||||
@@ -1,24 +0,0 @@
|
||||
DROP VIEW IF EXISTS `vw_bot_character_mobs`;
|
||||
|
||||
-- Views
|
||||
CREATE VIEW `vw_bot_character_mobs` AS
|
||||
SELECT
|
||||
_utf8'C' AS mob_type,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`last_login`,
|
||||
c.`zone_id`,
|
||||
c.`deleted_at`
|
||||
FROM `character_data` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mob_type,
|
||||
b.`bot_id` AS id,
|
||||
b.`name`,
|
||||
b.`class`,
|
||||
b.`level`,
|
||||
b.`last_spawn` AS last_login,
|
||||
b.`zone_id`,
|
||||
NULL AS `deleted_at`
|
||||
FROM `bot_data` AS b;
|
||||
@@ -1,34 +0,0 @@
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for bot_create_combinations
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `bot_create_combinations`;
|
||||
CREATE TABLE `bot_create_combinations` (
|
||||
`race` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`classes` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`race`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of bot_create_combinations
|
||||
-- ----------------------------
|
||||
INSERT INTO `bot_create_combinations` VALUES (1, 15871); -- Human
|
||||
INSERT INTO `bot_create_combinations` VALUES (2, 49921); -- Barbarian
|
||||
INSERT INTO `bot_create_combinations` VALUES (3, 15382); -- Erudite
|
||||
INSERT INTO `bot_create_combinations` VALUES (4, 425); -- Wood Elf
|
||||
INSERT INTO `bot_create_combinations` VALUES (5, 14342); -- High Elf
|
||||
INSERT INTO `bot_create_combinations` VALUES (6, 15635); -- Dark Elf
|
||||
INSERT INTO `bot_create_combinations` VALUES (7, 429); -- Half Elf
|
||||
INSERT INTO `bot_create_combinations` VALUES (8, 33031); -- Dwarf
|
||||
INSERT INTO `bot_create_combinations` VALUES (9, 49681); -- Troll
|
||||
INSERT INTO `bot_create_combinations` VALUES (10, 49681); -- Ogre
|
||||
INSERT INTO `bot_create_combinations` VALUES (11, 303); -- Halfling
|
||||
INSERT INTO `bot_create_combinations` VALUES (12, 15639); -- Gnome
|
||||
INSERT INTO `bot_create_combinations` VALUES (128, 18001); -- Iksar
|
||||
INSERT INTO `bot_create_combinations` VALUES (130, 50049); -- Vah Shir
|
||||
INSERT INTO `bot_create_combinations` VALUES (330, 3863); -- Froglok
|
||||
INSERT INTO `bot_create_combinations` VALUES (522, 15871); -- Drakkin
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `bot_groups` ADD COLUMN `auto_spawn` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 AFTER `group_name`;
|
||||
@@ -1,4 +0,0 @@
|
||||
ALTER TABLE `bot_spells_entries`
|
||||
ADD COLUMN `bucket_name` varchar(100) NOT NULL DEFAULT '' AFTER `max_hp`,
|
||||
ADD COLUMN `bucket_value` varchar(100) NOT NULL DEFAULT '' AFTER `bucket_name`,
|
||||
ADD COLUMN `bucket_comparison` tinyint UNSIGNED NULL DEFAULT 0 AFTER `bucket_value`;
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE `bot_data`
|
||||
ADD COLUMN `expansion_bitmask` int(11) NOT NULL DEFAULT -1 AFTER `stop_melee_level`;
|
||||
@@ -1,10 +0,0 @@
|
||||
UPDATE bot_spells_entries SET bucket_comparison = 0 WHERE bucket_comparison IS NULL;
|
||||
UPDATE bot_spells_entries SET min_hp = 0 WHERE min_hp IS NULL;
|
||||
UPDATE bot_spells_entries SET max_hp = 0 WHERE max_hp IS NULL;
|
||||
UPDATE bot_spells_entries SET resist_adjust = 0 WHERE resist_adjust IS NULL;
|
||||
|
||||
ALTER TABLE `bot_spells_entries`
|
||||
MODIFY COLUMN `resist_adjust` int(11) NOT NULL DEFAULT 0 AFTER `priority`,
|
||||
MODIFY COLUMN `min_hp` smallint(5) NOT NULL DEFAULT 0 AFTER `resist_adjust`,
|
||||
MODIFY COLUMN `max_hp` smallint(5) NOT NULL DEFAULT 0 AFTER `min_hp`,
|
||||
MODIFY COLUMN `bucket_comparison` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 AFTER `bucket_value`;
|
||||
@@ -1,12 +0,0 @@
|
||||
CREATE TABLE `bot_spell_settings` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`bot_id` int(11) NOT NULL DEFAULT 0,
|
||||
`spell_id` smallint(5) NOT NULL DEFAULT 0,
|
||||
`priority` smallint(5) NOT NULL DEFAULT 0,
|
||||
`min_level` smallint(5) unsigned NOT NULL DEFAULT 0,
|
||||
`max_level` smallint(5) unsigned NOT NULL DEFAULT 255,
|
||||
`min_hp` smallint(5) NOT NULL DEFAULT 0,
|
||||
`max_hp` smallint(5) NOT NULL DEFAULT 0,
|
||||
`is_enabled` tinyint(1) unsigned NOT NULL DEFAULT 1,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
@@ -1,5 +0,0 @@
|
||||
ALTER TABLE `bot_data`
|
||||
ADD COLUMN `enforce_spell_settings` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' AFTER `expansion_bitmask`;
|
||||
|
||||
ALTER TABLE `bot_spell_settings` DROP `min_level`;
|
||||
ALTER TABLE `bot_spell_settings` DROP `max_level`;
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE `bot_data`
|
||||
ADD COLUMN `archery_setting` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' AFTER `enforce_spell_settings`;
|
||||
@@ -1,6 +0,0 @@
|
||||
DROP VIEW vw_bot_groups;
|
||||
DROP VIEW vw_bot_character_mobs;
|
||||
DROP VIEW vw_groups;
|
||||
DROP VIEW vw_guild_members;
|
||||
|
||||
DROP TABLE bot_guild_members;
|
||||
@@ -1 +0,0 @@
|
||||
create index `name` on bot_data(`name`);
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE `bot_data`
|
||||
ADD COLUMN `caster_range` INT(11) UNSIGNED NOT NULL DEFAULT '300' AFTER `archery_setting`;
|
||||
@@ -1,4 +0,0 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
DROP TABLE IF EXISTS `bot_groups`;
|
||||
DROP TABLE IF EXISTS `bot_group_members`;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user