Advertisement
Easelm

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

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