[C++] Got Some Errors That I Cant Fix :S menu

User Tag List

Results 1 to 11 of 11
  1. #1
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Got Some Errors That I Cant Fix :S

    Hey. This is one of my scripts that im working on. Level helper:

    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 1200001
    
    class SCRIPT_DECL HypnoticLevel : 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 HypnoticLevel::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
        if(Plr->CombatStatus.IsInCombat())
        {
            Plr->BroadcastMessage("You are in combat!");
            return; //stops the rest of the script from executing
        }
    
        GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
        if(Plr->GetTeam() == 0)
        {
            Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->AddItem(0, "Take Me To Alliance City", 85);  //alliance
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
        else
        {
            Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->AddItem(0, "Take Me To Horde City", 86);     //horde
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
    
        if(AutoSend)
            Menu->SendTo(Plr);
    }
    
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        }
        GossipMenu * Menu;
        switch(IntId)
    {
            case 80: //Remove Rez Sickness
            {
                Plr->addSpell(15007);
                Plr->removeSpell(15007,0,0,0);
            }break;
    
            case 85:  //Alliance City
            {
                Plr->EventTeleport(37, 1012.836792, 285.805511, 329.730103);
                Plr->Gossip_Complete();
            }break;
    
            case 86:  //Horde City
            {
                Plr->EventTeleport(37, 122.486130, 1017.602112, 295.270355);
                Plr->Gossip_Complete();
            }break;
    
            case 40:  //Alliance Level Locations
            {
                if(Plr->GetLevel() >= 1 && Plr->GetLevel() <= 9)
                {
                    //Plr->EventTeleport()    //Outside Malls
                }
                else
                if(Plr->GetLevel() >= 10 && Plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport(0, -4803.404785, -2927.534912, 328.762360); 
                    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->BroadcastMessage("You are Level 70. You no longer need this stone");
                }
    
            }break;
    }
    
            /*case 50:  //Horde Level Locations
            {
                if(Plr->GetLevel() >= 1 && plr->GetLevel() <= 9)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 10 && plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 14 && Plr->GetLevel() <= 17)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 18 && Plr->GetLevel() <= 21)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 22 && Plr->GetLevel() <= 25)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 26 && Plr->GetLevel() <= 29)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 30 && Plr->GetLevel() <= 33)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 34 && Plr->GetLevel() <= 37)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 38 && Plr->GetLevel() <= 41)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 42 && Plr->GetLevel() <= 45)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 46 && Plr->GetLevel() <= 49)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 50 && Plr->GetLevel() <= 53)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 54 && Plr->GetLevel() <= 57)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 58 && Plr->GetLevel() <= 61)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 62 && Plr->GetLevel() <= 64)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 65 && Plr->GetLevel() <= 66)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 67 && Plr->GetLevel() <= 68)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 69 && Plr->GetLevel() <= 70)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() = 70)
                {
                    Plr->BroadcastMessage("You are Level 70. You no longer need this stone")
                }
    
            }break;*/
    
    void SetupHypnoticLevel(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new HypnoticLevel();
    mgr->register_item_gossip_script(STONEID, gs);
    }

    Errors:

    Code:
    ..\src\HypnoticScripts\HypnoticLevel.cpp(54) : error C2143: syntax error : missing ';' before '}'
    ..\src\HypnoticScripts\HypnoticLevel.cpp(54) : error C2761: 'void HypnoticLevel::GossipSelectOption(Object *,Player *,uint32,uint32,const char *)' : member function redeclaration not allowed
    ..\src\HypnoticScripts\HypnoticLevel.cpp(54) : error C2143: syntax error : missing ';' before '}'
    ..\src\HypnoticScripts\HypnoticLevel.cpp(54) : error C2059: syntax error : '}'
    ..\src\HypnoticScripts\HypnoticLevel.cpp(56) : error C2059: syntax error : 'switch'
    ..\src\HypnoticScripts\HypnoticLevel.cpp(57) : error C2143: syntax error : missing ';' before '{'
    ..\src\HypnoticScripts\HypnoticLevel.cpp(57) : error C2447: '{' : missing function header (old-style formal list?)
    Thanks in advance,
    Performer!


    [C++] Got Some Errors That I Cant Fix :S
  2. #2
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at this line:
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    }

  3. #3
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I took that out but i still get them :S


  4. #4
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Taking what out? I was just pointing at the fact that you accidentally placed a closing brace where an opening brace should be

  5. #5
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Legend I Did that.

    Now i get:

    Code:
    ..srcHypnoticScriptsHypnoticLevel.cpp(53) : error C2761: 'void HypnoticLevel::GossipSelectOption(Object *,Player *,uint32,uint32,const char *)' : member function redeclaration not allowed
    ..srcHypnoticScriptsHypnoticLevel.cpp(54) : error C2447: '{' : missing function header (old-style formal list?)


  6. #6
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're missing a closing brace for
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {

  7. #7
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im still getting them :S

    This is what it looks like now:

    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 1200001
    
    class SCRIPT_DECL HypnoticLevel : 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 HypnoticLevel::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
        if(Plr->CombatStatus.IsInCombat())
        {
            Plr->BroadcastMessage("You are in combat!");
            return; //stops the rest of the script from executing
        }
    
        GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
        if(Plr->GetTeam() == 0)
        {
            Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->AddItem(0, "Take Me To Alliance City", 85);  //alliance
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
        else
        {
            Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->AddItem(0, "Take Me To Horde City", 86);     //horde
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
    
        if(AutoSend)
            Menu->SendTo(Plr);
    }
    
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    {
    GossipMenu * Menu;
    switch(IntId);
    
            case 80: //Remove Rez Sickness
            {
                Plr->addSpell(15007);
                Plr->removeSpell(15007,0,0,0);
            }break;
    
            case 85:  //Alliance City
            {
                Plr->EventTeleport(37, 1012.836792, 285.805511, 329.730103);
                Plr->Gossip_Complete();
            }break;
    
            case 86:  //Horde City
            {
                Plr->EventTeleport(37, 122.486130, 1017.602112, 295.270355);
                Plr->Gossip_Complete();
            }break;
    
            case 40:  //Alliance Level Locations
            {
                if(Plr->GetLevel() >= 1 && Plr->GetLevel() <= 9)
                {
                    //Plr->EventTeleport()    //Outside Malls
                }
                else
                if(Plr->GetLevel() >= 10 && Plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport(0, -4803.404785, -2927.534912, 328.762360); 
                    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->BroadcastMessage("You are Level 70. You no longer need this stone");
                }
    
            }break;
    }
    
            /*case 50:  //Horde Level Locations
            {
                if(Plr->GetLevel() >= 1 && plr->GetLevel() <= 9)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 10 && plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 14 && Plr->GetLevel() <= 17)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 18 && Plr->GetLevel() <= 21)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 22 && Plr->GetLevel() <= 25)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 26 && Plr->GetLevel() <= 29)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 30 && Plr->GetLevel() <= 33)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 34 && Plr->GetLevel() <= 37)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 38 && Plr->GetLevel() <= 41)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 42 && Plr->GetLevel() <= 45)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 46 && Plr->GetLevel() <= 49)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 50 && Plr->GetLevel() <= 53)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 54 && Plr->GetLevel() <= 57)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 58 && Plr->GetLevel() <= 61)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 62 && Plr->GetLevel() <= 64)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 65 && Plr->GetLevel() <= 66)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 67 && Plr->GetLevel() <= 68)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 69 && Plr->GetLevel() <= 70)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() = 70)
                {
                    Plr->BroadcastMessage("You are Level 70. You no longer need this stone")
                }
    
            }break;*/
    
    void SetupHypnoticLevel(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new HypnoticLevel();
    mgr->register_item_gossip_script(STONEID, gs);
    }


  8. #8
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    switch(IntId);

    ^ This expects braces, not a semicolon.


    Take one bar off your C++ Skill meter and read this C++ Syntax: switch
    Then count your braces. Starting with 0, add 1 for each opening brace and deduct one for each closing one. Of course, ignore comments. Anything other than a big shiny zero means you have a brace mismatch

  9. #9
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks spidey. WIll look into it tomorrow. I put that there because of a syntax error. Nvm


  10. #10
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still cant figure it.

    I take the ; off of the gossip select. and get 37 errors with the ->GetLevel.

    Where as if keep the ; on
    Code:
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    I still get the two errors.

    With this:
    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 1200001
    
    class SCRIPT_DECL HypnoticLevel : 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 HypnoticLevel::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
        if(Plr->CombatStatus.IsInCombat())
        {
            Plr->BroadcastMessage("You are in combat!");
            return; //stops the rest of the script from executing
        }
    
        GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
        if(Plr->GetTeam() == 0)
        {
            Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->AddItem(0, "Take Me To Alliance City", 85);  //alliance
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
        else
        {
            Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->AddItem(0, "Take Me To Horde City", 86);     //horde
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
    
        if(AutoSend)
            Menu->SendTo(Plr);
    }
    
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
        GossipMenu * Menu;
        switch(IntId) 
        {
    
            case 80: //Remove Rez Sickness
            {
                Plr->addSpell(15007);
                Plr->removeSpell(15007,0,0,0);
            }break;
    
            case 85:  //Alliance City
            {
                Plr->EventTeleport(37, 1012.836792, 285.805511, 329.730103);
                Plr->Gossip_Complete();
            }break;
    
            case 86:  //Horde City
            {
                Plr->EventTeleport(37, 122.486130, 1017.602112, 295.270355);
                Plr->Gossip_Complete();
            }break;
    
            case 40:  //Alliance Level Locations
            {
                if(Plr->GetLevel() >= 1 && Plr->GetLevel() <= 9)
                {
                    //Plr->EventTeleport()    //Outside Malls
                }
                else
                if(Plr->GetLevel() >= 10 && Plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport(0, -4803.404785, -2927.534912, 328.762360); 
                    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->BroadcastMessage("You are Level 70. You no longer need this stone");
                }
    
            }break;
            Plr->Gossip_Complete();
        }//switch
    }
    
            /*case 50:  //Horde Level Locations
            {
                if(Plr->GetLevel() >= 1 && plr->GetLevel() <= 9)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 10 && plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 14 && Plr->GetLevel() <= 17)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 18 && Plr->GetLevel() <= 21)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 22 && Plr->GetLevel() <= 25)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 26 && Plr->GetLevel() <= 29)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 30 && Plr->GetLevel() <= 33)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 34 && Plr->GetLevel() <= 37)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 38 && Plr->GetLevel() <= 41)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 42 && Plr->GetLevel() <= 45)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 46 && Plr->GetLevel() <= 49)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 50 && Plr->GetLevel() <= 53)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 54 && Plr->GetLevel() <= 57)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 58 && Plr->GetLevel() <= 61)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 62 && Plr->GetLevel() <= 64)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 65 && Plr->GetLevel() <= 66)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 67 && Plr->GetLevel() <= 68)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 69 && Plr->GetLevel() <= 70)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() = 70)
                {
                    Plr->BroadcastMessage("You are Level 70. You no longer need this stone")
                }
    
            }break;*/
    
    void HypnoticLevel::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupHypnoticLevel(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new HypnoticLevel();
    mgr->register_item_gossip_script(STONEID, gs);
    }
    I get:

    Code:
    ..srcHypnoticScriptsHypnoticLevel.cpp(79) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(79) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(84) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(84) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(90) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(90) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(96) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(96) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(102) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(102) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(108) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(108) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(114) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(114) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(120) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(120) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(126) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(126) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(132) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(132) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(138) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(138) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(144) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(144) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(150) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(150) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(156) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(156) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(162) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(162) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(168) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(168) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(174) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(174) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(180) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(180) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    ..srcHypnoticScriptsHypnoticLevel.cpp(186) : error C2039: 'GetLevel' : is not a member of 'Player'
            c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'

    And with:
    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 1200001
    
    class SCRIPT_DECL HypnoticLevel : 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 HypnoticLevel::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
        if(Plr->CombatStatus.IsInCombat())
        {
            Plr->BroadcastMessage("You are in combat!");
            return; //stops the rest of the script from executing
        }
    
        GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
        if(Plr->GetTeam() == 0)
        {
            Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->AddItem(0, "Take Me To Alliance City", 85);  //alliance
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
        else
        {
            Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->AddItem(0, "Take Me To Horde City", 86);     //horde
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
    
        if(AutoSend)
            Menu->SendTo(Plr);
    }
    
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    {
        GossipMenu * Menu;
        switch(IntId) 
        {
    
            case 80: //Remove Rez Sickness
            {
                Plr->addSpell(15007);
                Plr->removeSpell(15007,0,0,0);
            }break;
    
            case 85:  //Alliance City
            {
                Plr->EventTeleport(37, 1012.836792, 285.805511, 329.730103);
                Plr->Gossip_Complete();
            }break;
    
            case 86:  //Horde City
            {
                Plr->EventTeleport(37, 122.486130, 1017.602112, 295.270355);
                Plr->Gossip_Complete();
            }break;
    
            case 40:  //Alliance Level Locations
            {
                if(Plr->GetLevel() >= 1 && Plr->GetLevel() <= 9)
                {
                    //Plr->EventTeleport()    //Outside Malls
                }
                else
                if(Plr->GetLevel() >= 10 && Plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport(0, -4803.404785, -2927.534912, 328.762360); 
                    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->BroadcastMessage("You are Level 70. You no longer need this stone");
                }
    
            }break;
            Plr->Gossip_Complete();
        }//switch
    }
    
            /*case 50:  //Horde Level Locations
            {
                if(Plr->GetLevel() >= 1 && plr->GetLevel() <= 9)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 10 && plr->GetLevel() <= 13)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 14 && Plr->GetLevel() <= 17)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 18 && Plr->GetLevel() <= 21)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 22 && Plr->GetLevel() <= 25)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 26 && Plr->GetLevel() <= 29)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 30 && Plr->GetLevel() <= 33)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 34 && Plr->GetLevel() <= 37)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 38 && Plr->GetLevel() <= 41)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 42 && Plr->GetLevel() <= 45)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 46 && Plr->GetLevel() <= 49)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 50 && Plr->GetLevel() <= 53)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 54 && Plr->GetLevel() <= 57)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 58 && Plr->GetLevel() <= 61)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 62 && Plr->GetLevel() <= 64)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 65 && Plr->GetLevel() <= 66)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 67 && Plr->GetLevel() <= 68)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() >= 69 && Plr->GetLevel() <= 70)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->GetLevel() = 70)
                {
                    Plr->BroadcastMessage("You are Level 70. You no longer need this stone")
                }
    
            }break;*/
    
    void HypnoticLevel::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupHypnoticLevel(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new HypnoticLevel();
    mgr->register_item_gossip_script(STONEID, gs);
    }
    I Get:
    Code:
    ..srcHypnoticScriptsHypnoticLevel.cpp(53) : error C2761: 'void HypnoticLevel::GossipSelectOption(Object *,Player *,uint32,uint32,const char *)' : member function redeclaration not allowed
    ..srcHypnoticScriptsHypnoticLevel.cpp(54) : error C2447: '{' : missing function header (old-style formal list?)






  11. #11
    doublehex's Avatar Member
    Reputation
    34
    Join Date
    Mar 2007
    Posts
    385
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you may have to take another two off your skills bar.... as for your
    'GetLevel' : is not a member of 'Player'
    c:documents and settingshp_administratordesktophypnoticemu compilestablesrcascent-worldPlayer.h(706) : see declaration of 'Player'
    error, its really just a simple thing... you made it a capital, like in my source it is getLevel() not GetLevel() (cast sensitive ) and it appear to be like that in yours too. another thing, you dont want that ; at the end of your gossipselection
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    because that just ends it before it can even do anything... which is why you dont get the level errors... just replace all of the GetLevel() with getLevel() and get rid of the ; and it should work with some other minor errors (line 186, you had "=" where you shouldve had "==" and disabled warning 4305, here is your final code, untested may come up with some errors cause of core differences, but has no errors for me:
    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"
    
    #ifdef WIN32
    #pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    #define STONEID 1200001
    
    class SCRIPT_DECL HypnoticLevel : 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 HypnoticLevel::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
        if(Plr->CombatStatus.IsInCombat())
        {
            Plr->BroadcastMessage("You are in combat!");
            return; //stops the rest of the script from executing
        }
    
        GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
        if(Plr->GetTeam() == 0)
        {
            Menu->AddItem(0, "Take Me To Level!", 40);
            Menu->AddItem(0, "Take Me To Alliance City", 85);  //alliance
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
        else
        {
            Menu->AddItem(0, "Take Me To Level!", 50);
            Menu->AddItem(0, "Take Me To Horde City", 86);     //horde
            Menu->AddItem(0, "Remove Rez Sickness", 80);
            Menu->SendTo(Plr);
        }
    
        if(AutoSend)
            Menu->SendTo(Plr);
    }
    
    void HypnoticLevel::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
        switch(IntId) 
        {
    
            case 80: //Remove Rez Sickness
            {
                Plr->addSpell(15007);
                Plr->removeSpell(15007,0,0,0);
            }break;
    
            case 85:  //Alliance City
            {
                Plr->EventTeleport(37, 1012.836792, 285.805511, 329.730103);
                Plr->Gossip_Complete();
            }break;
    
            case 86:  //Horde City
            {
                Plr->EventTeleport(37, 122.486130, 1017.602112, 295.270355);
                Plr->Gossip_Complete();
            }break;
    
            case 40:  //Alliance Level Locations
            {
                if(Plr->getLevel() >= 1 && Plr->getLevel() <= 9)
                {
                   //Plr->EventTeleport()    //Outside Malls
                }
                else
                if(Plr->getLevel() >= 10 && Plr->getLevel() <= 13)
                {
                    Plr->EventTeleport(0, -4803.404785, -2927.534912, 328.762360); 
                    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,     gie 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,      elf 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->BroadcastMessage("You are Level 70. You no longer need this stone");
                }
    
            }break;
            Plr->Gossip_Complete();
        }//switch
    }
    
            /*case 50:  //Horde Level Locations
            {
                if(Plr->getLevel() >= 1 && plr->getLevel() <= 9)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 10 && plr->getLevel() <= 13)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 14 && Plr->getLevel() <= 17)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 18 && Plr->getLevel() <= 21)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 22 && Plr->getLevel() <= 25)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 26 && Plr->getLevel() <= 29)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 30 && Plr->getLevel() <= 33)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 34 && Plr->getLevel() <= 37)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 38 && Plr->getLevel() <= 41)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 42 && Plr->getLevel() <= 45)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 46 && Plr->getLevel() <= 49)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 50 && Plr->getLevel() <= 53)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 54 && Plr->getLevel() <= 57)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 58 && Plr->getLevel() <= 61)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 62 && Plr->getLevel() <= 64)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 65 && Plr->getLevel() <= 66)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 67 && Plr->getLevel() <= 68)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() >= 69 && Plr->getLevel() <= 70)
                {
                    Plr->EventTeleport()
                }
                else
                if(Plr->getLevel() = 70)
                {
                    Plr->BroadcastMessage("You are Level 70. You no longer need this stone")
                }
    
            }break;*/
    
    void HypnoticLevel::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupHypnoticLevel(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new HypnoticLevel();
    mgr->register_item_gossip_script(STONEID, gs);
    }
    Keep trying, other than a few things very nice job on the script and hope to see more from you.


Similar Threads

  1. [Trading] Lf anyone with the surname Kapkin that got some nice mounts, amani war bear, spectral
    By shizyo in forum World of Warcraft Buy Sell Trade
    Replies: 1
    Last Post: 09-25-2012, 04:12 PM
  2. Small problem, it's probably an easy fix, just need some help, thats all.
    By YourMomsAHorde in forum WoW Advanced Model Edits
    Replies: 3
    Last Post: 06-08-2010, 08:12 PM
  3. this stupid error i cant fix!!!
    By anonymous23 in forum World of Warcraft Emulator Servers
    Replies: 13
    Last Post: 02-26-2008, 10:15 AM
  4. wow error i cant fix
    By kate1 in forum World of Warcraft General
    Replies: 5
    Last Post: 12-19-2007, 10:17 AM
  5. for some people that didnt know what hacks can be.
    By Elites360 in forum World of Warcraft General
    Replies: 2
    Last Post: 09-10-2006, 02:41 PM
All times are GMT -5. The time now is 09:22 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search