[C++] NPC Gossip Option Problem menu

User Tag List

Results 1 to 1 of 1
  1. #1
    4BOLTMAIN's Avatar Sergeant
    Reputation
    2
    Join Date
    Dec 2010
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] NPC Gossip Option Problem

    Code:
       case GOSSIP_ACTION_INFO_DEF+18: //Dungeons
    
        gGossipText = 80407;
    
        if (pPlayerLevel >=10)
    
        {
    
        gGossipText = 80403;
    
        pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_BATTLE, GOSSIP_ITEM_90, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+90); // Azeroth Dungeons
    
        }
    
        if (pPlayerLevel >=58)
    
        {
    
        pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_BATTLE, GOSSIP_ITEM_95, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+95); // Outland Dungeons
    
        }
    
        if (pPlayerLevel >=68)
    
        {
    
        pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_BATTLE, GOSSIP_ITEM_100, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+90); // Northrend Dungeons
    
        }
    
        if (pPlayerLevel >=60)
    
        {
    
        pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_BATTLE, GOSSIP_ITEM_105, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+105); // Raid Dungeons
    
        }
    
        pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, GOSSIP_ITEM_998, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10); // Previous Menu
    
        pPlayer->PlayerTalkClass->SendGossipMenu(gGossipText, pCreature->GetGUID());
    
       break;
    I have been fighting with this section all day and cant figure it out. My code compiles with 0 errors.

    When a player is level 10 or higher and chooses 'Dungeons' from the gossip menu, a new menu comes up with the correct selections and the correct npc greeting text is displayed. This part works as intended.

    When a player is level 9 or lower and chooses 'Dungeons' the menu doesnt change. What is it supposed to do is go to a new menu with the (database npc_text entry 80407 = "You must reach level 10 before you can port to any dungeons") greeting and then only the 'Previous Menu" gossip item option.

    This is not happening. I have tried adding brackets to the entire case, pPlayerLevel < 10, else if statements, and have ran cmake again.

    This is an all-in-one npc script and is pretty big. I have several if's in the other case statements and they all work flawless except for this one.

    I understand It is possible to do this in the database and I know there are other All-In-One NPC's that I can download but those choices wont help me learn the code.



    EDIT _ _ _ _
    I discovered that you have to have add at least 2 gossip items to the menu or it wont show up. To solve this I just added an additional option to return to the main menu and now it works.

    This topic can be closed.
    Last edited by 4BOLTMAIN; 08-23-2011 at 05:36 PM.

    [C++] NPC Gossip Option Problem

Similar Threads

  1. [Question] NPC Gossip Spell Learning Script Help + Replacing All Class Resources
    By iamdudelee in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 10-09-2014, 12:15 AM
  2. [Lua Script] Ranged npc (normal fire) problem.
    By BurnDownTheSystem in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 06-27-2012, 04:54 AM
  3. [Mangos] Npc gossip issue (Database)
    By kreegoth in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 01-29-2012, 02:00 AM
  4. [Lua Script] Lua NPC Gossip Checklist
    By iindigo in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 06-18-2010, 09:04 PM
  5. [Help] NPC gossip
    By Stew in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-01-2008, 05:53 AM
All times are GMT -5. The time now is 03:44 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