Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/sql_mr/custom_mangos_tables.sql b/sql_mr/custom_mangos_tables.sql
- index cffee1d..4e7daad 100644
- --- a/sql_mr/custom_mangos_tables.sql
- +++ b/sql_mr/custom_mangos_tables.sql
- @@ -609,3 +609,101 @@ INSERT INTO mangos_string
- (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
- VALUES
- (983, 'Your Jail status was reset to 0 gesatzt', NULL, 'Votre statut a ?t? Jail ? 0 gesatzt', 'Dein Jail status wurde auf 0 zur?ck gesatzt', NULL, NULL, NULL, NULL, NULL);
- +
- +-- Custom Maze event
- +-- Here are the development of "Labyrinth."
- +
- +-- Labyrinth consisting of several layers is generated every time you call again, pseudorandomly. Algorithm throwing points: 5000 times in a closed square accidentally catches a point, randomly choose one of four directions, and from this point is the line up until it hits on another line (or until it reaches a maximum length). With this algorithm are obtained related to labyrinths (from anywhere can reach any other point), in addition, if you set a small limit of length - the maze is impossible to pass by the right / left hand.
- +
- +-- The patch adds two teams in the game:
- +-- ". Maze generate" - generates a maze of boxes and sets, walls, boxes, ladders, prize chest
- +-- ". Maze clean" - removes all objects from the map number 13 (Test)
- +-- The commands can be invoked from the server console or a character located on any map, but it is recommended that the character was on the map id 1913 (Testing).
- +
- +-- To work correctly, should be in the config Mangos change the following:
- +-- GuidReserveSize.GameObject = 1000000
- +
- +-- Labyrinth created in several game levels:
- +-- 1. The first level - the simplest and most ordinary maze task - to get out of the corner to the stairs in the center
- +-- 2. The second level - climbing the stairs to the wall of the maze proprygat on the walls to any angle to the next ladder
- +-- 3. The third level - a new maze at first, even easier than the first task - to get to the center, however, is closer to the center of the maze is complicated by increasing the walls and ceiling, closing the review.
- +-- 4. The fourth level - the most difficult, but small: indoor ceiling maze, a lot of holes in the floor (falling - a fine, return to level three), of hidden stairs difficult.
- +-- 5. The fifth level - the roof, here is the final chest-Quest Giver.
- +
- +-- SQL-patch creates a fully automated Event: Every Sunday at 21.00 at the site of memory Antonidas (Dalaran) there are 2 NPC giving the quest "Find the chest in the maze." After taking the quest, the player automatically teleported to the maze. Exit from the labyrinth - the return of the stone. Quest - a weekly, award - 25 posters Frost (you can easily modify it to the needs of the server).
- +
- +-- -> Levels maze created in such a way that you can easily monitor the players, flying over the levels.
- +-- + Before you run into a maze of players at the event-masters have the opportunity to hand editing in its structure - whether it be decorative jewelry, evil monsters (only on the lower level! ") Doors, or even new walkways / walls
- +
- +-- Authors:
- +-- Grayzer Rod
- +-- Liilith Rod
- +-- Vinolentus
- +
- +
- +-- = SQL = --
- +
- +-- Gameobject_template
- +REPLACE INTO `gameobject_template` VALUES
- +(13, 5, 31, 'Maze Box: Simple Wood (4)','','','', 0, 0, 3.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'' )
- +(12, 5, 31, 'Maze Box: Simple Wood (2)','','','', 0, 0, 1.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'' )
- +(14, 3, 9069, 'Maze Winner Chest','','','', 0, 0, 1.5, 0, 0, 0, 0, 0, 0, 57, 14, 86400, 1, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'')
- +(18, 5, 6737, 'Maze Box: Fire Wood (4)','','','', 0, 0, 3.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'' )
- +(19, 5, 8994, 'Maze Box: Beer Wood (4)','','','', 0, 0, 3.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'' )
- +(15, 2, 9069, 'Maze Chest','','','', 0, 0, 1.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'');
- +
- +-- Rune npc
- +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name` , `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `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 ` , `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, ` questItem4 `,` questItem5 `,` questItem6 `,` movementId `,` RegenHealth `,` equipment_id `,` trainer_id `,` vendor_id `,` mechanic_immune_mask `,` flags_extra `,` ScriptName `) VALUES (7, 0, 0 , 0, 0, 0, 11444, 11444, 11444, 11444, 'Rune', 'Thunderfury','', 0, 80, 80, 32000, 32000, 24000, 24000, 7637, 2007, 2007, 3, 1.48, 1.42857, 1, 4, 231, 346, 0, 87, 3.7, 2000, 1500, 1, 1, 0, 2, 0, 0, 0, 0, 185, 277, 70, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'', 0, 3, 1000, 1, 0, 0, 0, 0, 0, 0 , 0, 0, 1, 0, 0, 0, 1, 2,'');
- +DELETE FROM `creature` WHERE `id` = 7;
- +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation` , `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES
- +(230000, 7, 571, 1, 129, 0, 0, 5963.65, 693,663, 641,662, 4.1677, 25, 5, 0, 32000, 24000, 0, 0);
- +
- +-- Kerr npc
- +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name` , `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `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 ` , `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, ` questItem4 `,` questItem5 `,` questItem6 `,` movementId `,` RegenHealth `,` equipment_id `,` trainer_id `,` vendor_id `,` mechanic_immune_mask `,` flags_extra `,` ScriptName `) VALUES (13, 0, 0 , 0, 0, 0, 599, 599, 599, 599, 'Kerr', 'Thunderfury','', 0, 80, 80, 32000, 32000, 24000, 24000, 7637, 2007, 2007, 3, 1.48, 1.42857, 1.5, 4, 231, 346, 0, 87, 3.7, 2000, 1500, 1, 1, 0, 2, 0, 0, 0, 0, 185, 277, 70, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'', 0, 3, 1000, 1, 0, 0, 0, 0, 0, 0 , 0, 0, 1, 0, 0, 0, 1, 2,'');
- +DELETE FROM `creature` WHERE `id` = 13;
- +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation` , `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES
- +(230001, 13, 571, 1, 129, 0, 0, 5961.85, 694,756, 641,521, 4.3507, 25, 5, 0, 32000, 24000, 0, 0);
- +
- +-- Quest 3
- +DELETE FROM `creature_questrelation` WHERE `quest` = 3;
- +DELETE FROM `gameobject_questrelation` WHERE `quest` = 3;
- +UPDATE `item_template` SET `StartQuest` = 0 WHERE `StartQuest` = 3;
- +INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (7, 3);
- +UPDATE `creature_template` SET `npcflag` = `npcflag` | 2 WHERE `entry` = 7;
- +DELETE FROM `creature_involvedrelation` WHERE `quest` = 3;
- +DELETE FROM `gameobject_involvedrelation` WHERE `quest` = 3;
- +INSERT INTO `gameobject_involvedrelation` (`id`, `quest`) VALUES (15, 3);
- +DELETE FROM `quest_start_scripts` WHERE `id` = 3;
- +INSERT INTO `quest_start_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3` , `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES
- +(3, 0, 6, 13, 0, 0, 0, 0, '0 ', '0', '0 ', '0', 123.8, 132.5, -144.7, 3.94, 'mazeAlliance');
- +REPLACE INTO `quest_template` (`entry`, `Method`, `ZoneOrSort`, `MinLevel`, `QuestLevel`, `Type`, `RequiredClasses`, `RequiredRaces`, `RequiredSkill`, `RequiredSkillValue`, `RepObjectiveFaction` , `RepObjectiveValue`, `RequiredMinRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepFaction`, `RequiredMaxRepValue`, `SuggestedPlayers`, `LimitTime`, `QuestFlags`, `SpecialFlags`, `CharTitleId`, `PlayersSlain`, `BonusTalents`, ` PrevQuestId `,` NextQuestId `,` ExclusiveGroup `,` NextQuestInChain `,` RewXPId `,` SrcItemId `,` SrcItemCount `,` SrcSpell `,` Title `,` Details `,` Objectives `,` OfferRewardText `,` RequestItemsText ` , `EndText`, `CompletedText`, `ObjectiveText1`, `ObjectiveText2`, `ObjectiveText3`, `ObjectiveText4`, `ReqItemId1`, `ReqItemId2`, `ReqItemId3`, `ReqItemId4`, `ReqItemId5`, `ReqItemId6`, ` ReqItemCount1 `,` ReqItemCount2 `,` ReqItemCount3 `,` ReqItemCount4 `,` ReqItemCount5 `,` ReqItemCount6 ??`,` ReqSourceId1 `,` ReqSourceId2 `,` ReqSourceId3 `,` ReqSourceId4 `,` ReqSourceCount1 `,` ReqSourceCount2 `,` ReqSourceCount3 ` , `ReqSourceCount4`, `ReqCreatureOrGOId1`, `ReqCreatureOrGOId2`, `ReqCreatureOrGOId3`, `ReqCreatureOrGOId4`, `ReqCreatureOrGOCount1`, `ReqCreatureOrGOCount2`, `ReqCreatureOrGOCount3`, `ReqCreatureOrGOCount4`, `ReqSpellCast1`, `ReqSpellCast2`, `ReqSpellCast3`, ` ReqSpellCast4 `,` RewChoiceItemId1 `,` RewChoiceItemId2 `,` RewChoiceItemId3 `,` RewChoiceItemId4 `,` RewChoiceItemId5 `,` RewChoiceItemId6 `,` RewChoiceItemCount1 `,` RewChoiceItemCount2 `,` RewChoiceItemCount3 `,` RewChoiceItemCount4 `,` RewChoiceItemCount5 `,` RewChoiceItemCount6 ??` , `RewItemId1`, `RewItemId2`, `RewItemId3`, `RewItemId4`, `RewItemCount1`, `RewItemCount2`, `RewItemCount3`, `RewItemCount4`, `RewRepFaction1`, `RewRepFaction2`, `RewRepFaction3`, `RewRepFaction4`, ` RewRepFaction5 `,` RewRepValueId1 `,` RewRepValueId2 `,` RewRepValueId3 `,` RewRepValueId4 `,` RewRepValueId5 `,` RewRepValue1 `,` RewRepValue2 `,` RewRepValue3 `,` RewRepValue4 `,` RewRepValue5 `,` RewHonorAddition `,` RewHonorMultiplier ` , `RewOrReqMoney`, `RewMoneyMaxLevel`, `RewSpell`, `RewSpellCast`, `RewMailTemplateId`, `RewMailDelaySecs`, `PointMapId`, `PointX`, `PointY`, `PointOpt`, `DetailsEmote1`, `DetailsEmote2`, ` DetailsEmote3 `,` DetailsEmote4 `,` DetailsEmoteDelay1 `,` DetailsEmoteDelay2 `,` DetailsEmoteDelay3 `,` DetailsEmoteDelay4 `,` IncompleteEmote `,` CompleteEmote `,` OfferRewardEmote1 `,` OfferRewardEmote2 `,` OfferRewardEmote3 `,` OfferRewardEmote4 `,` OfferRewardEmoteDelay1 ` , `OfferRewardEmoteDelay2`, `OfferRewardEmoteDelay3`, `OfferRewardEmoteDelay4`, `StartScript`, `CompleteScript`) VALUES (3, 1, 0, 0, 0, 0, 0, 1101, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 32768, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 'Maze Enterance (Alliance)', 'Hi, my name is Rune and I - one of the founders of the giant, automatically generated maze in WoW. If you want, you can sign in and try to find a way upstairs to a chest that I have prepared for you. ',' Find chest in maze. ',' You finally found the trunk and take out a deserved reward from it. Thanks for playing! If you liked the maze, please visit http://diary.ru/ ~ world-of-warcraft> MAZE and leave your comments! ','',' Enter to maze ','','','','','', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49426, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0);
- +DELETE FROM `areatrigger_involvedrelation` WHERE `quest` = 3;
- +INSERT INTO `areatrigger_involvedrelation` (`id`, `quest`) VALUES (0, 3);
- +
- +-- Quest 4
- +DELETE FROM `creature_questrelation` WHERE `quest` = 4;
- +DELETE FROM `gameobject_questrelation` WHERE `quest` = 4;
- +UPDATE `item_template` SET `StartQuest` = 0 WHERE `StartQuest` = 4;
- +INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (13, 4);
- +UPDATE `creature_template` SET `npcflag` = `npcflag` | 2 WHERE `entry` = 13;
- +DELETE FROM `creature_involvedrelation` WHERE `quest` = 4;
- +DELETE FROM `gameobject_involvedrelation` WHERE `quest` = 4;
- +INSERT INTO `gameobject_involvedrelation` (`id`, `quest`) VALUES (15, 4);
- +DELETE FROM `quest_start_scripts` WHERE `id` = 4;
- +INSERT INTO `quest_start_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3` , `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES
- +(4, 0, 6, 13, 0, 0, 0, 0, '0 ', '0', '0 ', '0', -124.1, -132.5, -144.7, 0.81, 'mazeHorde');
- +REPLACE INTO `quest_template` (`entry`, `Method`, `ZoneOrSort`, `MinLevel`, `QuestLevel`, `Type`, `RequiredClasses`, `RequiredRaces`, `RequiredSkill`, `RequiredSkillValue`, `RepObjectiveFaction` , `RepObjectiveValue`, `RequiredMinRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepFaction`, `RequiredMaxRepValue`, `SuggestedPlayers`, `LimitTime`, `QuestFlags`, `SpecialFlags`, `CharTitleId`, `PlayersSlain`, `BonusTalents`, ` PrevQuestId `,` NextQuestId `,` ExclusiveGroup `,` NextQuestInChain `,` RewXPId `,` SrcItemId `,` SrcItemCount `,` SrcSpell `,` Title `,` Details `,` Objectives `,` OfferRewardText `,` RequestItemsText ` , `EndText`, `CompletedText`, `ObjectiveText1`, `ObjectiveText2`, `ObjectiveText3`, `ObjectiveText4`, `ReqItemId1`, `ReqItemId2`, `ReqItemId3`, `ReqItemId4`, `ReqItemId5`, `ReqItemId6`, ` ReqItemCount1 `,` ReqItemCount2 `,` ReqItemCount3 `,` ReqItemCount4 `,` ReqItemCount5 `,` ReqItemCount6 ??`,` ReqSourceId1 `,` ReqSourceId2 `,` ReqSourceId3 `,` ReqSourceId4 `,` ReqSourceCount1 `,` ReqSourceCount2 `,` ReqSourceCount3 ` , `ReqSourceCount4`, `ReqCreatureOrGOId1`, `ReqCreatureOrGOId2`, `ReqCreatureOrGOId3`, `ReqCreatureOrGOId4`, `ReqCreatureOrGOCount1`, `ReqCreatureOrGOCount2`, `ReqCreatureOrGOCount3`, `ReqCreatureOrGOCount4`, `ReqSpellCast1`, `ReqSpellCast2`, `ReqSpellCast3`, ` ReqSpellCast4 `,` RewChoiceItemId1 `,` RewChoiceItemId2 `,` RewChoiceItemId3 `,` RewChoiceItemId4 `,` RewChoiceItemId5 `,` RewChoiceItemId6 `,` RewChoiceItemCount1 `,` RewChoiceItemCount2 `,` RewChoiceItemCount3 `,` RewChoiceItemCount4 `,` RewChoiceItemCount5 `,` RewChoiceItemCount6 ??` , `RewItemId1`, `RewItemId2`, `RewItemId3`, `RewItemId4`, `RewItemCount1`, `RewItemCount2`, `RewItemCount3`, `RewItemCount4`, `RewRepFaction1`, `RewRepFaction2`, `RewRepFaction3`, `RewRepFaction4`, ` RewRepFaction5 `,` RewRepValueId1 `,` RewRepValueId2 `,` RewRepValueId3 `,` RewRepValueId4 `,` RewRepValueId5 `,` RewRepValue1 `,` RewRepValue2 `,` RewRepValue3 `,` RewRepValue4 `,` RewRepValue5 `,` RewHonorAddition `,` RewHonorMultiplier ` , `RewOrReqMoney`, `RewMoneyMaxLevel`, `RewSpell`, `RewSpellCast`, `RewMailTemplateId`, `RewMailDelaySecs`, `PointMapId`, `PointX`, `PointY`, `PointOpt`, `DetailsEmote1`, `DetailsEmote2`, ` DetailsEmote3 `,` DetailsEmote4 `,` DetailsEmoteDelay1 `,` DetailsEmoteDelay2 `,` DetailsEmoteDelay3 `,` DetailsEmoteDelay4 `,` IncompleteEmote `,` CompleteEmote `,` OfferRewardEmote1 `,` OfferRewardEmote2 `,` OfferRewardEmote3 `,` OfferRewardEmote4 `,` OfferRewardEmoteDelay1 ` , `OfferRewardEmoteDelay2`, `OfferRewardEmoteDelay3`, `OfferRewardEmoteDelay4`, `StartScript`, `CompleteScript`) VALUES (4, 1, 0, 0, 0, 0, 0, 690, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 32768, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 'Maze Enterance (Horde)', 'Hi, my name is Kerr and I - one of the founders of the giant, automatically generated maze in WoW. If you want, you can sign in and try to find a way upstairs to a chest that I have prepared for you. ',' Find chest in maze. ',' You finally found the trunk and take out a deserved reward from it. Thanks for playing! If you liked the maze, please visit http://diary.ru/ ~ world-of-warcraft> MAZE and leave your comments! ','',' Enter to maze ','','','','','', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49426, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0);
- +
- +-- Game event 399
- +REPLACE INTO `game_event` (`entry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`) VALUES (399, '2011-05-08 21:00:00 ', '2020-12-30 22:00:00', 10080, 240, 0, 'Maze Event');
- +DELETE FROM `game_event_creature` WHERE abs (`event`) = 399;
- +INSERT INTO `game_event_creature` (`guid`, `event`) VALUES
- +(230000,399)
- +(230001,399);
- +DELETE FROM `game_event_gameobject` WHERE abs (`event`) = 399;
- +
- +-- RUS local
- +REPLACE INTO `locales_quest` VALUES
- +(3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Entrance to the maze (the Alliance)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Hi, my name is Rune and I - one of the founders of the giant maze in WoW. If you prefer, you can sign in and try to find a way upstairs to a chest that I have prepared for you. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL,' Find the chest in the maze. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL,' Finally you have found the trunk and take out of it well deserved award. Thanks for playing! If you liked the maze, please visit http://diary.ru / ~ world-of-warcraft> MAZE and leave your comments! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,' Sign in a maze . ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- +(4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Entrance to the maze (Horde)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Hi, my name is Kerr and I - one of the founders of the giant maze in WoW. If you prefer, you can sign in and try to find a way upstairs to a chest that I have prepared for you. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL,' Find the chest in the maze. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL,' Finally you have found the trunk and take out of it well deserved award. Thanks for playing! If you liked the maze, please visit http://diary.ru / ~ world-of-warcraft> MAZE and leave your comments! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,' Sign in a maze . ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- +
- diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
- index f3cf7c1..4b5331c 100644
- --- a/src/game/Chat.cpp
- +++ b/src/game/Chat.cpp
- @@ -744,6 +744,13 @@ ChatCommand * ChatHandler::getCommandTable()
- { NULL, 0, false, NULL, "", NULL }
- };
- + static ChatCommand mazeCommandTable[] =
- + {
- + { "generate", SEC_GAMEMASTER, true, &ChatHandler::HandleMazeGenerateCommand, "", NULL },
- + { "clean", SEC_GAMEMASTER, true, &ChatHandler::HandleMazeCleanCommand, "", NULL },
- + { NULL, 0, true, NULL, "", NULL }
- + };
- +
- static ChatCommand commandTable[] =
- {
- { "account", SEC_PLAYER, true, NULL, "", accountCommandTable },
- @@ -764,6 +771,7 @@ ChatCommand * ChatHandler::getCommandTable()
- { "list", SEC_ADMINISTRATOR, true, NULL, "", listCommandTable },
- { "lookup", SEC_MODERATOR, true, NULL, "", lookupCommandTable },
- { "modify", SEC_MODERATOR, false, NULL, "", modifyCommandTable },
- + { "maze", SEC_GAMEMASTER, true, NULL, "", mazeCommandTable },
- { "npc", SEC_MODERATOR, false, NULL, "", npcCommandTable },
- { "pool", SEC_GAMEMASTER, true, NULL, "", poolCommandTable },
- { "pdump", SEC_ADMINISTRATOR, true, NULL, "", pdumpCommandTable },
- diff --git a/src/game/Chat.h b/src/game/Chat.h
- index e617f41..70d5301 100644
- --- a/src/game/Chat.h
- +++ b/src/game/Chat.h
- @@ -326,6 +326,11 @@ class MANGOS_DLL_SPEC ChatHandler
- bool HandleLookupTeleCommand(char* args);
- bool HandleLookupTitleCommand(char* args);
- + bool HandleMazeGenerateCommand(char* args);
- + bool HandleMazeCleanCommand(char* args);
- + bool MazeAddStaircase(int x, int y, int z, int height);
- + bool MazeAddGameObject(int id, float x, float y, float z, float o);
- +
- bool HandleModifyHPCommand(char* args);
- bool HandleModifyManaCommand(char* args);
- bool HandleModifyRageCommand(char* args);
- diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
- index 986c0ec..f15da29 100644
- --- a/src/game/Level2.cpp
- +++ b/src/game/Level2.cpp
- @@ -5421,3 +5421,339 @@ bool ChatHandler::HandleTitlesCurrentCommand(char* args)
- return true;
- }
- +
- +// maze maze
- +
- +const int MAZE_MAP_ID = 13;
- +
- +bool ChatHandler::HandleMazeCleanCommand(char* args)
- +{
- + Map* map = sMapMgr.FindMap(MAZE_MAP_ID);
- + if (!map){
- + SendSysMessage("Maze Clean: Map (id 13) does not exist.");
- + return false;
- + }
- +
- + SendSysMessage("Maze Clean: start working");
- +
- + QueryResult *result = WorldDatabase.PQuery("SELECT guid FROM gameobject WHERE map = 13");
- + uint32 count = 0;
- +
- + if (result)
- + {
- + do
- + {
- + uint32 guid = result->Fetch()[0].GetUInt32();
- + if (GameObjectData const* data = sObjectMgr.GetGOData(guid)){
- + if (GameObject* obj = map->GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, data->id, guid))){
- + obj->SetRespawnTime(0);
- + obj->Delete();
- + ++count;
- + }
- + }
- + }
- + while (result->NextRow());
- + delete result;
- + }
- +
- + WorldDatabase.Execute("DELETE FROM gameobject WHERE map = 13");
- +
- + SendSysMessage("Maze Clean: All objects deleted from map 13");
- +
- + return true;
- +}
- +
- +int getRandomBoxId(){
- + switch(rand()%3){
- + case 0: return 13; break;
- + case 1: return 18; break;
- + case 2: return 19; break;
- + }
- + return 0;
- +}
- +
- +// Z: -144.708649
- +// map: 13 (Test)
- +// xy +- -145 (290-290)
- +// Runebox: 4.00f-4.27f (72-68)
- + const int iterations = 5000;
- + const float xStepSize = 4.00f;
- + const float yStepSize = 4.27f;
- + const float zStepSize = 4.00f;
- + const float xStart = -128.0f;
- + const float yStart = -136.79f;
- + const float zStart = -144.7f;
- +
- + const int xSteps = 64;
- + const int ySteps = 64;
- + const int zSteps = 4;
- + const int width = xSteps/8; // (64\8=8)
- +
- + // main maze bool array 3D
- + bool maze[xSteps+1][ySteps+1][zSteps+1];
- +
- +bool ChatHandler::HandleMazeGenerateCommand (char* args){
- + SendSysMessage("Maze Generate: start working, 'some lags was occured!'");
- + int level;
- + if (*args) level = (int)atoi(args);
- + else level = 0;
- +
- + int i, x, y, z;
- + int d, dx, dy, count;
- +
- + if (level==0||level==-1){
- + SendSysMessage("Maze Generate: maze[xSteps+1][ySteps+1][zSteps];");
- + int wallLength = 0;
- +// cleaning maze
- + for (x=0; x<=xSteps; x++)
- + for (y=0; y<=ySteps; y++)
- + for (z=0; z<=zSteps; z++)
- + maze[x][y][z]=false;
- +// get all floors (0..zSteps)
- + for (z=1; z<=zSteps; z++){
- + switch(z){
- + case 1: wallLength=8; break;
- + case 2: wallLength=6; break;
- + case 3: wallLength=4; break;
- + }
- +// draw perimeter
- + for (x=0; x<=xSteps; x++) {
- + maze[x][0][z]=true;
- + maze[x][ySteps][z]=true;
- + }
- + for (y=0; y<=ySteps; y++) {
- + maze[0][y][z]=true;
- + maze[xSteps][y][z]=true;
- + }
- + if (z==3){ // if floor 3 then need more perimetrs
- + for (x=0; x<=xSteps; x++) {
- + maze[x][1/4*ySteps][z]=true;
- + maze[x][3/4*ySteps][z]=true;
- + }
- + for (y=0; y<=ySteps; y++) {
- + maze[1/4*xSteps][y][z]=true;
- + maze[3/4*xSteps][y][z]=true;
- + }
- + }
- +// generate wall-bytes
- + for (i=0; i<=iterations; i++){
- + x = (rand() % (xSteps/2)) * 2;
- + y = (rand() % (ySteps/2)) * 2; // take a random even point within the maze
- + if (maze[x][y][z]) continue; // if at this point already is a wall, then continue to randomly throw points
- + d = rand() % 4; // otherwise recoverable random direction
- + switch (d){
- + case 0: dx= 1; dy= 0; break;
- + case 1: dx=-1; dy= 0; break;
- + case 2: dx= 0; dy= 1; break;
- + case 3: dx= 0; dy=-1; break;
- + } // and express it through dx, dy
- + count=0;
- + while (!maze[x][y][z] && count<=wallLength){ // until we meet another wall
- + maze[x][y][z]=true; // establish its wall
- + x+=dx;
- + y+=dy; // go to next cell
- + count++;
- + }
- + }
- +// make central cell empty for a staircase
- + maze[xSteps/2+0][ySteps/2+0][z]=false;
- + maze[xSteps/2+1][ySteps/2+0][z]=false;
- + maze[xSteps/2-1][ySteps/2+0][z]=false;
- + maze[xSteps/2+0][ySteps/2+1][z]=false;
- + maze[xSteps/2+0][ySteps/2-1][z]=false;
- + }
- + }
- +
- + if (level==0||level==1){
- + SendSysMessage("Maze Generate: placing level 1: walls of 1st floor");
- + for (int x = 0; x <= xSteps; x++)
- + for (int y = 0; y <= ySteps; y++)
- + if (maze[x][y][1]) // get info from maze[x][y][1]
- + MazeAddGameObject(getRandomBoxId(), xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((1-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==2){
- + SendSysMessage("Maze Generate: placing level 2: walls of 1st floor, ground of microlevel");
- + for (int x = 0; x <= xSteps; x++)
- + for (int y = 0; y <= ySteps; y++)
- + if (maze[x][y][1]&&(((x+y)%4)!=0)) // get info from maze[x][y][1], but delete every 4th block
- + MazeAddGameObject(getRandomBoxId(), xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((2-1)*zStepSize), 0.0f);
- + }
- +//SendSysMessage("Maze Generate: skipping level 3: empty walls of 2st floor");
- +//SendSysMessage("Maze Generate: skipping level 4: empty roof of 2st floor");
- +
- + if (level==0||level==5){
- + SendSysMessage("Maze Generate: placing level 5: ground of 2nd floor");
- + for (int x = 0; x <= xSteps; x++)
- + for (int y = 0; y <= ySteps; y++){
- + if (!((x==1||x==xSteps-1)&&(y==1||y==ySteps-1)))
- + if (!maze[x][y][2])
- + MazeAddGameObject(13, xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((5-1)*zStepSize), 0.0f);
- + }
- + }
- +
- + if (level==0||level==6){
- + SendSysMessage("Maze Generate: placing level 6: walls of 2nd floor");
- + for (int x = 0; x <= xSteps; x++)
- + for (int y = 0; y <= ySteps; y++)
- + if (maze[x][y][2]) // get info from maze[x][y][2]
- + MazeAddGameObject(getRandomBoxId(), xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((6-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==7){
- + SendSysMessage("Maze Generate: placing level 7: walls of 2nd floor (only in center 1\4)");
- + for (int x = 1*xSteps/4; x <= 3*xSteps/4; x++)
- + for (int y = 1*ySteps/4; y <= 3*ySteps/4; y++)
- + if (maze[x][y][2]) // get info from maze[x][y][2], but placing only in center 1\4
- + MazeAddGameObject(getRandomBoxId(), xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((7-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==8){
- + SendSysMessage("Maze Generate: placing level 8: hole-roof of 2nd floor - hole-ground of 3rd floor ");
- + for (int x = 1*xSteps/4; x <= 3*xSteps/4; x++)
- + for (int y = 1*ySteps/4; y <= 3*ySteps/4; y++) // (only in center 1\4)
- + if ((((x+y)%2)!=0)||(x==1*xSteps/4||x==3*xSteps/4||y==1*ySteps/4||y==3*ySteps/4)) // every 2nd box to delete (except perimetr)
- + MazeAddGameObject(13, xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((8-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==9){
- + SendSysMessage("Maze Generate: placing level 9: walls of 3rd floor");
- + for (int x = 1*xSteps/4; x <= 3*xSteps/4; x++)
- + for (int y = 1*ySteps/4; y <= 3*ySteps/4; y++) // (only in center 1\4)
- + if (maze[x][y][3]) // get info from maze[x][y][3]
- + MazeAddGameObject(getRandomBoxId(), xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((9-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==10){
- + SendSysMessage("Maze Generate: placing level 10: walls(2) of 3rd floor");
- + for (int x = 1*xSteps/4; x <= 3*xSteps/4; x++)
- + for (int y = 1*ySteps/4; y <= 3*ySteps/4; y++) // (only in center 1\4)
- + if (maze[x][y][3]) // get info from maze[x][y][3]
- + MazeAddGameObject(getRandomBoxId(), xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((10-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==11){
- + SendSysMessage("Maze Generate: placing level 11: roof of 3rd floor (only in center 1\4)");
- + for (int x = 1*xSteps/4; x <= 3*xSteps/4; x++)
- + for (int y = 1*ySteps/4; y <= 3*ySteps/4; y++)
- + if (!((x==xSteps/2+width+1||x==xSteps/2-width-1)&&(y==ySteps/2+width+1||y==ySteps/2-width-1))) // holes on 1\4 corner
- + MazeAddGameObject(13, xStart+(x*xStepSize), yStart+(y*yStepSize), zStart+((11-1)*zStepSize), 0.0f);
- + }
- +
- + if (level==0||level==12){
- + int lvl = 12;
- + SendSysMessage("Maze Generate: placing level 12: walls and chests of 4th WIN-floor");
- + for (int i = xSteps/2-width; i<=xSteps/2+width; i++){
- + MazeAddGameObject(19, xStart+(i*xStepSize), yStart+yStepSize*(ySteps/2-1), zStart+((lvl-1)*zStepSize), 0.0f);
- + MazeAddGameObject(19, xStart+(i*xStepSize), yStart+yStepSize*(ySteps/2-width), zStart+((lvl-1)*zStepSize), 0.0f);
- + MazeAddGameObject(19, xStart+(i*xStepSize), yStart+yStepSize*(ySteps/2+1), zStart+((lvl-1)*zStepSize), 0.0f);
- + MazeAddGameObject(19, xStart+(i*xStepSize), yStart+yStepSize*(ySteps/2+width), zStart+((lvl-1)*zStepSize), 0.0f);
- + }
- + for (int i = ySteps/2-width; i<=ySteps/2+width; i++){
- + MazeAddGameObject(19, xStart+xStepSize*(xSteps/2-1), yStart+(i*yStepSize), zStart+((lvl-1)*zStepSize), 0.0f);
- + MazeAddGameObject(19, xStart+xStepSize*(xSteps/2-width), yStart+(i*yStepSize), zStart+((lvl-1)*zStepSize), 0.0f);
- + MazeAddGameObject(19, xStart+xStepSize*(xSteps/2+1), yStart+(i*yStepSize), zStart+((lvl-1)*zStepSize), 0.0f);
- + MazeAddGameObject(19, xStart+xStepSize*(xSteps/2+width), yStart+(i*yStepSize), zStart+((lvl-1)*zStepSize), 0.0f);
- + }
- + // maze win chests
- + //MazeAddGameObject(14, xStart+(xSteps/2-width/2)*xStepSize, yStart+(ySteps/2-width/2)*yStepSize, zStart+((lvl-1)*zStepSize), 0.0f);
- + //MazeAddGameObject(14, xStart+(xSteps/2-width/2)*xStepSize, yStart+(ySteps/2+width/2)*yStepSize, zStart+((lvl-1)*zStepSize), 0.0f);
- + //MazeAddGameObject(14, xStart+(xSteps/2+width/2)*xStepSize, yStart+(ySteps/2-width/2)*yStepSize, zStart+((lvl-1)*zStepSize), 0.0f);
- + //MazeAddGameObject(14, xStart+(xSteps/2+width/2)*xStepSize, yStart+(ySteps/2+width/2)*yStepSize, zStart+((lvl-1)*zStepSize), 0.0f);
- +
- + MazeAddGameObject(19, xStart+(xSteps/2)*xStepSize, yStart+(ySteps/2)*yStepSize, zStart+((lvl-1)*zStepSize), 0.0f); // central box
- + MazeAddGameObject(15, xStart+(xSteps/2)*xStepSize, yStart+(ySteps/2)*yStepSize, zStart+((lvl+0)*zStepSize), 0.0f); // win chest
- + }
- +
- + if (level==0||level==-2){
- + SendSysMessage("Maze Generate: placing staircases");
- +// center 1->3
- + MazeAddStaircase(xSteps/2, ySteps/2, 0, 4);
- + // corner 3->6
- + MazeAddStaircase(xSteps-1, ySteps-1, 2, 6);
- + MazeAddStaircase( 1, ySteps-1, 2, 6);
- + MazeAddStaircase(xSteps-1, 1, 2, 6);
- + MazeAddStaircase( 1, 1, 2, 6);
- +// center 6->9
- + MazeAddStaircase(xSteps/2, ySteps/2, 5, 6);
- +// 1\8 corner 9->13
- + MazeAddStaircase(xSteps/2+width+1, ySteps/2+width+1, 8, 8);
- + MazeAddStaircase(xSteps/2-width-1, ySteps/2+width+1, 8, 8);
- + MazeAddStaircase(xSteps/2+width+1, ySteps/2-width-1, 8, 8);
- + MazeAddStaircase(xSteps/2-width-1, ySteps/2-width-1, 8, 8);
- + }
- +
- + SendSysMessage("Maze Generate: done!");
- + return true;
- +}
- +
- +bool ChatHandler::MazeAddStaircase(int x, int y, int z, int height){
- + int i;
- + float dx, dy;
- + for (i = 0; i<height; i++){
- + switch(i%4){
- + case 0: dx= 1.0f; dy= 1.0f; break;
- + case 1: dx=-1.0f; dy= 1.0f; break;
- + case 2: dx=-1.0f; dy=-1.0f; break;
- + case 3: dx= 1.0f; dy=-1.0f; break;
- + }
- + MazeAddGameObject(12, xStart+(x*xStepSize)+dx, yStart+(y*yStepSize)+dy, zStart+(z*zStepSize)+(i*zStepSize/2), 0.0f);
- + }
- + return true;
- +}
- +
- +bool ChatHandler::MazeAddGameObject(int id, float x, float y, float z, float o)
- +{
- + const GameObjectInfo *gInfo = ObjectMgr::GetGameObjectInfo(id);
- +
- + if (!gInfo)
- + {
- + // PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
- + SetSentErrorMessage(true);
- + return false;
- + }
- +
- + if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
- + {
- + // report to DB errors log as in loading case
- + sLog.outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.",id, gInfo->type, gInfo->displayId);
- + // PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA,id);
- + SetSentErrorMessage(true);
- + return false;
- + }
- +
- + Map* map = sMapMgr.FindMap(MAZE_MAP_ID);
- +
- + GameObject* pGameObj = new GameObject;
- +
- + // used guids from specially reserved range (can be 0 if no free values)
- + uint32 db_lowGUID = sObjectMgr.GenerateStaticGameObjectLowGuid();
- + if (!db_lowGUID)
- + {
- + SendSysMessage(LANG_NO_FREE_STATIC_GUID_FOR_SPAWN);
- + SetSentErrorMessage(true);
- + return false;
- + }
- +
- + if (!pGameObj->Create(db_lowGUID, gInfo->id, map, 1, x, y, z, o))
- + {
- + delete pGameObj;
- + return false;
- + }
- +
- + // fill the gameobject data and save to the db
- + pGameObj->SetRespawnTime(86400); // 24 hours
- + pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), 1);
- +
- + // this will generate a new guid if the object is in an instance
- + if (!pGameObj->LoadFromDB(db_lowGUID, map))
- + {
- + delete pGameObj;
- + return false;
- + }
- +
- + DEBUG_LOG(GetMangosString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o);
- + map->Add(pGameObj);
- + sObjectMgr.AddGameobjectToGrid(db_lowGUID, sObjectMgr.GetGOData(db_lowGUID));
- + return true;
- +}
Advertisement
Add Comment
Please, Sign In to add comment