Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*######
- ## npc_daegarn
- ######*/
- enum
- {
- QUEST_DEFEAT_AT_RING = 11300,
- NPC_FIRJUS = 24213,
- NPC_JLARBORN = 24215,
- NPC_YOROS = 24214,
- NPC_OLUF = 23931,
- NPC_PRISONER_1 = 24253, // looks the same but has different abilities
- NPC_PRISONER_2 = 24254,
- NPC_PRISONER_3 = 24255,
- };
- const POSITION afSummon[] =
- {
- {838.81f, -4678.06f, -94.182f}
- };
- const POSITION afCenter[] =
- {
- {801.88f, -4721.87f, -96.143f}
- };
- class npc_daegarn : public CreatureScript
- {
- public:
- npc_daegarn() : CreatureScript("npc_daegarn") { }
- bool OnQuestAccept(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
- {
- IF (pQuest->GetQuestId() == QUEST_DEFEAT_AT_RING)
- {
- IF (npc_daegarnAI* pDaegarnAI = CAST_AI(npc_daegarn::npc_daegarnAI, pCreature->AI()))
- pDaegarnAI->StartEvent(pPlayer);
- }
- RETURN TRUE;
- }
- struct npc_daegarnAI : public ScriptedAI
- // TODO: make prisoners help (unclear IF summoned OR USING npc's from surrounding cages (summon inside small cages?))
- {
- npc_daegarnAI(Creature *pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- }
- bool m_bEventInProgress;
- uint64 uiPlayerGUID;
- void Reset()
- {
- m_bEventInProgress = false;
- uiPlayerGUID = 0;
- }
- void StartEvent(Player* pPlayer)
- {
- if (m_bEventInProgress)
- return;
- uiPlayerGUID = pPlayer->GetGUID();
- SummonGladiator(NPC_FIRJUS);
- }
- void JustSummoned(Creature* pSummon)
- {
- if (Player* pPlayer = me->GetPlayer(*me, uiPlayerGUID))
- {
- if (pPlayer->isAlive())
- {
- pSummon->RemoveUnitMovementFlag(MOVEMENTFLAG_SPLINE_ELEVATION);
- pSummon->GetMotionMaster()->MovePoint(0, afCenter[0]);
- return;
- }
- }
- Reset();
- }
- void SummonGladiator(uint32 uiEntry)
- {
- me->SummonCreature(uiEntry, afSummon[0], TEMPSUMMON_CORPSE_DESPAWN, 3000);
- }
- void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId)
- {
- Player* pPlayer = me->GetPlayer(*me, uiPlayerGUID);
- // could be group, so need additional here.
- if (!pPlayer || !pPlayer->isAlive())
- {
- Reset();
- return;
- }
- if (pSummoned->IsWithinDistInMap(pPlayer, 75.0f)) // ~the radius of the ring
- pSummoned->AI()->AttackStart(pPlayer);
- }
- void SummonedCreatureDespawn(Creature* pSummoned)
- {
- uint32 uiEntry = 0;
- // will eventually reset the event if something goes wrong
- switch(pSummoned->GetEntry())
- {
- case NPC_FIRJUS: uiEntry = NPC_JLARBORN; break;
- case NPC_JLARBORN: uiEntry = NPC_YOROS; break;
- case NPC_YOROS: uiEntry = NPC_OLUF; break;
- case NPC_OLUF: Reset() return;
- }
- SummonGladiator(uiEntry);
- }
- };
- CreatureAI *GetAI(Creature *creature) const
- {
- return new npc_daegarnAI(creature);
- }
- };
- UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151;
- -- Firjus the Soul Crusher
- SET @ENTRYF:=24213;
- UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRYF;
- DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRYF;
- 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
- (@ENTRYF,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firjus the Soul Crusher - Yell ON Aggro'),
- (@ENTRYF,0,1,0,0,0,100,0,3000,4000,5000,6000,11,15284,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Firjus the Soul Crusher - CAST Cleave'),
- (@ENTRYF,0,2,0,0,0,75,0,5000,6000,7000,8000,11,43348,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Firjus the Soul Crusher - CAST Head Crush');
- DELETE FROM `creature_text` WHERE `entry`=@ENTRYF;
- INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
- (@ENTRYF,0,0, 'Firjus fears nothing! Release the combatants!',1,0,100,0,0,0, 'Firjus the Soul Crusher yell');
- -- Jlarborn the Strategist
- SET @ENTRYJ:=24215;
- UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRYJ;
- DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRYJ;
- 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
- (@ENTRYJ,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Jlarborn the Strategist - Yell ON Aggro'),
- (@ENTRYJ,0,1,0,9,0,100,0,8,25,20000,25000,11,15749,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Jlarborn the Strategist - CAST Shield Charge'),
- (@ENTRYJ,0,2,0,0,0,75,0,2000,2000,6000,6000,11,8374,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Jlarborn the Strategist - CAST Arcing Smash'),
- (@ENTRYJ,0,3,0,13,0,75,0,1000,6000,0,0,11,38233,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Jlarborn the Strategist - CAST Shield Bash'),
- (@ENTRYJ,0,4,0,0,0,100,0,7000,11000,11000,18000,11,12169,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Jlarborn the Strategist - CAST Shield Block');
- DELETE FROM `creature_text` WHERE `entry`=@ENTRYJ;
- INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
- (@ENTRYJ,0,0, 'Firjus was unworthy! Test your battle prowess against a TRUE soldier OF the Lich King!',1,0,100,0,0,0, 'Jlarborn the Strategist');
- -- Yorus the Flesh Harvester
- SET @ENTRYY:=24214;
- UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRYY;
- DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRYY;
- 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
- (@ENTRYY,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Yorus the Flesh Harvester - Yell ON Aggro'),
- (@ENTRYY,0,1,0,0,0,100,0,3000,4000,5000,6000,11,15284,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Yorus the Flesh Harvester - CAST Cleave'),
- (@ENTRYY,0,2,0,0,0,75,0,15000,15000,30000,30000,11,41056,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Yorus the Flesh Harvester - CAST Whirlwind');
- DELETE FROM `creature_text` WHERE `entry`=@ENTRYY;
- INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
- (@ENTRYY,0,0,'Good... More flesh FOR the harvest...',1,0,100,0,0,0, 'Yorus the Flesh Harvester yell');
- -- Oluf the Violent
- SET @ENTRYO:=23931;
- UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRYO;
- DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRYO;
- 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
- (@ENTRYO,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Oluf the Violent - Yell ON Aggro'),
- (@ENTRYO,0,1,0,0,0,100,0,3000,5000,5000,7000,11,15284,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Oluf the Violent - CAST Cleave'),
- (@ENTRYO,0,2,0,0,0,100,0,4000,4000,17200,25200,11,13730,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Oluf the Violent - CAST Demoralizing Shout'),
- (@ENTRYO,0,3,0,0,0,100,0,15000,15000,30000,30000,11,41056,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Oluf the Violent - CAST Whirlwind'),
- (@ENTRYO,0,4,0,9,0,100,0,10,20,1000,1000,11,6533,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Oluf the Violent - CAST Net'),
- (@ENTRYO,0,5,0,9,0,100,0,15,30,2000,2000,11,42870,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Oluf the Violent - CAST Throw Dragonflayer Harpoon'),
- (@ENTRYO,0,6,0,6,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Oluf the Violent - Notify'),
- (@ENTRYO,0,7,0,6,0,100,0,0,0,0,0,11,43326,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Oluf the Violent - Spawn Ancient Cipher');
- DELETE FROM `creature_text` WHERE `entry`=@ENTRYO;
- INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
- (@ENTRYO,0,0, 'The ring will overflow WITH the blood OF the interlopers! Oluf has come!',1,0,100,0,0,0, 'Oluf the Violent yell');
- (@ENTRYO,1,0, 'The ancient cipher falls ON the ground.',3,0,100,0,0,0, 'Oluf the Violent notify');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement