Merge and fix the loot update branch, ready for merge I think

This commit is contained in:
KimLS
2015-02-04 23:13:02 -08:00
738 changed files with 82418 additions and 58480 deletions
@@ -0,0 +1,74 @@
-- 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;
@@ -0,0 +1,280 @@
-- '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;
+35 -15
View File
@@ -1,21 +1,41 @@
DROP TABLE IF EXISTS `botbuffs`;
-- 'drop_bots' sql script file
-- current as of 10/15/2014
--
-- Note: This file will revert all changes made by either 'load_bots' sql file.
-- 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.
--
-- If this script fails due to a 'SQL Error (1068): Multiple primary key defined'
-- error, run this query: ALTER TABLE `guild_members` DROP PRIMARY KEY;
-- and it should remove the key so this script will process in its entirety.
ALTER TABLE `guild_members` ADD PRIMARY KEY (`char_id`);
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY (`groupid`, `charid`, `ismerc`);
UPDATE `spawn2` SET `enabled` = 0 WHERE `id` IN (59297,59298);
DELETE FROM `commands` WHERE `command` = 'bot';
DELETE FROM `rule_values` WHERE `rule_name` LIKE 'Bots%';
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
DROP VIEW IF EXISTS `vwBotGroups`;
DROP VIEW IF EXISTS `vwGroups`;
DROP VIEW IF EXISTS `vwGuildMembers`;
DROP FUNCTION IF EXISTS `GetMobType`;
DROP TABLE IF EXISTS `botguildmembers`;
DROP TABLE IF EXISTS `botgroupmembers`;
-- this table is not a part of 'load_bots.sql'
DROP TABLE IF EXISTS `botgroups`;
DROP TABLE IF EXISTS `botgroup`;
DROP TABLE IF EXISTS `botpetinventory`;
DROP TABLE IF EXISTS `botpetbuffs`;
DROP TABLE IF EXISTS `botpets`;
DROP TABLE IF EXISTS `botgroupmembers`;
DROP TABLE IF EXISTS `botgroup`;
DROP TABLE IF EXISTS `botgroups`;
DROP TABLE IF EXISTS `botinventory`;
DROP TABLE IF EXISTS `botguildmembers`;
DROP TABLE IF EXISTS `botstances`;
DROP TABLE IF EXISTS `botbuffs`;
DROP TABLE IF EXISTS `bottimers`;
DROP TABLE IF EXISTS `botstances`;
DROP TABLE IF EXISTS `bots`;
DROP VIEW IF EXISTS `vwGuildMembers`;
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
DROP VIEW IF EXISTS `vwBotGroups`;
delete from rule_values where rule_name like 'Bots%' and ruleset_id = 1;
delete from commands where command = 'bot';
update spawn2 set enabled = 0 where id in (59297,59298);
+252 -279
View File
@@ -1,307 +1,280 @@
-- This is pretty much a straight copy of the original files with fixes applied.
-- HeidiSQL does not like sub-directory references, so this should now run from there.
-- The 'headers' are left in place for reference only.
-- '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.
-- FILE:
-- source player_tables/botguildmembers.sql;
CREATE TABLE IF NOT EXISTS `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;
-- FILE:
-- source player_tables/bots.sql;
update spawn2 set enabled = 1 where id in (59297,59298);
ALTER TABLE `guild_members` DROP PRIMARY KEY;
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`, `ismerc`);
INSERT INTO rule_values VALUES ('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.');
INSERT INTO rule_values VALUES ('1', 'Bots:BotFinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.');
INSERT INTO rule_values VALUES ('1', 'Bots:CreateBotCount', '150', 'Number of bots that each account can create');
INSERT INTO rule_values VALUES ('1', 'Bots:SpawnBotCount', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');
INSERT INTO rule_values VALUES ('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');
INSERT INTO rule_values VALUES ('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.');
INSERT INTO rule_values VALUES ('1', 'Bots:BotSpellQuest', 'false', 'Anita Thrall\'s (Anita_Thrall.pl) Bot Spell Scriber quests.');
UPDATE `spawn2` SET `enabled` = 1 WHERE `id` IN (59297,59298);
-- this is a hack fix to maintain the original file process
delete from rule_values where rule_name like 'Bots%' and ruleset_id = 1;
INSERT INTO rule_values VALUES ('1', 'Bots:BotAAExpansion', '8', 'The expansion through which bots will obtain AAs');
-- field count has changed
-- 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');
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`)
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;
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`);
ALTER TABLE `guild_members` DROP PRIMARY KEY;
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`)
);
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;
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`)
);
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
CREATE VIEW `vwBotCharacterMobs` AS
select 'C' as mobtype,
c.id,
c.name,
c.class,
c.level,
c.timelaston,
c.zoneid
from character_ as c
union all
select '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;
-- FILE:
-- source player_tables/botpetstatepersists.sql;
DROP TABLE IF EXISTS `botpetinventory`;
DROP TABLE IF EXISTS `botpetbuffs`;
DROP TABLE IF EXISTS `botpets`;
CREATE TABLE IF NOT EXISTS `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`)
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 IF NOT EXISTS `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 IF NOT EXISTS `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;
-- FILE:
-- source player_tables/botinventory.sql;
CREATE TABLE IF NOT EXISTS 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)
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;
-- FILE:
-- source player_tables/botbuffs.sql;
DROP TABLE IF EXISTS `botbuffs`;
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`)
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;
-- FILE:
-- source player_tables/botadventuring.sql;
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 $$
DROP FUNCTION IF EXISTS `GetMobType` $$
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 $$
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 ;
DROP VIEW IF EXISTS `vwGroups`;
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_ as c on g.name = c.name
left join bots as b on g.name = b.Name;
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`;
-- FILE:
-- source player_tables/botgroups.sql;
DROP TABLE IF EXISTS `botgroupmembers`;
DROP TABLE IF EXISTS `botgroup`;
CREATE TABLE IF NOT EXISTS `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 IF NOT EXISTS `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;
DROP VIEW IF EXISTS `vwBotGroups`;
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;
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`;
-- FILE:
-- source player_tables/botstances.sql;
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)
);
-- FILE:
-- source player_tables/bottimers.sql;
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 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;
@@ -0,0 +1,13 @@
-- Fix Salvage
UPDATE `aa_effects` SET `effectid` = '331' WHERE `aaid` IN (997, 998, 999);
-- Rapid Strikes missing entries
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('818', '1', '279', '17', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('819', '1', '279', '19', '0');
-- Secondary Forte fixes client side display issues
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('691', '1', '248', '100', '0');
-- Packrat this is what live uses
UPDATE `aa_effects` SET `base1` = '3' WHERE `aaid` = 678;
UPDATE `aa_effects` SET `base1` = '6' WHERE `aaid` = 679;
UPDATE `aa_effects` SET `base1` = '9' WHERE `aaid` = 680;
UPDATE `aa_effects` SET `base1` = '12' WHERE `aaid` = 681;
UPDATE `aa_effects` SET `base1` = '15' WHERE `aaid` = 682;
@@ -0,0 +1,2 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Zone:EnableLoggedOffReplenishments', 'true', 'Replenish mana/hp/end if logged off for MinOfflineTimeToReplenishments');
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Zone:MinOfflineTimeToReplenishments', '21600', 'Minimum logged off time to trigger replenish mana/hp/end');
@@ -0,0 +1,4 @@
INSERT INTO altadv_vars SET skill_id="4698", name="Quick Draw", cost="5", max_level="1", hotkey_sid="4294967295", hotkey_sid2="4294967295", title_sid="4698", desc_sid="4698", type="1", spellid="4294967295", prereq_skill="0", prereq_minpoints="0", spell_type="0", spell_refresh="0", class_type="51", cost_inc="0", aa_expansion="12", special_category="4294967295", sof_type="1", sof_cost_inc="0", sof_max_level="2", sof_next_skill="4698", clientver="4", account_time_required="0", sof_current_level="0", sof_next_id="6545", level_inc="0", classes="65534", berserker="1";
INSERT INTO aa_effects SET aaid=4698, slot=1, effectid=362, base1=1, base2=0;
INSERT INTO altadv_vars SET skill_id="6545", name="Quick Draw II", cost="5", max_level="1", hotkey_sid="4294967295", hotkey_sid2="4294967295", title_sid="4698", desc_sid="4698", type="1", spellid="4294967295", prereq_skill="4698", prereq_minpoints="1", spell_type="0", spell_refresh="0", class_type="56", cost_inc="0", aa_expansion="14", special_category="4294967295", sof_type="1", sof_cost_inc="0", sof_max_level="2", sof_next_skill="4698", clientver="5", account_time_required="0", sof_current_level="1", sof_next_id="0", level_inc="0", classes="65534", berserker="1";
INSERT INTO aa_effects SET aaid=6545, slot=1, effectid=362, base1=1, base2=0;
@@ -0,0 +1 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Client:UseLiveFactionMessage', 'false', 'Allow players to see faction adjustments like Live.');
@@ -0,0 +1 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:SwarmPetTargetLock', 'false', 'Use old method of swarm pet AI, where they lock onto a set target then depop when target is dead.');
@@ -0,0 +1 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'NPC:EnableMeritBasedFaction', 'false', 'If set to true, faction will be given in the same way as experience (solo/group/raid).');
@@ -0,0 +1,3 @@
/* Optional Transformation Rules */
INSERT INTO `rule_values` VALUES (1, 'Inventory:DeleteTransformationMold', 'true', 'false to keep transformation mold forever');
INSERT INTO `rule_values` VALUES (1, 'Inventory:AllowAnyWeaponTransformation', 'false', 'True allows any MELEE weapon to use the other melee type transformatios');
@@ -0,0 +1 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Combat:ProjectileDmgOnImpact', 'true', 'If enabled, projectiles (ie arrows) will hit on impact, instead of instantly.');
@@ -0,0 +1,2 @@
INSERT INTO `commands` (`command`, `access`) VALUES ('heromodel', 80);
INSERT INTO `commands` (`command`, `access`) VALUES ('hm', 80);
@@ -0,0 +1,2 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:NPC_UseFocusFromSpells', 'true', 'Allow npcs to use most spell buff derived focus effects.');
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:NPC_UseFocusFromItems', 'false', 'Allow npcs to use most item derived focus effects.');
@@ -0,0 +1,5 @@
-- 'greater lightstone' light level on 'wisp' race
UPDATE `npc_types` SET `light` = 11 WHERE `race` = 69;
-- 'fire beetle eye' light level on 'beetle' race with name criteria
UPDATE `npc_types` SET `light` = 12 WHERE `race` = 22 AND (`name` LIKE '%fire%' OR `name` LIKE '%lava%');
@@ -0,0 +1,30 @@
DELIMITER $$
CREATE PROCEDURE `MyFaction`(charname text)
BEGIN
declare class_mod text default "";
declare race_mod text default "";
declare deity_mod text default "";
select class into class_mod from character_data where name = charname;
select race into race_mod from character_data where name = charname;
select deity into deity_mod from character_data where name = charname;
select concat("c", class_mod) into class_mod;
select concat("r", race_mod) into race_mod;
select concat("d", deity_mod) into deity_mod;
set @class_bump := 0;
set @race_bump := 0;
set @deity_bump := 0;
SELECT race_mod as R, class_mod as C, deity_mod as D, f.name as faction, f.id, v.current_value, f.base as "START",
@class_bump := IFNULL((select m.mod from faction_list_mod m where faction_id = f.id && class_mod != "" && mod_name = class_mod),0) as class_bump,
@race_bump := IFNULL((select m.mod from faction_list_mod m where faction_id = f.id && race_mod != "" && mod_name = race_mod),0) as race_bump,
@deity_bump := IFNULL((select m.mod from faction_list_mod m where faction_id = f.id && race_mod != "" && mod_name = deity_mod),0) as deity_bump,
v.current_value + f.base + @class_bump + @race_bump + @deity_bump as TOTAL
FROM faction_values v
inner join faction_list f on f.id = v.faction_id
where v.char_id = (select id from character_data where name=charname) ;
END $$
DELIMITER ;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,50 @@
-- Updates live pets who should be type (5) - Pet locks onto target until dead.
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword99Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword99Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword99Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword94Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword94Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword94Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword89Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword89Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "WizSwarmSword89Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_84_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_84_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_84_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_79_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_79_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_79_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_74_";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_67_";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SumSword";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SUMHammer4";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SUMHammer3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SUMHammer2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SUMHammer1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SumHammer";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "Burnout";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SumSword";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "SumHammer";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_67_";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_73_";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_73_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_73_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_73_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_78_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_78_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_78_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_83_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_83_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_83_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_84_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_84_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "wizard_sword_84_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_88_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_88_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_88_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_94_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_94_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_94_Rk3";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_99_Rk1";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_99_Rk2";
UPDATE pets SET petcontrol = 5 WHERE type LIKE "cleric_hammer_99_Rk3";
@@ -1,4 +1,5 @@
ALTER TABLE `npc_types` ADD COLUMN `special_abilities` TEXT NOT NULL DEFAULT '' AFTER `npcspecialattks`;
ALTER TABLE `npc_types` ADD COLUMN `special_abilities` TEXT NULL AFTER `npcspecialattks`;
ALTER TABLE `npc_types` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL;
UPDATE npc_types SET special_abilities = CONCAT(special_abilities, "1,1^") WHERE npcspecialattks LIKE BINARY '%S%';
UPDATE npc_types SET special_abilities = CONCAT(special_abilities, "2,1^") WHERE npcspecialattks LIKE BINARY '%E%';
@@ -1,5 +1,6 @@
ALTER TABLE `merc_stats` ADD COLUMN `special_abilities` TEXT NOT NULL DEFAULT '' AFTER `specialattks`;
ALTER TABLE `merc_stats` ADD COLUMN `special_abilities` TEXT NULL AFTER `specialattks`;
ALTER TABLE `merc_stats` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL;
UPDATE merc_stats SET special_abilities = CONCAT(special_abilities, "1,1^") WHERE specialattks LIKE BINARY '%S%';
UPDATE merc_stats SET special_abilities = CONCAT(special_abilities, "2,1^") WHERE specialattks LIKE BINARY '%E%';
UPDATE merc_stats SET special_abilities = CONCAT(special_abilities, "3,1^") WHERE specialattks LIKE BINARY '%R%';
@@ -1,34 +0,0 @@
-- AA MGB update
UPDATE altadv_vars SET spellid = 5228 WHERE skill_id = 128;
UPDATE aa_actions SET spell_id = 5228, nonspell_action = 0 WHERE aaid = 128;
-- AA Project Illusion update
UPDATE altadv_vars SET spellid = 5227 WHERE skill_id = 643;
UPDATE aa_actions SET spell_id = 5227, nonspell_action = 0 WHERE aaid = 643;
-- AA Improved Reclaim Energy
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('180', '1', '241', '95', '0');
-- AA Headshot
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('644', '1', '217', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('644', '2', '346', '46', '0');
-- AA Anatomy (Rogue Assassinate)
INSERT INTO `altadv_vars` (`skill_id`, `name`, `cost`, `max_level`, `hotkey_sid`, `hotkey_sid2`, `title_sid`, `desc_sid`, `type`, `spellid`, `prereq_skill`, `prereq_minpoints`, `spell_type`, `spell_refresh`, `classes`, `berserker`, `class_type`, `cost_inc`, `aa_expansion`, `special_category`, `sof_type`, `sof_cost_inc`, `sof_max_level`, `sof_next_skill`, `clientver`, `account_time_required`, `sof_current_level`,`sof_next_id`,`level_inc`) VALUES ('1604', 'Anatomy', '5', '3', '4294967295', '4294967295', '1604', '1604', '1', '4294967295', '0', '0', '0', '0', '512', '0', '60', '1', '10', '4294967295', '3', '0', '3', '1604', '1', '0', '0', '0', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1604', '1', '439', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1604', '2', '345', '48', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1605', '1', '439', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1605', '2', '345', '51', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1606', '1', '439', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1606', '2', '345', '53', '0');
-- AA Finishing Blow Fix
DELETE FROM aa_effects WHERE aaid = 199 AND slot = 2;
DELETE FROM aa_effects WHERE aaid = 200 AND slot = 2;
DELETE FROM aa_effects WHERE aaid = 201 AND slot = 2;
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('119', '1', '278', '500', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('119', '2', '440', '50', '200');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('120', '1', '278', '500', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('120', '2', '440', '52', '200');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('121', '1', '278', '500', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('121', '2', '440', '54', '200');
@@ -1 +1 @@
ALTER TABLE `account` ADD COLUMN `ban_reason` TEXT NULL DEFAULT NULL AFTER `expansion`, ADD COLUMN `suspend_reason` TEXT NULL DEFAULT NULL AFTER `ban_reason`;
ALTER TABLE `account` ADD COLUMN `ban_reason` TEXT NULL DEFAULT NULL, ADD COLUMN `suspend_reason` TEXT NULL DEFAULT NULL AFTER `ban_reason`;
@@ -0,0 +1 @@
ALTER TABLE `raid_details` ADD `motd` varchar(1024);
@@ -0,0 +1,9 @@
CREATE TABLE `raid_leaders` (
`gid` int(4) unsigned NOT NULL,
`rid` int(4) unsigned NOT NULL,
`marknpc` varchar(64) NOT NULL,
`maintank` varchar(64) NOT NULL,
`assist` varchar(64) NOT NULL,
`puller` varchar(64) NOT NULL,
`leadershipaa` tinyblob NOT NULL
);
@@ -0,0 +1,2 @@
ALTER TABLE `group_leaders` ADD `mentoree` VARCHAR(64) NOT NULL;
ALTER TABLE `group_leaders` ADD `mentor_percent` INT(4) DEFAULT 0 NOT NULL;
@@ -0,0 +1,2 @@
ALTER TABLE `raid_leaders` ADD `mentoree` VARCHAR(64) NOT NULL;
ALTER TABLE `raid_leaders` ADD `mentor_percent` INT(4) DEFAULT 0 NOT NULL;
@@ -0,0 +1,4 @@
ALTER TABLE `merc_stats` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL;
ALTER TABLE `npc_types` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL;
@@ -0,0 +1 @@
ALTER TABLE `raid_members` CHANGE COLUMN `groupid` `groupid` INT(4) UNSIGNED NOT NULL DEFAULT '0' AFTER `charid`;
@@ -0,0 +1,9 @@
-- spells new table update
ALTER TABLE `spells_new` CHANGE `field124` `disallow_sit` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field125` `deities0` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field196` `sneaking` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field158` `effectdescnum2` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field165` `ldon_trap` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field205` `no_block` INT(11) NOT NULL DEFAULT '0';
@@ -0,0 +1,4 @@
-- Inventory table update
ALTER TABLE `inventory`
ADD COLUMN `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `custom_data`,
ADD COLUMN `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `ornamenticon`;
@@ -0,0 +1 @@
ALTER TABLE `mercs` ADD `MercSize` float( 0 ) NOT NULL DEFAULT '5' AFTER `Gender`;
@@ -0,0 +1 @@
ALTER TABLE `items` ADD `herosforgemodel` int( 11 ) NOT NULL DEFAULT '0' AFTER `material`;
@@ -0,0 +1 @@
ALTER TABLE `inventory` ADD `ornament_hero_model` int( 11 ) NOT NULL DEFAULT '0' AFTER `ornamentidfile`;
@@ -0,0 +1,16 @@
/* Add the new Aug Slot 6 Fields to the items table */
ALTER TABLE `items` ADD `augslot6type` tinyint( 3 ) NOT NULL DEFAULT '0' AFTER `augslot5visible`;
ALTER TABLE `items` ADD `augslot6visible` tinyint( 3 ) NOT NULL DEFAULT '0' AFTER `augslot6type`;
ALTER TABLE `items` ADD `augslot6unk2` int( 11 ) NOT NULL DEFAULT '0' AFTER `augslot5unk2`;
/* Add the new Aug Slot 6 Field to the inventory table */
ALTER TABLE `inventory` ADD `augslot6` mediumint( 7 ) NOT NULL DEFAULT '0' AFTER `augslot5`;
/* Add the new Aug Slot 6 Field to the sharedbank table */
ALTER TABLE `sharedbank` ADD `augslot6` mediumint( 7 ) NOT NULL DEFAULT '0' AFTER `augslot5`;
/* Add the new Aug Slot 6 Field to the object_contents table */
ALTER TABLE `object_contents` ADD `augslot6` mediumint( 7 ) NOT NULL DEFAULT '0' AFTER `augslot5`;
/* Add the new Aug Slot 6 Field to the sharedbank table */
ALTER TABLE `character_corpse_items` ADD `aug_6` int( 11 ) NOT NULL DEFAULT '0' AFTER `aug_5`;
@@ -0,0 +1 @@
ALTER TABLE `npc_types` ADD `herosforgemodel` int( 11 ) NOT NULL DEFAULT '0' AFTER `helmtexture`;
@@ -0,0 +1,2 @@
ALTER TABLE `npc_types` CHANGE `d_meele_texture1` `d_melee_texture1` INT(11) DEFAULT NULL;
ALTER TABLE `npc_types` CHANGE `d_meele_texture2` `d_melee_texture2` INT(11) DEFAULT NULL;
@@ -0,0 +1,69 @@
/* Drop the current Merc View */
DROP VIEW vwMercNpcTypes;
/* Rename fields to match the source changes */
ALTER TABLE `merc_weaponinfo` CHANGE `d_meele_texture1` `d_melee_texture1` INT(11) NOT NULL DEFAULT 0;
ALTER TABLE `merc_weaponinfo` CHANGE `d_meele_texture2` `d_melee_texture2` INT(11) NOT NULL DEFAULT 0;
/* Re-Create the Merc View with new field names */
CREATE VIEW vwMercNpcTypes AS
SELECT
ms.merc_npc_type_id,
'' AS name,
ms.clientlevel,
ms.level,
mtyp.race_id,
mstyp.class_id,
ms.hp,
ms.mana,
0 AS gender,
mai.texture,
mai.helmtexture,
ms.attack_speed,
ms.STR,
ms.STA,
ms.DEX,
ms.AGI,
ms._INT,
ms.WIS,
ms.CHA,
ms.MR,
ms.CR,
ms.DR,
ms.FR,
ms.PR,
ms.Corrup,
ms.mindmg,
ms.maxdmg,
ms.attack_count,
ms.special_abilities AS special_abilities,
mwi.d_melee_texture1,
mwi.d_melee_texture2,
mwi.prim_melee_type,
mwi.sec_melee_type,
ms.runspeed,
ms.hp_regen_rate,
ms.mana_regen_rate,
1 AS bodytype,
mai.armortint_id,
mai.armortint_red,
mai.armortint_green,
mai.armortint_blue,
ms.AC,
ms.ATK,
ms.Accuracy,
ms.spellscale,
ms.healscale
FROM merc_stats ms
INNER JOIN merc_armorinfo mai
ON ms.merc_npc_type_id = mai.merc_npc_type_id
AND mai.minlevel <= ms.level AND mai.maxlevel >= ms.level
INNER JOIN merc_weaponinfo mwi
ON ms.merc_npc_type_id = mwi.merc_npc_type_id
AND mwi.minlevel <= ms.level AND mwi.maxlevel >= ms.level
INNER JOIN merc_templates mtem
ON mtem.merc_npc_type_id = ms.merc_npc_type_id
INNER JOIN merc_types mtyp
ON mtem.merc_type_id = mtyp.merc_type_id
INNER JOIN merc_subtypes mstyp
ON mtem.merc_subtype_id = mstyp.merc_subtype_id;
@@ -0,0 +1,3 @@
ALTER TABLE `npc_types` MODIFY `bodytype` INT(11) NOT NULL DEFAULT '1';
ALTER TABLE `npc_types` MODIFY `d_melee_texture1` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `npc_types` MODIFY `d_melee_texture2` INT(11) NOT NULL DEFAULT '0';
@@ -0,0 +1,54 @@
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for logsys_categories
-- ----------------------------
DROP TABLE IF EXISTS `logsys_categories`;
CREATE TABLE `logsys_categories` (
`log_category_id` int(11) NOT NULL,
`log_category_description` varchar(150) DEFAULT NULL,
`log_to_console` smallint(11) DEFAULT '0',
`log_to_file` smallint(11) DEFAULT '0',
`log_to_gmsay` smallint(11) DEFAULT '0',
PRIMARY KEY (`log_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of logsys_categories
-- ----------------------------
INSERT INTO `logsys_categories` VALUES ('1', 'AA', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('2', 'AI', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('3', 'Aggro', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('4', 'Attack', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('5', 'Client_Server_Packet', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('6', 'Combat', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('7', 'Commands', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('8', 'Crash', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('9', 'Debug', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('10', 'Doors', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('11', 'Error', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('12', 'Guilds', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('13', 'Inventory', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('14', 'Launcher', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('15', 'Netcode', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('16', 'Normal', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('17', 'Object', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('18', 'Pathing', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('19', 'QS_Server', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('20', 'Quests', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('21', 'Rules', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('22', 'Skills', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('23', 'Spawns', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('24', 'Spells', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('25', 'Status', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('26', 'TCP_Connection', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('27', 'Tasks', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('28', 'Tradeskills', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('29', 'Trading', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('30', 'Tribute', '0', '0', '0');
INSERT INTO `logsys_categories` VALUES ('31', 'UCS_Server', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('32', 'WebInterface_Server', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('33', 'World_Server', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('34', 'Zone Server', '1', '1', '0');
INSERT INTO `logsys_categories` VALUES ('35', 'MySQL Error', '1', '1', '1');
INSERT INTO `logsys_categories` VALUES ('36', 'MySQL Queries', '0', '0', '0');
@@ -0,0 +1 @@
ALTER TABLE `npc_types` ADD `light` tinyint( 2 ) NOT NULL DEFAULT '0';
@@ -0,0 +1 @@
INSERT INTO `logsys_categories` (`log_category_id`,`log_category_description`,`log_to_console`,`log_to_file`,`log_to_gmsay`) VALUES ('37', 'Mercenaries', '0', '0', '0');
@@ -0,0 +1 @@
INSERT INTO `logsys_categories` (`log_category_id`, `log_category_description`, `log_to_gmsay`) VALUES ('38', 'Quest Debug', '1');
@@ -0,0 +1 @@
ALTER TABLE `merc_stats` ADD `statscale` int( 11 ) NOT NULL DEFAULT '100' AFTER `runspeed`;
@@ -0,0 +1,3 @@
ALTER TABLE `merc_stats` ADD `attack_delay` TINYINT(3) UNSIGNED DEFAULT '30' NOT NULL AFTER `attack_speed`;
UPDATE `merc_stats` SET `attack_delay` = 36 + 36 * (`attack_speed` / 100);
UPDATE `merc_stats` SET `attack_delay` = 30 WHERE `attack_speed` = 0;
@@ -0,0 +1,7 @@
CREATE TABLE `character_item_recast` (
`id` int(11) UNSIGNED NOT NULL DEFAULT 0,
`recast_type` smallint(11) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` int(11) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(`id`, `recast_type`),
KEY `id` (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = latin1;
@@ -0,0 +1,3 @@
REPLACE INTO `logsys_categories` (`log_category_id`, `log_category_description`) VALUES ('39', 'Packet: Server -> Client');
REPLACE INTO `logsys_categories` (`log_category_id`, `log_category_description`) VALUES ('5', 'Packet: Client -> Server');
REPLACE INTO `logsys_categories` (`log_category_id`, `log_category_description`) VALUES ('40', 'Packet: Client -> Server Unhandled');
@@ -0,0 +1,2 @@
REPLACE INTO `logsys_categories` (`log_category_id`, `log_category_description`) VALUES ('41', 'Packet: Server -> Client With Dump');
REPLACE INTO `logsys_categories` (`log_category_id`, `log_category_description`) VALUES ('42', 'Packet: Server -> Client With Dump');
@@ -0,0 +1,2 @@
ALTER TABLE `loottable` CHANGE COLUMN `avgcoin` `avgcoin` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `maxcash`;
UPDATE `loottable` SET avgcoin = 0;