Hello g, on wowresource.eu user Hkarta write City Conquest script. That works fine… but that script was updatet.
Scirpt is write for rev. 8000-8500 i think.
Here’s a code.
Password:
trinitycore
And heres a DB script.
[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’);[/CODE]
Heres a SQL for test Conquest. (Spawn base NPCs to GM island)
[CODE]creature_template (150005 je ovládací npc - portál)
[spoiler]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);[/spoiler]
creature (spawny)
[spoiler]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);[/spoiler]
[/CODE]
Edit ScriptMgr.cpp
[CODE]#include “ScriptSystem.h”
#include “Policies/SingletonImp.h”
- #include “CityConquestMgr.h”
INSTANTIATE_SINGLETON_1(ScriptMgr);
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”);[/CODE]
Can someone rewrite this code for newest revision of Trinitycore please?
And i’m sorry for my english, im from CZ. /emoticons/default_smile.png
Original TOPIC.
Cheer to Hkarta and guy what rewrite this code to actual revision!! /emoticons/default_smile.png
Ou bad section, please move that topic to “Custom Code Discussion, Help, and Requests”. Thank you. /emoticons/default_smile.png
EDIT: Ah here is this script rewrited to 9001 but still not function