Advertisement
Easelm

Dire Maul Arena Event ~ By QQrofl/Faded (Header File)

May 27th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 12.09 KB | None | 0 0
  1. /*******************************************************************************************
  2. *                        __                           __ _                                 *
  3. *                     /\ \ \___  _ __ ___  ___  ___  / _| |_                               *
  4. *                    /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|                              *
  5. *                   / /\  / (_) | | | | | \__ \ (_) |  _| |_                               *
  6. *                   \_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|   - www.Nomsoftware.com -    *
  7. *                               The policy of Nomsoftware states: Releasing our software   *
  8. *                               or any other files are protected. You cannot re-release    *
  9. *                               anywhere unless you were given permission.                 *
  10. *                           (C) Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.      *
  11. ********************************************************************************************/
  12. /**********************************************************
  13. **********************************************************
  14.  *                      Title:                          *
  15.   *            NPC Arena Battle(Dire Maul)             *
  16.    *                                                  *
  17.     *             Idea by: QQrofl                    *
  18.      *            Sub-Ideas by: Foereaper           *
  19.       *            Scripted by: QQrofl             *
  20.        *            Fondled by: Faded             *
  21.         *    Mental Support by: Foereaper        *
  22.          *                                      *
  23.           *   (C)Nomsoftware 'Nomsoft' 2012    *
  24.            *##################################*#####################*
  25.            *        MAIN SPAWN                                      *
  26.            *    Arena Commander:                                    *
  27.            *    -3815.866699f, 1102.770874f, 132.355194f, 6.182988f *
  28.            *########################################################*/
  29. #include "ScriptPCH.h"
  30. using namespace std;
  31.  
  32. /* Player */
  33. uint64 m_PlayerGUID;
  34. string playerName;
  35. /* Is Active */
  36. bool isBattleActive = false;
  37. /* Is Bosses Dead */
  38. int isWaveBossDead = 0;
  39.  
  40. #define MSG_FIGHT_COMPUTER "I would like to fight!"
  41.  
  42. enum Events
  43. {
  44.     EVENT_NONE,
  45.     EVENT_CHECK_ACTIVITY, // Check Activity of the battle : if true or false ? can start?
  46.     EVENT_CHECK_WAVES, // Checks the waves so it can move on to the next event, if it is allowed
  47.     EVENT_CHECK_PLAYER,
  48.     EVENT_FIRST_WAVE,
  49.     EVENT_FIRST_WAVE_TREAT,
  50.     EVENT_FIRST_WAVE_ELITE,
  51.     EVENT_SECOND_WAVE,
  52.     EVENT_SECOND_WAVE_TREAT,
  53.     EVENT_SECOND_WAVE_ELITE,
  54.     EVENT_FINAL_WAVE_BOSS,
  55.     EVENT_COMPLETED_WAVES,
  56. };
  57.  
  58. enum bPhases
  59. {
  60.     /* Final Boss Phases */
  61.     PHASE_START_COMBAT,
  62.     PHASE_END,
  63. };
  64.  
  65. enum SpellIds
  66. {
  67.     /* First Wave Spells */
  68.     /* Red Blood Guard */
  69.     SPELL_BERSERKER_CHARGE = 38907,
  70.     SPELL_MORTAL_STRIKE = 68783,
  71.     SPELL_DEEP_WOUNDS = 23256,
  72.     /* First Wave Treat Spells */
  73.     SPELL_ROOT_AURA = 43956,
  74.     /* First Wave Elite Spells */
  75.     /* `- Spore Healer */
  76.     SPELL_HEAL_REGROWTH = 48443, //heal+H.O.T.
  77.     SPELL_HEAL_NORMAL = 48378, //heal normal
  78.     SPELL_HEAL_REJUV = 48441, //H.O.T.
  79.     SPELL_HEAL_AURA_HOTS = 38299, // Aura hots
  80.     SPELL_FLASH_HEAL = 48071,
  81.     SPELL_POWER_WORD_SHIELD = 20697, // Absorbs a ton of damage
  82.     SPELL_HEAL_LIFEBLOOM = 67958,
  83.     /* `- Hank the Tank */
  84.     SPELL_BATTLE_STANCE = 2487, //warrior bstance
  85.     SPELL_SHOUT_BUFF = 47436,   //attk pwr self buff
  86.     SPELL_TANK_CHARGE = 11578//warrior charge
  87.     SPELL_GROUND_STOMP = 47502, //thunderclap
  88.     SPELL_EXECUTE = 47471,      //normal strike
  89.     SPELL_TANK_STRIKE = 47450//normal strike
  90.     SPELL_INCREASE_BLOCK_VALUE = 67515, // Increases block value
  91.     SPELL_SHIELD_BLOCK = 69580, // Blocks attacks
  92.     SPELL_INCREASE_DEFENSE_RATING = 60343, // Increases Defense by 180+
  93.     SPELL_INCREASE_DODGE_RATING = 18062, // Increase dodge by 96
  94.     SPELL_REND = 47465, // Rends the target ~Bleeds
  95.     SPELL_SHIELD_BASH = 47488, // Bashes the target with a shield
  96.     /* Second Wave Spells */
  97.     SPELL_ROGUE_STEALTH = 1784,
  98.     SPELL_ROGUE_CHEAP_SHOT = 1833, //in stealth only
  99.     SPELL_ROGUE_STRIKE = 48660,
  100.     SPELL_ROGUE_FINISHER = 48668,
  101.     SPELL_ROGUE_VANISH = 26889, //idea here is to make the sidekicks(and main?) vanish in/out of the fight
  102.     SPELL_ROGUE_KICK = 27814,
  103.     SPELL_ROGUE_BACKSTAB = 52540,
  104.     SPELL_ROGUE_RUPTURE = 48672,
  105.     SPELL_ROGUE_KIDNEY_SHOT = 41389,
  106.     /* Second Wave Treat Spells */
  107.     SPELL_UNHOLY_BONE_SHIELD = 49222,
  108.     SPELL_UNHOLY_AOE = 49938,
  109.     SPELL_UNHOLY_PLAGUE_STRIKE = 49921,
  110.     SPELL_UNHOLY_STANGULATE = 47476,
  111.     SPELL_UNHOLY_DEATH_STRIKE = 49924,
  112.     SPELL_UNHOLY_ARMY = 42650, // <- should happen with both NPC's simultaneously
  113.     SPELL_ENRAGE = 59707,
  114.     /* Second Wave Elite Spells */
  115.     /*  `- Rider Brutes */
  116.     SPELL_RIDERS_LIGHTNING = 59159, // aoe
  117.     SPELL_RIDERS_CHAIN_LIGHTNING = 49269, // aoe
  118.     SPELL_RIDERS_MOONFIRE = 48463,
  119.     SPELL_RIDERS_STORM = 48467, // aoe
  120.     /*  `- Rider Healer */
  121.     SPELL_RIDERS_STAM_BUFF = 48161, // fortitude buff
  122.     SPELL_RIDERS_SHIELD = 48066, // absorbs damage
  123.     SPELL_RIDERS_HEALING_BOLT = 66097,
  124.     SPELL_RIDERS_RENEW = 48068,
  125.     SPELL_RIDERS_GREATER_HEAL = 48063,
  126.     /* Final Wave Boss Spells */
  127.     SPELL_DRAGON_FIRE_SHIELD = 57108, //Reduces damage by 95% for 5s
  128.     SPELL_DRAGON_ENGULF = 74562,
  129.     SPELL_DRAGON_BREATH = 74525,
  130.     SPELL_DRAGON_TAIL_WHIP = 74531,
  131.     SPELL_DRAGON_BERSERK = 26662,
  132.     SPELL_DRAGON_CLAW = 74524,
  133.     SPELL_DRAGON_MASSIVE_FLAMESTRIKE = 26558,
  134.     //SPELL_DRAGON_FIREBALL_BARRAGE = 37541,
  135.     /* Others */
  136.     SPELL_TELEPORT_VISUAL = 64446,
  137. };
  138.  
  139. enum SpawnIds
  140. {
  141.     /* First Wave */
  142.     NPC_RED_BLOOD_GUARD =         88001,
  143.     NPC_RED_BLOOD_GUARD_MINI =    88002,
  144.     NPC_RED_BLOOD_GUARD_MINI2 =   88003,
  145.     NPC_RED_BLOOD_GUARD_MINI3 =   88004,
  146.     /* First Wave Treat */
  147.     NPC_WAVE_SPAWN_TRIGGER =      88500,
  148.     NPC_GARM_WATCHER       =      80050,
  149.     NPC_FRIGID_PROTO_DRAKE =      80051,
  150.     NPC_OSTERKILGR         =      80052,
  151.     NPC_BLIGHT_FALCONER    =      80053,
  152.     NPC_CONVERTED_HERO     =      80054,
  153.     NPC_PORTAL =                  88501,
  154.     /* First Wave Elite */                  /* NPC : Display ID */
  155.     NPC_HANK_THE_TANK  =          88011,    // Tank: 27930 Paladin Tank BE
  156.     NPC_FIELD_MEDIC  =            88012,    // Healer: 17544 Spore thing
  157.     /* Second Wave */
  158.     NPC_ROGUE_INITIATE =          88013, // Main rogue: 24918
  159.     NPC_ROGUE_INITIATE_1 =        88014, // Sidekick(easier to kill): 24919
  160.     NPC_ROGUE_INITIATE_2 =        88015, // Sidekick(easier to kill): 24919
  161.     /* Second Wave Treat */
  162.     NPC_THE_UNHOLY =              88016, // Main: 25446
  163.     NPC_THE_UNHOLY_TWIN =         88017, // Twin: 25496
  164.     NPC_THE_UNHOLY_PET =          88018, // Their Pet: 25467 (no spells, normal attacks just to occupy the player) Maybe just SPELL_PET_BITE ?
  165.     /* Second Wave Elite */
  166.     NPC_RIDERS_OFTHE_ICE =        88019, // Main/Healer: 25083
  167.     NPC_RIDERS_OFTHE_ICE_1 =      88020, // Brute: 25082
  168.     NPC_RIDERS_OFTHE_ICE_2 =      88021, // Brute: 25082
  169.     /* Final Wave Boss */
  170.     NPC_DRAGON_BOSS =             88022, // Dragon: 25015
  171.     NPC_DRAGON_BOSS_TRIGGER =     88023,
  172.     GOBJECT_DRAGON_BOSS_RUNE =    183036,
  173. };
  174.  
  175. enum eEnums
  176. {
  177.     ITEM_INTRAVENOUS_HEALING_POTION = 44698, // You can change the items they can heal with here
  178.     DIRE_MAUL_ZONE = 2557,
  179.     DIRE_MAUL_AREA = 357, //3217,
  180.     PVP_END_TOKEN = 47241, // You can easily change this
  181.     SOUND_HORN_WAVE_START = 7054,
  182.     SOUND_WAVE_COMPLETE = 8571,
  183. };
  184.  
  185. struct DragonMove
  186. {
  187.     uint32 gobject;
  188.     uint32 spellId;
  189.     float x, y, z, o;
  190. };
  191.  
  192. static DragonMove sMoveData[] =
  193. {
  194.     {GOBJECT_DRAGON_BOSS_RUNE, SPELL_DRAGON_MASSIVE_FLAMESTRIKE, -3786.241943f, 1096.538452f, 153.903366f, 6.257603f }
  195. };
  196.  
  197. #define MAX_WAVE_SPAWN_LOCATIONS 20
  198. const uint32 waveList[MAX_WAVE_SPAWN_LOCATIONS] =
  199. {
  200.        /* First Wave Ids */
  201.        NPC_RED_BLOOD_GUARD,
  202.        /* First Wave Treat Ids */
  203.        NPC_WAVE_SPAWN_TRIGGER, NPC_GARM_WATCHER, NPC_FRIGID_PROTO_DRAKE, NPC_OSTERKILGR, NPC_BLIGHT_FALCONER, NPC_CONVERTED_HERO, NPC_PORTAL,
  204.        /* First Wave Elite Ids */
  205.        NPC_HANK_THE_TANK, NPC_FIELD_MEDIC,
  206.        /* Second Wave Ids */
  207.        NPC_ROGUE_INITIATE, NPC_ROGUE_INITIATE_1, NPC_ROGUE_INITIATE_2,
  208.        /* Second Wave Treat Ids */
  209.        NPC_THE_UNHOLY, NPC_THE_UNHOLY_TWIN, NPC_THE_UNHOLY_PET,
  210.        /* Second Wave Elite Ids */
  211.        NPC_RIDERS_OFTHE_ICE, NPC_RIDERS_OFTHE_ICE_1, NPC_RIDERS_OFTHE_ICE_2,
  212.        /* Final Wave Boss */
  213.        NPC_DRAGON_BOSS,
  214. };
  215.  
  216. static Position m_WaveSpawns[] =
  217. {
  218.     /*    X               Y            Z           O      */
  219.                  /* All Waves Spawns */
  220.     { -3756.859863f, 1097.575317f, 131.969559f, 6.159780f },
  221.                  /* First Wave Treat */
  222.     { -3760.98f, 1082.98f, 131.96f, 0.214342f }, // Portal 1 Location
  223.     { -3751.31f, 1106.84f, 131.96f, 5.364266f }  // Portal 2 Location
  224. };
  225.  
  226. void MessageOnWave(Creature * me, uint32 eventId)
  227. {
  228.     stringstream ss;
  229.     switch(eventId)
  230.     {
  231.        case EVENT_CHECK_ACTIVITY: // Before Wave 1 starts
  232.            ss << playerName.c_str()
  233.               << " get ready! Next wave begins in 10 seconds!";
  234.            break;
  235.  
  236.        case EVENT_CHECK_WAVES:
  237.            {
  238.                if( isWaveBossDead == 1)
  239.                {
  240.                    ss << "I can't believe it! "
  241.                       << playerName.c_str()
  242.                       << " has killed the Red Blood Guard! We will see next wave, which is in 25 seconds, gear up!";
  243.                }
  244.                else if (isWaveBossDead == 2)
  245.                {
  246.                    ss << "This is unreal! "
  247.                       << playerName.c_str()
  248.                       << " has dominated the treat wave! Next wave is in 35 seconds! Get ready for a good experience.";
  249.                }
  250.                else if (isWaveBossDead == 3)
  251.                {   
  252.                    ss << "Holy shit! "
  253.                       << playerName.c_str()
  254.                       << " has demolished the elite! Good luck getting through the others... Second wave begins in 25 seconds! You may want to heal...";
  255.                }
  256.                else if (isWaveBossDead == 4)
  257.                {
  258.                    ss << "Excellent! "
  259.                       << playerName.c_str()
  260.                       << " has stricken down the rogues! Well done! Next wave is in 35 seconds, be prepared!";
  261.                }
  262.                else if (isWaveBossDead == 5)
  263.                {
  264.                    ss << "Zing! I can't believe what I'm seeing! "
  265.                       << playerName.c_str()
  266.                       << " has defeated the Unholy Twins, EPIC WIN! Next wave in 40 seconds, get ready!";
  267.                }
  268.                else if (isWaveBossDead == 6)
  269.                {
  270.                    ss << "WOW! No Way! "
  271.                       << playerName.c_str()
  272.                       << " has stopped the riders dead in their tracks. Great job! Final wave beings in 35 seconds, get buffed up!";
  273.                }
  274.                else if (isWaveBossDead == 7)
  275.                {
  276.                    ss << "Just...a moment of silence. "
  277.                       << playerName.c_str()
  278.                       << " has just won this entire challenge! Congratulations!";
  279.                }
  280.            }break;
  281.  
  282.        case EVENT_FIRST_WAVE:
  283.            ss << "First wave has begun!"
  284.               << " From the blood gates of hell, here is,"
  285.               << " Arena Master, Red Blood Guard!";
  286.            break;
  287.  
  288.        case EVENT_FIRST_WAVE_TREAT:
  289.            ss << "First treat wave has begun!"
  290.               << " Bounding across the continent, you will face many challenges!";
  291.            break;
  292.  
  293.        case EVENT_FIRST_WAVE_ELITE:
  294.            ss << "First elite wave has begun!"
  295.               << " Say your last words, this elite team wont give you another chance to."
  296.               << " Entering the arena, Hank the Tank and his heal happy spore companion. Prepare for the worst!";
  297.            break;
  298.          
  299.        case EVENT_SECOND_WAVE:
  300.            ss << "Second wave has begun!"
  301.               << " Trust your eyes and dont blink, this team of initiates only provide pain!"
  302.               << " The quick, the stealthy.. The Rogue Initiates, maybe run?";
  303.            break;
  304.        
  305.        case EVENT_SECOND_WAVE_TREAT:
  306.           ss << "Second treat wave has begun!"
  307.              << " From the depths of the underworld, they were sent back here to take care of business!"
  308.              << " The deadliest duo, the Unholy Twins - Seal your fate, destroy them!";
  309.            break;
  310.        
  311.        case EVENT_SECOND_WAVE_ELITE:
  312.           ss << "Second elite wave has begun!"
  313.              << " The Riders of the Ice have entered the arena!"
  314.              << " Don't be fooled by their size, they will walk all over you. Attack!";
  315.            break;
  316.            
  317.        case EVENT_FINAL_WAVE_BOSS:
  318.           ss << "From deep into the Earth's core "
  319.              << " there lies a entirely different aspect of a challenge. "
  320.              << " Get Ready! Arena Dragon is here!";
  321.            break;
  322.     }
  323.     me->MonsterYell(ss.str().c_str(), LANG_UNIVERSAL, me->GetGUID());
  324. }
  325.  
  326. void AddEndRewards(Player * player, uint32 honoramount, uint32 tokenId, uint32 tokenAmount)
  327. {
  328.     uint32 curHonor = player->GetHonorPoints();
  329.     player->SetHonorPoints(curHonor + honoramount);
  330.     ChatHandler(player).PSendSysMessage("Added %u honor!", honoramount);
  331.     player->AddItem(tokenId, tokenAmount);
  332. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement