Sub-menu help

Go down

Sub-menu help

Post by negative890 on Mon Dec 24, 2012 10:33 am

hello i need some help

Core: trinity
Problem: i have a problem that i dont understand/dont know how to make sub-menu option in a teleporter, if someone cud help me it would be nice

Thanks

negative890

Viestien lukumäärä : 2
Join date : 2012-12-24

Back to top Go down

Re: Sub-menu help

Post by Rochet2 on Tue Dec 25, 2012 2:24 am

Here is the NPC and the main menu and one submenu.
The main menu has menu_id 50000. I have marked them in red through the SQL.
The submenu has menu_id 50001, but it is marked as 50000 + 1 through the SQL. I have marked it in Cyan

INSERT INTO creature_template (entry, modelid1, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, Health_mod, Mana_mod, Armor_mod, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, dmg_multiplier, unit_class, unit_flags, type, type_flags, InhabitType, RegenHealth, flags_extra, AiName) VALUES
('190000', '21572', "Portal Master", "", 'Directions', '50000', 71, 71, 1.56, 1.56, 1.56, 35, 35, 3, 1, 1.14286, 1.25, 1, 1, 1, 2, 7, 138936390, 3, 1, 2, 'SmartAI');

INSERT INTO gossip_menu_option (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, box_coded, box_money, box_text) VALUES
('50000', 1, 2, 'Stormwind', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Stormwind?'),
('50000', 2, 2, 'Orgrimmar', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Orgrimmar?'),
('50000', 3, 2, 'Darnassus', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Darnassus?'),
('50000', 4, 2, 'Ironforge', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Ironforge?'),
('50000', 5, 2, 'Exodar', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Exodar?'),
('50000', 6, 2, 'Thunder bluff', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Thunder bluff?'),
('50000', 7, 2, 'Undercity', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Undercity?'),
('50000', 8, 2, 'Silvermoon city', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Silvermoon city?'),
('50000', 9, 2, 'Dalaran', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Dalaran?'),
('50000', 10, 2, 'Shattrath', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Shattrath?'),
('50000', 11, 2, 'Booty bay', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Booty bay?'),
('50000', 12, 2, 'Gurubashi arena', 1, 1, '50000', 0, 0, 0, 'Are you sure, that you want to go to Arena?'),
('50000', 13, 3, 'Eastern Kingdoms', 1, 1, '50000'+5, 0, 0, 0, NULL),
('50000', 14, 3, 'Kalimdor', 1, 1, '50000'+6, 0, 0, 0, NULL),
('50000', 15, 3, 'Outland', 1, 1, '50000'+7, 0, 0, 0, NULL),
('50000', 16, 3, 'Northrend', 1, 1, '50000'+8, 0, 0, 0, NULL),
('50000', 17, 9, 'Classic Dungeons', 1, 1, '50000'+1, 0, 0, 0, NULL),
('50000', 18, 9, 'BC Dungeons', 1, 1, '50000'+2, 0, 0, 0, NULL),
('50000', 19, 9, 'Wrath Dungeons', 1, 1, '50000'+3, 0, 0, 0, NULL),
('50000', 20, 9, 'Raid Teleports', 1, 1, '50000'+4, 0, 0, 0, NULL),


('50000'+1, 0, 2, 'Gnomeregan', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Gnomeregan?'),
('50000'+1, 1, 2, 'The Deadmines', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to The Deadmines?'),
('50000'+1, 2, 2, 'The Stockade', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to The Stockade?'),
('50000'+1, 3, 2, 'Ragefire Chasm', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Ragefire Chasm?'),
('50000'+1, 4, 2, 'Razorfen Downs', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Razorfen Downs?'),
('50000'+1, 5, 2, 'Razorfen Kraul', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Razorfen Kraul?'),
('50000'+1, 6, 2, 'Scarlet Monastery', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Scarlet Monastery?'),
('50000'+1, 7, 2, 'Shadowfang Keep', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Shadowfang Keep?'),
('50000'+1, 8, 2, 'Wailing Caverns', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Wailing Caverns?'),
('50000'+1, 9, 2, 'Blackfathom Deeps', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Blackfathom Deeps?'),
('50000'+1, 10, 2, 'Blackrock Depths', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Blackrock Depths?'),
('50000'+1, 11, 2, 'Blackrock Spire', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Blackrock Spire?'),
('50000'+1, 12, 2, 'Dire Maul', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Dire Maul?'),
('50000'+1, 13, 2, 'Maraudon', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Maraudon?'),
('50000'+1, 14, 2, 'Scholomance', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Scholomance?'),
('50000'+1, 15, 2, 'Stratholme', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Stratholme?'),
('50000'+1, 16, 2, 'Sunken Temple', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Sunken Temple?'),
('50000'+1, 17, 2, 'Uldaman', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Uldaman?'),
('50000'+1, 18, 2, 'Zul'Farrak', 1, 1, 0, 0, 0, 0, 'Are you sure, that you want to go to Zul'Farrak?'),
('50000'+1, 19, 7, 'Back..', 1, 1, '50000', 0, 0, 0, NULL);


With a quick view you can note that the NPC opens menu_id 50000 by default. (it is marked in creature_template)
You should also note that "Classic Dungeons" has action_menu_id set to '50000'+1, so clicking Classic Dungeons shows menu_id 50001 (aka '50000'+1)
This should already be enough to explain how it works.

You can also note that the back button in the submenu (menu_id
'50000'+1) has action_menu_id set to 50000, which is the main menu.
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Sub-menu help

Post by negative890 on Tue Dec 25, 2012 8:03 am

Ty mate

negative890

Viestien lukumäärä : 2
Join date : 2012-12-24

Back to top Go down

Re: Sub-menu help

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum