Jump to content

DarkMessiah

Members
  • Posts

    29
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by DarkMessiah

  1. #include "precompiled.h"
    #include "sc_gossip.h"
    #include "Player.h"
    #include "GossipDef.h"
    #include "Spell.h"
    bool GossipHello_ItemUse_Item_teleport(Player *player, Item* _Item, SpellCastTargets const& targets)
    {
           if(player->isInCombat())
           {
               return true;
           }
           if( player->isDead() )
           {
               return true;
           }
       player->ADD_GOSSIP_ITEM( 0, "", 1, 1);
       player->SEND_GOSSIP_MENU(99990,_Item->GetGUID());
       return true;
    }
    
    void SendDefaultMenu_ItemUse_Item_teleport(Player *player, Item *_Item, uint32 action, SpellCastTargets const& targets)
    {
       switch(action) {
           case GOSSIP_ACTION_INFO_DEF + 1 :
               // Main Menu
                   player->ADD_GOSSIP_ITEM( 2, "Level Road", GOSSIP_SENDER_MAIN, 2013); //Werkt 100%
                   if (player->GetTeam() == ALLIANCE)
                   {
                       player->ADD_GOSSIP_ITEM( 1, "[Alliance Cities]", GOSSIP_SENDER_MAIN, 2); //Werkt 100%
                       player->ADD_GOSSIP_ITEM( 1, "[Horde Cities]", GOSSIP_SENDER_MAIN, 1); //Werkt 100%
                   }else{
                       player->ADD_GOSSIP_ITEM( 0, "[Horde Cities]", GOSSIP_SENDER_MAIN, 1); //Werkt 100%
                       player->ADD_GOSSIP_ITEM( 0, "[Alliance Cities]", GOSSIP_SENDER_MAIN, 2); //Werkt 100%
                   }
                   player->ADD_GOSSIP_ITEM( 2 , "[Neutral Cities]", GOSSIP_SENDER_MAIN, 3); //Werkt 100%
                   player->ADD_GOSSIP_ITEM( 2 , "PVP-Arena", GOSSIP_SENDER_MAIN, 116); //Werkt 100%
                   //Instances
                   player->ADD_GOSSIP_ITEM( 7, "[Dungeons]", GOSSIP_SENDER_MAIN, 5000); //Werkt 100%
                   //Locations
                   player->ADD_GOSSIP_ITEM( 2, "[Outland Locations]", GOSSIP_SENDER_MAIN, 2005); //Werkt 100%
                   player->ADD_GOSSIP_ITEM( 4, "[Northrend Locations]", GOSSIP_SENDER_MAIN, 5); //Werkt 100%
                   //Malls
                   player->ADD_GOSSIP_ITEM( 2, "PvP-Mall", GOSSIP_SENDER_MAIN, 2004); //Werkt 100%
                   player->ADD_GOSSIP_ITEM( 2, "NoN-PvP Mall + Trainers", GOSSIP_SENDER_MAIN, 2003); //Werkt 100%
                   player->ADD_GOSSIP_ITEM( 2, "Dalaran (WotLK Mall)", GOSSIP_SENDER_MAIN, 56); //Werkt 100%
                   player->ADD_GOSSIP_ITEM( 7, "[Player Tools]", GOSSIP_SENDER_MAIN, 4000); //Werkt 100%
                   player->ADD_GOSSIP_ITEM( 6, "[buy Items]", GOSSIP_SENDER_MAIN, 1003); //Werkt 100%
                   player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Item->GetGUID());
           break;
       }
    }
    
    bool GossipSelect_ItemUse_Item_teleport(Player *player, Item *_Item, uint32 sender, uint32 action, SpellCastTargets const& targets)
    {
       switch(sender) {
       case GOSSIP_SENDER_MAIN :
               SendDefaultMenu_ItemUse_Item_teleport(player, _Item, action,targets);
               break;
    
       case 2 :
           switch(action)
           {
               case 1:     // Horde Cities
                     {
                       player->ADD_GOSSIP_ITEM(5, "Orgrimmar", GOSSIP_SENDER_MAIN, 7);
                       player->ADD_GOSSIP_ITEM(5, "Silvermoon", GOSSIP_SENDER_MAIN, 6);
                       player->ADD_GOSSIP_ITEM(5, "Thunder Bluff", GOSSIP_SENDER_MAIN, 8);
                       player->ADD_GOSSIP_ITEM(5, "Undercity", GOSSIP_SENDER_MAIN, 9);
                       player->ADD_GOSSIP_ITEM( 7, "[Main Menu]", GOSSIP_SENDER_MAIN, 5005);
                       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Item->GetGUID());
                     }
                       break;
    
    
    
               case 2:     // Alliance Cities
                     {
                       player->ADD_GOSSIP_ITEM(5, "Stormwind", GOSSIP_SENDER_MAIN, 11);
                       player->ADD_GOSSIP_ITEM(5, "The Exodar", GOSSIP_SENDER_MAIN, 10);
                       player->ADD_GOSSIP_ITEM(5, "Ironforge", GOSSIP_SENDER_MAIN, 12);
                       player->ADD_GOSSIP_ITEM(5, "Darnassus", GOSSIP_SENDER_MAIN, 13);
                       player->ADD_GOSSIP_ITEM( 7, "[Main Menu]", GOSSIP_SENDER_MAIN, 5005);                
                       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Item->GetGUID());
                     }
                   break;
    
               case 3: //Neutral Town
                       player->ADD_GOSSIP_ITEM( 5, "Booty Bay"                    , GOSSIP_SENDER_MAIN, 3001);
                       player->ADD_GOSSIP_ITEM( 5, "Everlook"                     , GOSSIP_SENDER_MAIN, 3010);
                       player->ADD_GOSSIP_ITEM( 5, "Gadegetzan"                   , GOSSIP_SENDER_MAIN, 3015);
                       player->ADD_GOSSIP_ITEM( 5, "Mudsprocket"                  , GOSSIP_SENDER_MAIN, 3020);
                       player->ADD_GOSSIP_ITEM( 5, "Ratchet"                      , GOSSIP_SENDER_MAIN, 3025);
                       player->ADD_GOSSIP_ITEM( 5, "Isle Of Quel'Danas"           , GOSSIP_SENDER_MAIN, 3035);
                       player->ADD_GOSSIP_ITEM( 7, "[Main Menu]", GOSSIP_SENDER_MAIN, 5005);                
                       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Item->GetGUID());
               break;
    
               case 5: // World of the Lich King Locations
                   {
                       player->ADD_GOSSIP_ITEM(5, "Howling Fjord", GOSSIP_SENDER_MAIN, 46);
                       player->ADD_GOSSIP_ITEM(5, "Grizzly Hills", GOSSIP_SENDER_MAIN, 47);
                       player->ADD_GOSSIP_ITEM(5, "Zul'Drak", GOSSIP_SENDER_MAIN, 48);
                       player->ADD_GOSSIP_ITEM(5, "Storm Peaks", GOSSIP_SENDER_MAIN, 49);
                       player->ADD_GOSSIP_ITEM(5, "Icecrown", GOSSIP_SENDER_MAIN, 50);
                       player->ADD_GOSSIP_ITEM(5, "Sholazar Basin", GOSSIP_SENDER_MAIN, 51);
                       player->ADD_GOSSIP_ITEM(5, "Borean Tundra", GOSSIP_SENDER_MAIN, 52);
                       player->ADD_GOSSIP_ITEM(5, "Wintergrasp", GOSSIP_SENDER_MAIN, 53);
                       player->ADD_GOSSIP_ITEM(5, "Crystalsong", GOSSIP_SENDER_MAIN, 54);
                       player->ADD_GOSSIP_ITEM(5, "Dragonblight", GOSSIP_SENDER_MAIN, 55);
                       player->ADD_GOSSIP_ITEM(5, "Dalaran City", GOSSIP_SENDER_MAIN, 56);
                       player->ADD_GOSSIP_ITEM( 7, "[Main Menu]", GOSSIP_SENDER_MAIN, 5005);                
                       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Item->GetGUID());
                   }
               break;    
    
    
                   case 6://Silvermoon
                       {
                           //Plr->EventTeleport(530, 9400.486328, -7278.376953, 14.206780);
                           player->CLOSE_GOSSIP_MENU();
                           player->TeleportTo(530, 9400.486328, -7278.376953, 14.206780, 4.78f);
    
                       }
                   break;
    
                   case 7://Orgrimmar
                       {
                           if (player->GetTeam() == ALLIANCE)
                           {
                               //Plr->EventTeleport(1, 1563.854492, -4435.740723, 8);
                               player->CLOSE_GOSSIP_MENU();
                               player->TeleportTo(1, 1563.854492, -4435.740723, 8, 4.78f);
    
                           } else {
                               //Plr->EventTeleport(1, 1371.068970, -4370.801758, 26.052483);
                               player->CLOSE_GOSSIP_MENU();
                               player->TeleportTo(1, 1371.068970, -4370.801758, 26.052483, 4.78f);
    
    
                           }
                       }
                   break;
    
                   case 8://ThunderBluff
                       {
                           //Plr->EventTeleport(1, -1304.569946, 205.285004, 68.681396);
                           player->CLOSE_GOSSIP_MENU();
                           player->TeleportTo(1, -1304.569946, 205.285004, 68.681396, 4.78f);
    
                       }
                   break;
    
                   case 2005:     // Outland Locations
                       {
                           player->ADD_GOSSIP_ITEM(5, "Hellfire Peninsula", GOSSIP_SENDER_MAIN, 2006);
                           player->ADD_GOSSIP_ITEM(5, "Zangarmarsh", GOSSIP_SENDER_MAIN, 2007);
                           player->ADD_GOSSIP_ITEM(5, "Nagrand", GOSSIP_SENDER_MAIN, 2008);
                           player->ADD_GOSSIP_ITEM(5, "Terokkar Forrest", GOSSIP_SENDER_MAIN, 2009);
                           player->ADD_GOSSIP_ITEM(5, "Shadowmoon Valley", GOSSIP_SENDER_MAIN, 2010);
                           player->ADD_GOSSIP_ITEM(5, "Blade's Edge Mountains", GOSSIP_SENDER_MAIN, 2011);
                           player->ADD_GOSSIP_ITEM(5, "Netherstorm", GOSSIP_SENDER_MAIN, 2012);
                           player->ADD_GOSSIP_ITEM( 7, "[Main Menu]", GOSSIP_SENDER_MAIN, 5005);                
                           player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Item->GetGUID());
                       }
                   break;
    
    
    
                   case 2006: // Hellfire Peninsula
                       {
                           //Plr->EventTeleport(530, -248.973557, 957.101685, 85);
                           player->CLOSE_GOSSIP_MENU();
                           player->TeleportTo(530, -248.973557, 957.101685, 85, 4.78f);
    
                       }
                   break;    
    
           case 9055:// Violet Hold
               player->CLOSE_GOSSIP_MENU();
               player->TeleportTo(571, 5679.82f, 486.80f, 652.40f, 4.08f);
    
           break;
    
           //////////////////////////////////////////Player Tools////////////////////////////////////////////////////////
    
           case 4005:// Innkeeper Bind your new Home
               player->CLOSE_GOSSIP_MENU();
               player->SetBindPoint(_Item->GetGUID());
               player->MonsterWhisper("This is your new home location!.", player->GetGUID());
           break;
    
           case 4010:// Reset Talent Points
               player->CLOSE_GOSSIP_MENU();
               player->resetTalents(true);
               player->MonsterWhisper("You have reset your talent points.", player->GetGUID());
           break;
    
           case 4015:// Reset Pet Talent Points
               player->CLOSE_GOSSIP_MENU();
               if(player->GetPet())
               player->SendPetSkillWipeConfirm();
               else
               player->MonsterWhisper("You don't have a pet.", player->GetGUID());
           break;
    
           case 4020://Remove Res Sickness
               if(!player->HasAura(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS,0))
               {
                   player->MonsterWhisper("You don't have resurrection sickness.", player->GetGUID());
                   return true;
               }
    
               player->CastSpell(player,38588,false); // Healing effect
               player->MonsterWhisper("Your Resurrection Sickness has been removed!.", player->GetGUID());
               player->RemoveAurasDueToSpell(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS);
               player->CLOSE_GOSSIP_MENU();
           break;
    
           case 4021://Repair Items
               player->DurabilityRepairAll(0, 0, false);
               player->MonsterWhisper("Your Items have been Repaired!.", player->GetGUID());
               player->CLOSE_GOSSIP_MENU();
           break;
    
            player->CLOSE_GOSSIP_MENU();
    
           } // end of switch
       break;
       }
    }
    void AddSC_item_teleport()
    {
       Script *newscript;
       newscript = new Script;
       newscript->Name="item_teleport";
       newscript->pItemUse = GossipHello_ItemUse_Item_teleport;
       newscript->pGossipSelect_Item = GossipSelect_ItemUse_Item_teleport;
       newscript->RegisterSelf();
    }

    This is what i have now but it gives me this error:

    Error    1    error C2039: 'pGossipSelect_Item' : is not a member of 'Script'    c:\\Documents and Settings\\Administrator\\Desktop\\SVN\\MaNGOS\\src\\bindings\\ScriptDev2\\scripts\\custom\\TeleStone.cpp    964    ScriptDev2
    

    NOTE: i ripped out some code because this forum only allows 20000 chars:

    The text that you have entered is too long (23690 characters). Please shorten it to 20000 characters long.

  2. How did you make the gossip menu?

    This is what i have atm.

    #include "precompiled.h"
    
    void SendDefaultMenu_MorphStone(Player* pPlayer, Item* pItem, uint32 action)
    {
       pPlayer->MonsterSay("SendDefaultMenu", LANG_UNIVERSAL, NULL);
       // Not allow in combat
       if (pPlayer->isInCombat())
       {
           pPlayer->CLOSE_GOSSIP_MENU();
           pPlayer->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
           return;
       }
       switch(action)
       {
           case 1: // Demorph
               pPlayer->DeMorph();
           break;
    
           case 2: //Illidan
               pPlayer->SetDisplayId(21135);
           break;
           pPlayer->CLOSE_GOSSIP_MENU();
           pPlayer->MonsterSay("End of Switch", LANG_UNIVERSAL, NULL);
       } // end of switch
    } //end of function
    
    bool GossipHello_MorphStone(Player* pPlayer, Item* pItem)
    {
    
       {
           pPlayer->ADD_GOSSIP_ITEM( 7, "Demorph"             , GOSSIP_SENDER_MAIN, 1);
           pPlayer->ADD_GOSSIP_ITEM( 9, "Illidan"               , GOSSIP_SENDER_MAIN, 2);
           pPlayer->MonsterSay("Menu Shown", LANG_UNIVERSAL, NULL);
       }
    
       pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pItem->GetGUID());
       return true;
    }
    
    bool ItemUse_item_custom_MorphStone(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
    {
       if ( (pPlayer->isInCombat()) || (pPlayer->isInFlight()) || (pPlayer->isDead()))
       {
           pPlayer->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT,pItem,NULL );
           return false;
       }
       pPlayer->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
       {
           pPlayer->MonsterSay("ItemUse", LANG_UNIVERSAL, NULL);
           GossipHello_MorphStone(pPlayer, pItem);
       }
       return true;
    }
    
    bool GossipSelect_MorphStone(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
    {
       // Main menu
       if (sender == GOSSIP_SENDER_MAIN)
       //Item* pItem = (Item) pCreature;
       //SendDefaultMenu_MorphStone(pPlayer, pItem, action);
    
    return true;
    }
    
    void AddSC_item_custom_MorphStone()
    {
       Script *newscript;
       newscript = new Script;
       newscript->Name="item_custom_MorphStone";
       newscript->pItemUse = &ItemUse_item_custom_MorphStone;
       //newscript->pGossipSelect = &GossipSelect_MorphStone;
       newscript->RegisterSelf();
    }

  3. Hello guys,

    Is it possible for the dev-team to build in some way so items can have a gossip menu that works? i made a gossipmenu out of an item but when u click something just nothing happens (i use SD2 also but they told me MaNGOS does not allow to use item menus).

    Thanks,

    DarkMessiah

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use