27/10/2017, 03:03
Point de controle
Afin de réparer (a ma sauce) la quete Les fortifications des Flammes infernales il m'est venu l'idée d'un script simple & générique qui pourrait être utilisé un peut partout . Il pourrait par exemple servir a contrôler un point de passage , de ressource ou pourquoi pas une ville .
Bref que quoi apporter un peut de stratégie et pousser au pvp , en gros c'est le champs de bataille " la vallée d'Alterac " partout ou vous voulez ^^
Le principe est simple : un drapeau pour l'alliance et un pour la horde . Chacun ayant un temps d'ouverture de 5s et un temp de recharge de30s
Lorsqu'un camp prend le drapeau sa aura pour effet de spawn des gardes de son camp a l'emplacement de trigger ( 15000161 ) et de despawn les gardes adverses dans un certains rayon ( @RAYON ), d'ou l'importance stratégique de ce drapeau dans le contrôle d'un lieu . Ces gardes resteront actif jusqu'a leurs mort ou la relance du serveur , une fois mort ils ne respawn pas sauf si un joueur réactive un drapeau .
- Afin que deux joueurs adverses ne passent pas leurs temps a cliquer sur ces drapeaux pendant un duel , ils ont un temps de recharge ( @GOBRECHARGE ).
- Au lancement du serveur lorsque personne n'a encore activé l'un de ces drapeaux , des gardes neutres seront spawn a la place des gardes de l'Alliance ou de la Horde ( @GARDENEUTRE ) .
- Un crédit peut etre retourné au joueur qui active le drapeau par le paramètre @CREDITA2/@CREDITH2 suivant sont camp .
Citation :#--- Mobs non spawn ne servant que pour le credit de quete
REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `femaleName`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `exp_unk`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `type_flags2`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `HealthModifierExtra`, `ManaModifier`, `ManaModifierExtra`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(15000249, 0, 0, 0, 0, 0, 29352, 0, 0, 0, "Desert des ossements : Credit tour A2", "", "Les esprits d'Auchindoun 11505 a2 - 11506 h2", '', 0, 1, 1, 0, 0, 35, 0, 1, 1.1428600549698, 1, 0, 0, 2000, 2000, 1, 1, 1, 6, 2048, 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, 'SmartAI', 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 128, '', 20173);
REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `femaleName`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `exp_unk`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `type_flags2`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `HealthModifierExtra`, `ManaModifier`, `ManaModifierExtra`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(15000250, 0, 0, 0, 0, 0, 29352, 0, 0, 0, "Desert des ossements : Credit tour H2", "", "Les esprits d'Auchindoun 11505 a2 - 11506 h2", '', 0, 1, 1, 0, 0, 35, 0, 1, 1.1428600549698, 1, 0, 0, 2000, 2000, 1, 1, 1, 6, 2048, 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, 'SmartAI', 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 128, '', 20173);
### ------------------------------------------------------------------Drapeau point de controle
SET @DRAPEAUA2 := 15000111; # Gob drapeau Alliance
SET @DRAPEAUH2 := 15000112; # Gob drapeau horde
SET @DISPLAYA2 := 8623; # Apparence bannière A2 - 8623
SET @DISPLAYH2 := 8621; # Apparence bannière H2 - 8621
SET @GARDEA2 := 18999; # ID garde si controlé par l'alliance
SET @GARDEH2 := 18973; # ID garde si controlé par la horde
SET @GARDENEUTRE := 21661; # ID monstre a l'init (lancement serveur)
SET @GOBRECHARGE := 30000; # 5mn = 300000
SET @RAYON := 50; # Rayon de spawn/despawn garde sur trigger 15000079
SET @CREDITA2 := 15000249; # Credit pour quete
SET @CREDITH2 := 15000250; # Credit pour quete
SET @TRIGGERSPAWN := 15000161; # point de spawn des gardes
#--- Alliance
REPLACE INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `Data6`, `Data7`, `Data8`, `Data9`, `Data10`, `Data11`, `Data12`, `Data13`, `Data14`, `Data15`, `Data16`, `Data17`, `Data18`, `Data19`, `Data20`, `Data21`, `Data22`, `Data23`, `Data24`, `Data25`, `Data26`, `Data27`, `Data28`, `Data29`, `Data30`, `Data31`, `Data32`, `unkInt32`, `AIName`, `ScriptName`, `VerifiedBuild`) VALUES
(@DRAPEAUA2, 10, @DISPLAYA2, 'Banniere Alliance', 'Attack', '', '', 11, 0, 1.5, 1949, 0, 0 , @GOBRECHARGE, 1, 0, 10000, 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, 'SmartGameObjectAI', '', -18019);
-- Banniere Alliance SAI
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@DRAPEAUA2;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@DRAPEAUA2 AND `source_type`=1;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@DRAPEAUA2,1,10,11,70,0,100,0,2,0,0,0,33,@CREDITA2,0,0,0,0,0,7,0,0,0,0,0,0,0," credit A2"),
(@DRAPEAUA2,1,11,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"fermer gossip"),
(@DRAPEAUA2,1,15,20,70,0,100,0,2,0,0,0,41,500,0,0,0,0,0,9,@GARDEA2,0,@RAYON,0,0,0,0," despawn A2 Doublon"),
(@DRAPEAUA2,1,20,25,61,0,100,0,0,0,0,0,12,@GARDEA2 ,8,0,0,0,0,9,@TRIGGERSPAWN,0,@RAYON,0,0,0,0," spawn A2"),
(@DRAPEAUA2,1,25,26,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,9,@GARDEH2,0,@RAYON,0,0,0,0," despawn H2"),
(@DRAPEAUA2,1,26,27,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,9,@GARDENEUTRE,0,@RAYON,0,0,0,0," despawn Neutre"),
(@DRAPEAUA2,1,27,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"fermer gossip"),
(@DRAPEAUA2,1,30,0,60,0,100,1,0,0,2000,2000,12,@GARDENEUTRE,7,0,0,0,0,9,@TRIGGERSPAWN,0,@RAYON,0,0,0,0," INIT spawn NEUTRE"),# uniquement sur 1 seul drap
(@DRAPEAUA2,1,50,0,60,0,100,0,0,0,3000,3000,19,15,0,0,0,0,0,9,@GARDEA2,0,@RAYON,0,0,0,0,"Anti bug unit_flag_15 A2"),
(@DRAPEAUA2,1,55,0,60,0,100,0,0,0,3000,3000,19,15,0,0,0,0,0,9,@GARDEH2,0,@RAYON,0,0,0,0,"Anti bug unit_flag_15 H2"),
(@DRAPEAUA2,1,60,0,60,0,100,0,0,0,3000,3000,19,15,0,0,0,0,0,9,@GARDENEUTRE,0,@RAYON,0,0,0,0,"Anti bug unit_flag_15 Neutre");
#--- Horde
REPLACE INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `Data6`, `Data7`, `Data8`, `Data9`, `Data10`, `Data11`, `Data12`, `Data13`, `Data14`, `Data15`, `Data16`, `Data17`, `Data18`, `Data19`, `Data20`, `Data21`, `Data22`, `Data23`, `Data24`, `Data25`, `Data26`, `Data27`, `Data28`, `Data29`, `Data30`, `Data31`, `Data32`, `unkInt32`, `AIName`, `ScriptName`, `VerifiedBuild`) VALUES
(@DRAPEAUH2, 10, @DISPLAYH2, 'Banniere Horde', 'Attack', '', '', 85, 0, 1.7999999523163, 1949, 0, 0 , @GOBRECHARGE, 1, 0, 10000, 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, 'SmartGameObjectAI', '', -18019);
-- Banniere Horde SAI
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@DRAPEAUH2;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@DRAPEAUH2 AND `source_type`=1;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@DRAPEAUH2,1,10,11,70,0,100,0,2,0,0,0,33,@CREDITH2,0,0,0,0,0,7,0,0,0,0,0,0,0," credit H2"),
(@DRAPEAUH2,1,11,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"fermer gossip"),
(@DRAPEAUH2,1,15,20,70,0,100,0,2,0,0,0,41,500,0,0,0,0,0,9,@GARDEH2,0,@RAYON,0,0,0,0," despawn H2 Doublon"),
(@DRAPEAUH2,1,20,25,61,0,100,0,0,0,0,0,12,@GARDEH2 ,8,0,0,0,0,9,@TRIGGERSPAWN,0,@RAYON,0,0,0,0," spawn H2"),
(@DRAPEAUH2,1,25,26,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,9,@GARDEA2,0,@RAYON,0,0,0,0," despawn A2"),
(@DRAPEAUH2,1,26,27,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,9,@GARDENEUTRE,0,@RAYON,0,0,0,0," despawn Neutre"),
(@DRAPEAUH2,1,27,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"fermer gossip");
Il ne vous restera plus après avoir placé ces drapeaux qu'a placer des trigger (15000161) tout au tour qui serviront de point de spawn aux gardes .
Voila , le script est très simple mais en l'adaptant il peut apporter une autre dimension au jeu