View Full Version : [SOLVED] Vendor problem

03-24-2016, 09:31 AM
Hellou guy's.

Find on forum example of code and wanted to test it. Well 75002 is gossip entry, and 75006 is npc vendor flaged entry. But When I click Test nothing happen and no error's show. Where seems to be a problem ?

local vendorEntry = 75002
function vendorGossipHello(event, player, creature)
player:GossipMenuAddItem(0, "Test",0, 75006)
player:GossipSendMenu(103, creature)

function vendorGossipSelect(event, player, creature, sender, intid, code)

RegisterCreatureGossipEvent(vendorEntry, 1, vendorGossipHello)
RegisterCreatureGossipEvent(vendorEntry, 2, vendorGossipSelect)

03-24-2016, 09:52 AM
If you only have Eluna without custom modifications then the function only takes the creature argument and the intid you pass is ignored.
The creature must be a valid vendor and it may need to have items in it's vendor.

If you want to pass the entry of the vendor you want to show to the SendListInventory method, you need the multivendor coremodification and a small edit in Eluna so that the intid id passed to the SendListInventory c++ function.

03-24-2016, 10:55 AM
Since I am still more newb at this. Can someone tell/post me all needed modeficatio's I need ?

Thank you emudev's comunity!

Greeting's, Marko.

03-24-2016, 01:11 PM
You need this: http://rochet2.github.io/Multivendor.html
and then to enable using it through Eluna you need to edit this:
Like so:

* Sends a vendor window to the [Player] from the [WorldObject] specified.
* @param [WorldObject] sender
+ * @param uint32 vendorentry = 0 : entry of the vendor to show, sender's vendor shown if omitted
int SendListInventory(Eluna* /*E*/, lua_State* L, Player* player)
WorldObject* obj = Eluna::CHECKOBJ<WorldObject>(L, 2);
+ uint32 vendorentry = Eluna::CHECKVAL<uint32>(L, 3, 0);

- player->GetSession()->SendListInventory(obj->GET_GUID());
+ player->GetSession()->SendListInventory(obj->GET_GUID(), vendorentry);
return 0;