[C++][Share..ish] Level Helper menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++][Share..ish] Level Helper

    The Level Helper



    This is the level helper that Performer released a while ago. I haven't talked to him in a while, but I'm releasing the updated version of it for 1-80.
    (As Hypnotic WoW is closed down.. I don't see any use for it to just sit in the SVN. )

    Edited by yours truly, it is now easy to read, and you might learn a thing or two from it.


    There is a bit of a guide at the bottom of the thread on how to edit it to your liking. I have included some comments in the script to help people understand whats happening. If you don't know how to compile a DLL, I would suggest looking at SectorSevens guide.


    Source:
    Code:
    /*Made by Performer of MMOwned and HypnoticWoW (www.hypnotic-wow.net)
    give proper credits when re-releasing this script.
    
    Performer, 30th September 2008*/
    
       
     #include "StdAfx.h"
     #include "Setup.h"
    
      #define STONEID 120001 //This is the ID of the item in your DB
    
      class SCRIPT_DECL LevelHelper : public GossipScript
    {
        public:
            void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
            void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
            void GossipEnd(Object * pObject, Player* Plr);
            void Destroy()
            {
                delete this;
            }
    };
    
    void LevelHelper::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
        if(Plr->CombatStatus.IsInCombat())
        {
            Plr->BroadcastMessage("You are in combat!");
            return;
        }
    
        GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
        if(Plr->GetTeam() == 0)    //Returns players team. 0 = Alliance, 1 = Horde
        {
            Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->SendTo(Plr);
        }
        else
        {
            Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->SendTo(Plr);
        }
    
        if(AutoSend)
            Menu->SendTo(Plr);
    }
    
    void LevelHelper::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
        GossipMenu * Menu;
        switch(IntId) 
        {
            case 40:  //Alliance Level Locations
            {
                if(Plr->getLevel() >= 1 && Plr->getLevel() <= 9)
                {
                    Plr->BroadcastMessage("I suggest killing a few monsters until you are level 10.");
                }
                else
                if(Plr->getLevel() >= 10 && Plr->getLevel() <= 13)
                {
                    Plr->EventTeleport(0, -4803.404785, -2927.534912, 328.762360); // Teleports the player to the location givin.
                    Plr->Gossip_Complete();                                               //Loch Modan
                }
                else
                if(Plr->getLevel() >= 14 && Plr->getLevel() <= 17)
                {
                    Plr->EventTeleport(0, -9703.644531, -2209.830811, 57.845242);
                    Plr->Gossip_Complete();                                               //Redridge Mountains
                }
                else
                if(Plr->getLevel() >= 18 && Plr->getLevel() <= 21)
                {
                    Plr->EventTeleport(0, -11123.652344, 1190.825439, 64.072624);
                    Plr->Gossip_Complete();                                               //Dagger Hills, Westfall
                }
                else
                if(Plr->getLevel() >= 22 && Plr->getLevel() <= 25)  
                {
                    Plr->EventTeleport(0, -9277.922852, -3028.409424, 118.868683);
                    Plr->Gossip_Complete();                                               //Redridge Mountains, Blackrock Keep
                }
                else
                if(Plr->getLevel() >= 26 && Plr->getLevel() <= 29)
                {
                    Plr->EventTeleport(0, -10967.732422, -269.651428, 22.439180);
                    Plr->Gossip_Complete();                                               //Duskwood, Ogre Mound
                }
                else
                if(Plr->getLevel() >= 30 && Plr->getLevel() <= 33)
                {
                    Plr->EventTeleport(0, -11643.402344, -560.218262, 33.483208);
                    Plr->Gossip_Complete();                                               //Stranglethorn Vale, Druggie Camp
                }
                else
                if(Plr->getLevel() >= 34 && Plr->getLevel() <= 37)
                {
                    Plr->EventTeleport(0, -11930.924805, -593.189575, 16.999115);
                    Plr->Gossip_Complete();                                               //Stranglethorn Vale, Goblin Oil Rig
                }
                else
                if(Plr->getLevel() >= 38 && Plr->getLevel() <= 41)
                {
                    Plr->EventTeleport(0, -12898.222656, -789.831116, 51.99805);
                    Plr->Gossip_Complete();                                               //Stranglethorn Vale, Troll Ruins
                }
                else
                if(Plr->getLevel() >= 42 && Plr->getLevel() <= 45)
                {
                    Plr->EventTeleport(0, -6726.391602, -1628.368042, 193.653915);
                    Plr->Gossip_Complete();                                               //Searing Gorge, Dwarf underground place
                }
                else
                if(Plr->getLevel() >= 46 && Plr->getLevel() <= 49)
                {
                    Plr->EventTeleport(0, -10900.470703, -2933.303223, 12.872971);
                    Plr->Gossip_Complete();                                               //Blasted Lands. Near Entrance
                }
                else
                if(Plr->getLevel() >= 50 && Plr->getLevel() <= 53)
                {
                    Plr->EventTeleport(0, -11240.953125, -3340.238770, 9.179361);
                    Plr->Gossip_Complete();                                               //Blasted Lands. Serpent's Coil
                }
                else
                if(Plr->getLevel() >= 54 && Plr->getLevel() <= 57)
                {
                    Plr->EventTeleport(0, 2726.371826, -1679.125854, 126.680740);
                    Plr->Gossip_Complete();                                               //WPL, Hearthglen!
                }
                else
                if(Plr->getLevel() >= 58 && Plr->getLevel() <= 61)
                {
                    Plr->EventTeleport(530, -796.510498, 2181.584229, 10.901132);
                    Plr->Gossip_Complete();                                               //Hellfire Peninsula, Valley of Bones
                }
                else
                if(Plr->getLevel() >= 62 && Plr->getLevel() <= 64)
                {
                    Plr->EventTeleport(530, -473.192444, 3729.304688, 29.000946);
                    Plr->Gossip_Complete();                                               //Hellfire Peninsula, The Great Fissure
                }
                else
                if(Plr->getLevel() >= 65 && Plr->getLevel() <= 66)
                {
                    Plr->EventTeleport(530, -2699.693604, 6406.205566, 37.739193);
                    Plr->Gossip_Complete();                                               //Nagrand, Kil'sorrow Fortress
                }
                else
                if(Plr->getLevel() >= 67 && Plr->getLevel() <= 68)
                {
                    Plr->EventTeleport(530, 2332.901367, 2597.108398, 127.917793);
                    Plr->Gossip_Complete();                                               //Netherstorm, Bloodelf Camp
                }
                else
                if(Plr->getLevel() >= 69 && Plr->getLevel() <= 70)
                {
                    Plr->EventTeleport(530, 4366.186523, 3245.312744, 146.430984);
                    Plr->Gossip_Complete();                                               //Netherstorm, Legion Camp
                }
                else
                if(Plr->getLevel() >= 70 && Plr->getLevel() <= 71)
                {
                    Plr->EventTeleport(571, 1043.915649, -4395.568359, 161.937683);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 72 && Plr->getLevel() <= 73)
                {
                    Plr->EventTeleport(571, 3750.131104, -11020.486206, 120.679367);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 74 && Plr->getLevel() <= 75)
                {
                    Plr->EventTeleport(571, 3801.111816, -3839.009003, 175.423004);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 76 && Plr->getLevel() <= 77)
                {
                    Plr->EventTeleport(571, 6962.209961, -1576.280029, 879.349976);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 78 && Plr->getLevel() <= 79)
                {
                    Plr->EventTeleport(571, 7021.106445, -1684.665649, 819.533203);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 80)
                {
                    Plr->BroadcastMessage("You no longer need the level helper");
                }
    
            }break;
        
    
            case 50:  //Horde Level Locations
            {
                if(Plr->getLevel() >= 1 && Plr->getLevel() <= 9)
                {
                    Plr->BroadcastMessage("I suggest killing a few monsters until you are level 10.");
                }    
                else
                if(Plr->getLevel() >= 10 && Plr->getLevel() <= 13)
                {
                    Plr->EventTeleport(1, -39.206371, -2956.889648, 94.633240);           //The Barrens, Thorn Hill
                }
                else
                if(Plr->getLevel() >= 14 && Plr->getLevel() <= 17)
                {
                    Plr->EventTeleport(530, 7215.870117, -7456.700195, 55.805698);        //Ghostlands, Zeb'Nowa
                }
                else
                if(Plr->getLevel() >= 18 && Plr->getLevel() <= 21)
                {
                    Plr->EventTeleport(1, -3883.204102, -1695.575195, 92.901695);         //The Barrens, Blackthorn Ridge
                }
                else
                if(Plr->getLevel() >= 22 && Plr->getLevel() <= 25)
                {
                    Plr->EventTeleport(1, -4971.795410, -2152.113525, -36.372494);        //Thousand Needles, Splithoof Crag
                }
                else
                if(Plr->getLevel() >= 26 && Plr->getLevel() <= 29)
                {
                    Plr->EventTeleport(1, -4986.696777, -1946.943115, 82.353615);         //Thousand Needles, Darkcloud Pinnacle
                }
                else
                if(Plr->getLevel() >= 30 && Plr->getLevel() <= 33)
                {
                    Plr->EventTeleport(0, -1713.078247, -3172.283203, 28.566423);         //Arathi Highlands, Witherbark Village
                }
                else
                if(Plr->getLevel() >= 34 && Plr->getLevel() <= 37)
                {
                    Plr->EventTeleport(0, -1583.758545, -3105.699707, 24.253660);         //Arathi Highlands, Go'Shek Farm
                }
                else
                if(Plr->getLevel() >= 38 && Plr->getLevel() <= 41)
                {
                    Plr->EventTeleport(1, -3764.590332, -3445.596191, 37.592896);         //Dustwallow Marsh, Direhorn Post
                }
                else
                if(Plr->getLevel() >= 42 && Plr->getLevel() <= 45)
                {
                    Plr->EventTeleport(1, -7342.144043, -4560.302246, 10.579253);         //Tanaris, Waterspring Field
                }
                else
                if(Plr->getLevel() >= 46 && Plr->getLevel() <= 49)
                {
                    Plr->EventTeleport(1, -7980.592285, -5320.064453, 12.382618);         //Tanaris, Lost Rigger Cove
                }
                else
                if(Plr->getLevel() >= 50 && Plr->getLevel() <= 53)
                {
                    Plr->EventTeleport(0, 1146.042725, -1765.793091, 61.565624);          //Western Plaguelands, Sorrow Hill
                }
                else
                if(Plr->getLevel() >= 54 && Plr->getLevel() <= 57)
                {
                    Plr->EventTeleport(0, 1308.166992, -1234.708862, 62.679840);          //Western Plaguelands, Ruins of Angorhal
                }
                else
                if(Plr->getLevel() >= 58 && Plr->getLevel() <= 61)
                {
                    Plr->EventTeleport(530, -1148.066162, 2676.270752, 2.865906);         //Hellfire Peninsula, Expedition Armory
                }
                else
                if(Plr->getLevel() >= 62 && Plr->getLevel() <= 64)
                {
                    Plr->EventTeleport(530, -2350.550293, 3338.223633, -2.462904);        //Terrokkar Forest, Firewing Point
                }
                else
                if(Plr->getLevel() >= 65 && Plr->getLevel() <= 66)
                {
                    Plr->EventTeleport(530, -2501.895752, 8022.805176, 48.207684);        //Nagrand, Spirit Fields
                }
                else
                if(Plr->getLevel() >= 67 && Plr->getLevel() <= 68)
                {
                    Plr->EventTeleport(530, 3638.767822, 6781.376465, 132.400421);        //Blade's Edge Mountains, Raven's Wood
                }
                else
                if(Plr->getLevel() >= 69 && Plr->getLevel() <= 70)
                {
                    Plr->EventTeleport(530, -2929.804688, 1612.546143, 45.346500);        //Shadowmoon Valley, Coilskar Point
                }
                else
                if(Plr->getLevel() >= 70 && Plr->getLevel() <= 71)
                {
                    Plr->EventTeleport(571, 3547.870850, 5423.767090, 40.976692);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 72 && Plr->getLevel() <= 73)
                {
                    Plr->EventTeleport(571, 3814.961182, 6736.256348, 160.340118);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 74 && Plr->getLevel() <= 75)
                {
                    Plr->EventTeleport(571, 5147.963379, -2801.662598, 289.703644);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 76 && Plr->getLevel() <= 77)
                {
                    Plr->EventTeleport(571, 5203.854980, 5734.003960, -83.279434);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 78 && Plr->getLevel() <= 79)
                {
                    Plr->EventTeleport(571, 7362.846191, 2591.395996, 393.425079);
                    Plr->Gossip_Complete();
                }
                else
                if(Plr->getLevel() >= 80)
                {
                    Plr->BroadcastMessage("You no longer need the level helper");
                }
    
            }break;
            
        }
            Plr->Gossip_Complete();
    }
    void LevelHelper:GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupLevelHelper(ScriptMgr * mgr)
    {
        GossipScript * gs = (GossipScript*) new LevelHelper();
        mgr->register_item_gossip_script(STONEID, gs);
    }

    EDITING THE STONE ID:


    Code:
      #define STONEID 120001 //This is the ID of the item in your DB
    Thats some yummylicious code isn't it? Alls you have to do is make an item, throw it in your database and put the ID you use where it says "120001". Its that easy



    ADDING AN OPTION TO THE MENU:


    Code:
    if(Plr->GetTeam() == 0)    //Returns players team. 0 = Alliance, 1 = Horde
         {
             Menu->AddItem(0, "Take Me To Level!", 40);
             Menu->SendTo(Plr);
         }
         else
         {
             Menu->AddItem(0, "Take Me To Level!", 50);
             Menu->SendTo(Plr);
         }
    


    Thats the main menu. All you have to do is throw another line of code on either, or both of the menus. So lets say you want another option to add a buff button to the menu. All we have to do is go like this:

    Code:
    if(Plr->GetTeam() == 0)    //Returns players team. 0 = Alliance, 1 = Horde
         {
             Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->AddItem(0, "Buff me up!", 41);
              Menu->SendTo(Plr);
         }
         else
         {
             Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->AddItem(0, "Buff me up!", 51);
              Menu->SendTo(Plr);
         }
    


    Make sure the numbers in red are different from every other number there! It must be unique!


    I live in a shoe

    [C++][Share..ish] Level Helper
  2. #2
    VictoRo's Avatar Contributor
    Reputation
    81
    Join Date
    Feb 2008
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice Sounddead. I worked on that server as well and the Helper worked wonderful ^^
    +rep to you mate.

  3. #3
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for teh repzorz

    I live in a shoe

Similar Threads

  1. [Selling] Power Leveling ** Recruit a friend ** Without account sharing Grant-Level SAFE & FAST
    By Dymon in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 08-21-2016, 09:30 AM
  2. [Lua] Level Helper - 2.0
    By Dr. Livingstone in forum WoW EMU General Releases
    Replies: 9
    Last Post: 01-28-2010, 02:30 AM
  3. [Release] Level Helper
    By Dr. Livingstone in forum WoW EMU General Releases
    Replies: 14
    Last Post: 06-13-2009, 01:18 AM
  4. Easy Quick Way to Make Low(ish) Level Gold
    By abhorsenjay in forum World of Warcraft Guides
    Replies: 3
    Last Post: 06-10-2009, 10:57 AM
  5. [RELEASE][C++]Level Helper!
    By Performer in forum WoW EMU General Releases
    Replies: 16
    Last Post: 10-22-2008, 02:28 PM
All times are GMT -5. The time now is 05:59 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search