• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Gossip Npc Help ;(

Status
Not open for further replies.

Andrew

ED Beta Tester
Trying to figure out if it's possible to do something with gossip options but I'm not very firmiliar with making Gossip menus etc.

It's with the multi vendors but I want to do something for a Transmog mall to make things compact and not have 1234123 npcs everywhere. Basically what I want to do is take an npc and name it something along the lines of "Cloth Transmog Items" Then within that gossip npc, if you clicked that option it'd open another menu which would be the mutli vendor that so on opens into the vendor for items.

Sorry if that was confusing.


Long story short, linking a already made multi vendor into an additional gossip option so i can essentially put like.. 5 multi vendors into one gossip npc



If someone could possibly make something like this for me and send it to em for an example that would be nice. With instructions too.
 
Last edited:

Tommy

Founder
Of course it is possible. Only thing that you need to do is create the gossip menu and in the actions send a specific vendor's inventory list. I've always wondered why people called this Multi-Vendor when technically it is only gossip that does everything -- it should be gossip vendor! Is this 3.3.5 or 4.3.4? Either way it doesn't matter, unless somethings changed in Cataclysm with the packet.

Here's the modification: http://emudevs.com/showthread.php/36...t=Multi+Vendor

Once you apply that, here is an example I whipped up on how to use it like you want it:

Code:
[/FONT]class npc_vendor : public CreatureScript
{
public:
    npc_vendor() : CreatureScript("npc_vendor") { }
	
	bool OnGossipHello(Player* player, Creature* creature)
	{
	    player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, "Cloth Transmog Items", GOSSIP_SENDER_MAIN, 1);
		player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, "Plate Transmog Items", GOSSIP_SENDER_MAIN, 2);
		player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nevermind", GOSSIP_SENDER_MAIN, 99);
		player->SEND_GOSSIP_MENU(1, creature->GetGUID());
	    return true;
	}
	
	bool OnGossipSelect(Player* player, Creature* creature, uint32 /* sender */, uint32 actions)
	{
	    player->PlayerTalkClass->ClearMenus();
		switch (actions)
		{
		    case 1:
			    player->GetSession()->SendListInventory(VENDORGUID, VENDORENTRY); // Cloth Transmog Items Vendor
			    break;
			case 2:
			    player->GetSession()->SendListInventory(VENDORGUID, VENDORENTRY); // Plate Transmog Items Vendor
			    break;
			case 99:
			    player->CLOSE_GOSSIP_MENU();
				break;
		}
	    return true;
	}
};




void AddSC_multiple_vendors()
{
    new npc_vendor;
}
[FONT=Verdana]
 
Status
Not open for further replies.
Top