[TrinityCore] City Conquest menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    _Hkarta's Avatar Corporal
    Reputation
    46
    Join Date
    Apr 2010
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [TrinityCore] City Conquest

    [TrinityCore] City Conquest
    Tested on older 7986 trinity revision (3.3.3a), but it should work on newer as well
    Writen by Me, originaly for wowresource.eu. You may edit this script in anyway, as long as you mention me as an author of this part.

    Co to je?
    • This C++ script allows you to conquer cities
    • You can edit everything in database, after aplying script, you dont have to edit anything else in core (maybe bosses, read below)


    How does it work?
    • Talk to City Conquest portal (special npc) to begin siege
    • Once you begin your attack, there are tow possibilities. Either there is spawning npc loaded in core, which spawns boss - city captain, who disappears and ends conquest after hes been out of combat for 30 min. If spawning npc isnt loaded yet, you have 30 min to load him (which means get to creature visibility distance with him) - may you do this in 30 min, it spawns boss and first sentence applies.
    • Once conquest begins, its announced ingame, and City Conquest portal will allow deffenders and attackers to port to the city to aid their factions in battle. Each side ports to its own coords.
    • If attackers manage to slain captain, all npc in city change their faction and new conquest can begin in 1 hour.


    Disadvantages
    • First public version, might be buggy
    • You cannot script bosses using event ai, because they have assigned their own city_conquest_boss script. If you want to script them, you might do it globaly by editing city_conquest_boss, or copy this script, rename, and assign it to given npc
    • YOU HAVE TO TURN OFF >>GRID UNLOAD<< IN CONFIG, OR IT >>WILL<< CRASH.


    Installation
    Db part (contains example script in gmislandu - .tele gmisland - city is owned by horde by default)
    [spoiler]
    creature_template (150005 is controlling npc - portal)
    Code:
    INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (150000, 0, 0, 0, 0, 0, 328, 0, 328, 0, 'CQ: Boss Spawning Bunny GM ISLAND', '', '', 0, 82, 82, 0, 35, 35, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 43, 1, 0, 0, 130, 'city_conquest_spawner', 0);
    INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (150001, 0, 0, 0, 0, 0, 19543, 0, 19543, 0, 'Alliance Commander', NULL, NULL, 0, 52, 52, 0, 210, 210, 0, 1.125, 1.14286, 1, 0, 571, 571, 0, 137, 1, 1400, 1900, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'city_conquest_boss', 0);
    INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (150002, 0, 0, 0, 0, 0, 1735, 0, 1735, 0, 'Horde Commander', NULL, NULL, 0, 80, 80, 0, 29, 29, 2, 1.1, 1.14286, 1, 1, 953, 1089, 0, 245, 1, 2000, 0, 2, 4608, 0, 0, 0, 0, 0, 0, 58.872, 80.949, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'EventAI', 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1115, 0, 0, 'city_conquest_boss', 0);
    INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (150003, 0, 0, 0, 0, 0, 103, 0, 103, 0, 'GM Island Creature 1', NULL, NULL, 0, 40, 50, 0, 83, 83, 0, 1.125, 1.14286, 1, 0, 19, 23, 0, 5, 1, 1400, 1900, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 'city_conquest_generic', 0);
    INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (150004, 0, 0, 0, 0, 0, 146, 0, 146, 0, 'GM Island Ghost 1', NULL, NULL, 0, 15, 15, 0, 83, 83, 0, 0.99, 1.14286, 1, 0, 35, 40, 0, 9, 1, 1860, 2046, 2, 0, 0, 0, 0, 0, 0, 0, 24.552, 33.759, 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 57, '', 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 8388624, 2, 'city_conquest_generic', 0);
    INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (150005, 0, 0, 0, 0, 0, 26501, 0, 26501, 0, 'City Conquest', 'Portal & Manager', 'Interact', 0, 1, 1, 0, 35, 35, 1, 1, 1.14286, 1, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 'city_conquest_portal', 0);
    creature (spaws)
    Code:
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150000, 1, 1, 1, 0, 0, 16224.1, 16279.3, 20.885, 4.52855, 300, 0, 0, 4518, 4169, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150003, 1, 1, 1, 0, 0, 16225.4, 16271.1, 12.9997, 4.54034, 300, 0, 0, 1226, 1283, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150003, 1, 1, 1, 0, 0, 16230.3, 16295.1, 13.1757, 2.63968, 300, 0, 0, 1321, 1381, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150003, 1, 1, 1, 0, 0, 16235.2, 16301.1, 13.1757, 5.10582, 300, 0, 0, 1226, 1283, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150003, 1, 1, 1, 0, 0, 16226.1, 16317.2, 20.8459, 4.85056, 300, 0, 0, 1772, 1807, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150004, 1, 1, 1, 0, 0, 16220.7, 16271.6, 12.9754, 4.63851, 300, 0, 0, 301, 326, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150004, 1, 1, 1, 0, 0, 16224.1, 16284.6, 13.1756, 4.58746, 300, 0, 0, 301, 326, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150004, 1, 1, 1, 0, 0, 16221.3, 16298.9, 13.1756, 5.14117, 300, 0, 0, 301, 326, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150004, 1, 1, 1, 0, 0, 16234.9, 16299.6, 20.8456, 1.4812, 300, 0, 0, 301, 326, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150004, 1, 1, 1, 0, 0, 16217.7, 16284.2, 20.8895, 4.45001, 300, 0, 0, 301, 326, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150005, 1, 1, 1, 0, 0, 16228.4, 16244.6, 12.2895, 2.02771, 300, 0, 0, 41, 60, 0, 0);
    INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (150005, 530, 1, 1, 0, 0, -2047.61, 6658.8, 13.0538, 0.698243, 300, 0, 0, 41, 60, 0, 0);
    And new tables - in world db
    Code:
    -- ----------------------------
    -- Table structure for `city_capture_bosses`
    -- ----------------------------
    DROP TABLE IF EXISTS `city_capture_bosses`;
    CREATE TABLE `city_capture_bosses` (
      `city_id` int(11) NOT NULL default '0',
      `boss_entry_A` int(11) default NULL,
      `boss_entry_H` int(11) default NULL,
      `spawner_entry` int(11) default NULL,
      `spawn_timer` int(11) default NULL,
      PRIMARY KEY  (`city_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of city_capture_bosses
    -- ----------------------------
    INSERT INTO `city_capture_bosses` VALUES ('1', '150001', '150002', '150000', '1');
    
    -- ----------------------------
    -- Table structure for `city_capture_cities`
    -- ----------------------------
    DROP TABLE IF EXISTS `city_capture_cities`;
    CREATE TABLE `city_capture_cities` (
      `id` int(11) NOT NULL default '0',
      `minlevel` int(11) default NULL,
      `maxlevel` int(11) default NULL,
      `name` text,
      `controlled` tinyint(4) default NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of city_capture_cities
    -- ----------------------------
    INSERT INTO `city_capture_cities` VALUES ('1', '1', '80', 'GM Island', '1');
    
    -- ----------------------------
    -- Table structure for `city_capture_creatures`
    -- ----------------------------
    DROP TABLE IF EXISTS `city_capture_creatures`;
    CREATE TABLE `city_capture_creatures` (
      `city_id` int(11) default NULL,
      `entry` int(11) NOT NULL default '0',
      `faction_A` int(11) default NULL,
      `faction_H` int(11) default NULL,
      PRIMARY KEY  (`entry`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of city_capture_creatures
    -- ----------------------------
    INSERT INTO `city_capture_creatures` VALUES ('1', '150003', '210', '83');
    INSERT INTO `city_capture_creatures` VALUES ('1', '150004', '210', '83');
    
    -- ----------------------------
    -- Table structure for `city_capture_ports`
    -- ----------------------------
    DROP TABLE IF EXISTS `city_capture_ports`;
    CREATE TABLE `city_capture_ports` (
      `city_id` int(11) NOT NULL default '0',
      `side` int(11) NOT NULL default '0',
      `x` float default NULL,
      `y` float default NULL,
      `z` float default NULL,
      `o` float default NULL,
      `map` int(11) default NULL,
      PRIMARY KEY  (`city_id`,`side`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of city_capture_ports
    -- ----------------------------
    INSERT INTO `city_capture_ports` VALUES ('1', '0', '16255.1', '16289.2', '21', '3.26', '1');
    INSERT INTO `city_capture_ports` VALUES ('1', '1', '16221.3', '16246.5', '12', '1.47', '1');
    
    -- ----------------------------
    -- Table structure for `city_capture_progress`
    -- ----------------------------
    DROP TABLE IF EXISTS `city_capture_progress`;
    CREATE TABLE `city_capture_progress` (
      `city_id` int(11) NOT NULL default '0',
      `time` int(11) default NULL,
      PRIMARY KEY  (`city_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of city_capture_progress
    -- ----------------------------
    INSERT INTO `city_capture_progress` VALUES ('1', '1274630992');
    INSERT INTO `city_capture_progress` VALUES ('5', '1274628002');
    INSERT INTO `city_capture_progress` VALUES ('10', '1274628031');
    INSERT INTO `city_capture_progress` VALUES ('7', '1274628034');
    INSERT INTO `city_capture_progress` VALUES ('12', '1274628356');
    INSERT INTO `city_capture_progress` VALUES ('4', '1274628349');
    INSERT INTO `city_capture_progress` VALUES ('9', '1274628352');
    INSERT INTO `city_capture_progress` VALUES ('2', '1274628366');
    [/spoiler]
    C++ part

    Edit: ScriptMgr.cpp
    (lines with + means you are supposed to add them. Without that +, ofc)
    Code:
    #include "ScriptSystem.h"
    #include "Policies/SingletonImp.h"
    + #include "CityConquestMgr.h"
    
    INSTANTIATE_SINGLETON_1(ScriptMgr);
    Code:
    outstring_log("                         |___/                  |_|        ");
    outstring_log("");
    outstring_log("");
    
    //Load database (must be called after SD2Config.SetSource).
    LoadDatabase();
    
    + outstring_log("Initializing City Conquest Engine (c) Hkarta");
    + CityConquest.LoadCities();
    
    outstring_log("TSCR: Loading C++ scripts");
    New DB tables
    city_capture_cities
    Code:
    id - exactly what you would expect, have to be unique
    minlevel - min level to teleport players
    maxlevel - same as minlevel
    name - port name, used in gossip/announce
    controlled - side that controlls the city atm - 0 aliance, 1 horde
    city_capture_bosses
    Code:
    city_id - city_capture_cities.id
    boss_entry_A - name says it all (npc have to have city_conquest_boss script asigned)
    boss_entry_H - same as boss_entry_A
    spawner_entry - id of invisible npc (npc have to have city_conquest_spawner script asigned). Each city have to have its unique ids of bosses and spawner
    spawn_timer - its used, when spawner isnt loaded when attack is started. Leave it 0
    city_capture_creatures
    Code:
    city_id - city_capture_cities.id
    entry - npc entry (npc npc have to have city_conquest_generic script asigned + there have to be his entry. Each city should have its own unique entries)
    faction_A - faction of that npc, if city is controlled by aliance
    faction_H - faction of that npc, if city is controlled by horde
    city_capture_progress
    Code:
    city_id - city_capture_cities.id
    time - time, its used to check if city can be attacked (1 hr timer after it was conquered passed)
    city_capture_ports
    Code:
    not much to say, side: 0 defenders, 1 attackers
    Last edited by Ground Zero; 05-27-2010 at 03:34 AM.

    [TrinityCore] City Conquest
  2. #2
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,503
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Remember to use prefixes in the future.

  3. #3
    Endbringer's Avatar Knight-Lieutenant
    Reputation
    31
    Join Date
    Jul 2007
    Posts
    258
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice +rep for you

  4. #4
    Zellcorp's Avatar Member
    Reputation
    24
    Join Date
    Jun 2008
    Posts
    59
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ill try this +rep

  5. #5
    go6die6obama6's Avatar Private
    Reputation
    1
    Join Date
    Jan 2011
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nice, i'm going to test this

  6. #6
    _Hkarta's Avatar Corporal
    Reputation
    46
    Join Date
    Apr 2010
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Someone on wowresource.eu have recently rewritten my script to support up to date tc cores - [Wrath of the Lich King] [FUN] City Conquest - WoWResource - fórum - Page 3

    Just so you know.

  7. #7
    _Hkarta's Avatar Corporal
    Reputation
    46
    Join Date
    Apr 2010
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry to double post, just to keep people updated:
    It was rewrited once again (LordPsyan of trinitycore), however, there were some errors in lordpsyan's rewrite -


    this should be working on current tc versions (with the new scripting system), theres some quick info if its not working for you:

    • You still have to add it to ScriptMgr.cpp
    • Default city (GM Island) is owned by horde by default.
    • So, if someone want to try this script, he should do it using aliance char to be able to start conquest.
    • Theres 30mins timer after taking controll over city - during that timer, conquest for this city cannot be started (for testing pruposes, you may set time column to 0 in city_capture_progress, to be able to start conquest immediately)
    • Also, turning GRID UNLOAD off is REQUIRED as well as importing city conquest database from first post.
    • When creating new conquest, all npcs should have unique ids (not used elsewhere), including bosses and spawner.
    • If your boss/guards, etc is not returning to spawnpoint on loosing aggro, or other such errors, complete his creture script - it includes only city conquest related methods by default, so taking some existing outdoor boss script and filling the empty spaces in current script might be solution.

    Please note that i havent tested this rewrite that much, but starting siege with alliance char, spawning and killing boss and changing city creature factions after that worked.

    Also, if someone creates new city, hes more than wellcomed to post its sql. :-)

  8. #8
    seg168's Avatar Banned
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    6 hours of work on getting the script working and still getting the same thing. I managed to compile the core after modifing a few things in the source so it won't give linking errors, passed some core-sql shit, but still can't get this script working. I'm working on a clean build + CityConquest script of TC 10818

  9. #9
    _Hkarta's Avatar Corporal
    Reputation
    46
    Join Date
    Apr 2010
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay...so, few basic questions to get started:
    Have you included script in ScriptMgr.cpp?
    Have you added custom scripts in script loader?
    Have you imported whole database?

    If its true, make sure that script reports load of at least one city
    ( 2011-01-27 16:19:46 CQM: City Loaded - )
    Last edited by _Hkarta; 01-29-2011 at 07:41 PM.

  10. #10
    seg168's Avatar Banned
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Hkarta View Post
    Okay...so, few basic questions to get started:
    Have you included script in ScriptMgr.cpp?
    Have you added custom scripts in script loader?
    Have you imported whole database?

    If its true, make sure that script reports load of at least one city
    ( 2011-01-27 16:19:46 CQM: City Loaded - )
    Have you included script in ScriptMgr.cpp? Yes
    Have you added custom scripts in script loader? Yes
    Have you imported whole database? Yes, and this is where I think the glitch is.

    I checked the source and found this line :

    QueryResult result = WorldDatabase.Query("SELECT id, minlevel, maxlevel, name, controlled, boss_entry_A, boss_entry_H FROM city_capture_cities LEFT JOIN city_capture_bosses ON id = city_id ORDER BY id ASC");
    So basicly I guess the core asks for those fields ( boss_entry_A and boss_entry_H ) that do not exist in city_capture_cities but exist in city_capture_bosses, but for some reason the core is only looking for those fields in city_capture_cities. The result ? The server crashes at:

    2011-01-30 10:58:21 TSCR: Loading Script Waypoints for 79 creature(s)...
    2011-01-30 10:58:21 >> Loaded 2067 Script Waypoint nodes in 20 ms
    2011-01-30 10:58:21
    2011-01-30 10:58:21 Initializing City Conquest Engine (c) Hkarta
    [L.E.:Confirmed on latest clean DB]


    I tried to fix that, so I added fields "boss_entry_A" and "boss_entry_B" in table city_capture_cities, with the same values as in city_capture_bosses, which are 150001 and 150002, the server worked but the script didn't.
    And NO, I searched the log and didn't found :

    ( 2011-01-27 16:19:46 CQM: City Loaded - )
    So it might be my fault in some way.

    Tyvm for the support.

    ---------- Post added at 04:59 AM ---------- Previous post was at 03:47 AM ----------

    Soooo, I added this line in CityConquestMgr.cpp



    and the result was this



    So I'm guessing that the glitch is somewhere near these lines,

    city->boss_A = fields[5].GetInt32();
    city->boss_H = fields[6].GetInt32();
    considering the fact that the core doesn't get to this line and crashes:

    sLog->outString("CQM: City Loaded - %s", fields[3].GetString());
    Last edited by seg168; 01-30-2011 at 07:18 AM.

  11. #11
    _Hkarta's Avatar Corporal
    Reputation
    46
    Join Date
    Apr 2010
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No need to add anything, when loading cities, following query should be requested:
    Code:
    SELECT id, minlevel, maxlevel, name, controlled, boss_entry_A, boss_entry_H FROM city_capture_cities LEFT JOIN city_capture_bosses ON id = city_id ORDER BY id ASC
    - try running it against your database in navicat, or something.

    What seems strange to me is that red underline on city->boss_H, like it doesnt exist - check CityConquestmGR.h and its City class - it should look like that:
    Code:
    class City
    {
    public:
    	int id;
    	Spawns spawns;
    	int boss_A;
    	int boss_H;
    	bool summonerSet;
    	Creature * summoner;
    	Coords * port_defense;
    	Coords * port_attack;
    	int controlled;
    	//	0 aliance
    	//  1 horde
    	int minlevel;
    	int maxlevel;
    	std::string name;
    	bool active;
    	//   true - siege in progress
    	//   false - not under siege
    	City(void);
    	void LoadPorts(void);									// done
    };
    But iv got no idea what could be wrong, as the files i provided in my post yesterday are exactly the same as the ones i am currently looking on.

    edit: From your post, it seems like you dont get that command: LEFT JOIN means what it seems to say - to left table, JOIN table on right side of that command. Next part only specifies which columns are equal (id and city_id).
    edit2: Seeing your running on windows; if you upload your sources, i could have a closer look at it.
    Last edited by _Hkarta; 01-30-2011 at 08:45 AM.

  12. #12
    seg168's Avatar Banned
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok so on SQLYog the line runs well :\



    The red underline dissapeared.

    This is the source:

    Filebeam - Beam up that File Scottie!
    Last edited by seg168; 01-30-2011 at 10:07 AM.

  13. #13
    _Hkarta's Avatar Corporal
    Reputation
    46
    Join Date
    Apr 2010
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems we got it working, i must have messed up something in CityConquestMgr.cpp, not sure what. When i ll have time, i will have closer look on it. Anyway, on clean core, apply this patch: https://bitbucket.org/lordpsyan/trin...Conquest.patch and from archive i provided, replace only scripts in custom folder.

    Than it should be working. No idea what i might have changed in mgr, that it does work for me, but doesnt for some others.

  14. #14
    seg168's Avatar Banned
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tyvm it works. +rep

  15. #15
    predattak's Avatar Active Member
    Reputation
    27
    Join Date
    Jul 2008
    Posts
    537
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm interesting .. let's see if it works 4 me
    Homosexuals are gay

Page 1 of 2 12 LastLast

Similar Threads

  1. City Conquest
    By Psychotherapy in forum WoW EMU Questions & Requests
    Replies: 18
    Last Post: 03-24-2010, 02:43 PM
  2. [Iwillloveyouifyoudothis] a UPDATED City Conquest Script
    By spectre123 in forum WoW EMU Questions & Requests
    Replies: 10
    Last Post: 08-23-2009, 09:30 PM
  3. City Conquest
    By Spectre90 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-02-2008, 05:36 PM
  4. Pull a mob to 1 of your main cities
    By Matt in forum World of Warcraft Exploits
    Replies: 13
    Last Post: 09-08-2006, 10:01 PM
  5. Attack in a City Without being Flagged
    By Matt in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 06-28-2006, 01:43 PM
All times are GMT -5. The time now is 06:00 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search