Gossip Item ? menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Arcanios's Avatar Private
    Reputation
    1
    Join Date
    Apr 2011
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Gossip Item ?

    Hi !

    I'm trying to create a gossip item, with gossip menu, on TrinityCore but fruitlessly.
    It's why i call the community for some help.

    So this is my code :

    Code:
    class gossip_custom_item : public ItemScript
    {
        public:
    
            gossip_custom_item()
                : ItemScript("gossip_custom_item")
            {
            }
    
            bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
            {
                            player->ADD_GOSSIP_ITEM( 3, "Bla bla bla" , GOSSIP_SENDER_MAIN, 1);
                            player->ADD_GOSSIP_ITEM( 0, "bla bla bla, again !" , GOSSIP_SENDER_MAIN, 2);
                            player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,item->GetGUID());
                    
                            
    
                            return true;
            }
    
    };

    Yes, it work, but i want to execute some actions when the player click on one option.
    I have searched in Player.cpp, vainly too ...

    Anyone can help me ?

    Thanks a lot !

    Cordially, Arcanios

    Gossip Item ?
  2. #2
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    player->ADD_GOSSIP_ITEM( 3, "Bla bla bla" , GOSSIP_SENDER_MAIN, 1); <-------- intid
    player->ADD_GOSSIP_ITEM( 0, "bla bla bla, again !" , GOSSIP_SENDER_MAIN, 2) <------------ intid

    The 1 and the 2 you see at the end there are the intid. A simple if than can fix your problem.

    if (intid == 1) then
    plr:LearnSpell(50)
    end --ends the if then statement

    if (intid == 2) then
    plr:LearnSpell(100)
    end
    end --final end closes the if intid functions

    Hope this helps.

  3. #3
    Arcanios's Avatar Private
    Reputation
    1
    Join Date
    Apr 2011
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's an LUA arcemu script that you give me, thanks for your response, but this doesn't work =S

Similar Threads

  1. [Lua Script] Item Gossip
    By blackhex666 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 12-06-2010, 11:40 PM
  2. [Lua Script] LUA item gossip help
    By naturaunglosar in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 05-26-2010, 02:14 AM
  3. [Lua ] How to make a Gossip Menu End Up In a Vendor Window with Items.
    By Boogieflower in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 04-12-2010, 06:09 PM
  4. [Lua] Gossip item not working -.-
    By Tikki100 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 08-03-2009, 01:11 PM
  5. [Guide] Lua Gossip on Items (Average)
    By AngelSandy in forum WoW EMU Guides & Tutorials
    Replies: 8
    Last Post: 06-20-2009, 07:15 PM
All times are GMT -5. The time now is 07:10 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search