Merchant Creation

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
abndrew82
Posts: 31
Joined: Tue Apr 13, 2010 3:37 pm

Merchant Creation

Post by abndrew82 » Tue Apr 20, 2010 12:33 pm

Hello

I am reading through the Wiki and looking at the Tutorials on the site, but have been unable to find a guide to creating merchants.

First what I am doing is making a small Village area in Village of Shin where my Players are going to start and get some small quests and buy their starting stuff they need. So I need to make a merchant here that will sell all the basic items.

I see this under the Database Spawns part of the Wiki

Merchant Fields

This allows you to configure the NPC as a merchant, note you should tag the entity command ie: frommerchant (see your entity_command table) or bank etc.

* merchant_id = The merchant list id
* merchant_type = (1 - no buy), (2 - no buy back), (3 - spells), (4 - crafting)

But dont really understand exactly what I have to do.

So am curious if I am on the right path with this thought process

Create a basic NPC Spawn
Make him a Merchant (Not sure Commands to do so though)
Add Items to him for Sale ( Not sure commands here either) (But would think could be done via DB also)

Another Question - Is there a list somewhere of what all the Class_Id's and Race_Id's are, cant seem to find one, that says what ID belongs to each class / race.

Thanks for any info, as I continue to learn this stuff and try and build my world

Drew

User avatar
ZexisStryfe
Posts: 1026
Joined: Thu Jul 26, 2007 6:39 am
EQ2Emu Server: Sytherian Legends
Location: Connecticut
Contact:

Re: Merchant Creation

Post by ZexisStryfe » Tue Apr 20, 2010 4:51 pm

Use the merchant_inventory table to set up merchant inventories. They assign the inventory to a merchant ID in the merchants table, then assign the same merchant ID to a spawn. You also need to set buy/sell as the primary action for the spawn.
~ EQ2 Emulator Project Manager

Image
Image
Image
"Zexis, from this day forth, you shall be known as... '3 of 6'" - John Adams

abndrew82
Posts: 31
Joined: Tue Apr 13, 2010 3:37 pm

Re: Merchant Creation

Post by abndrew82 » Tue Apr 20, 2010 4:55 pm

Ok so my logic so far was basically correct

I think I understand and got this now, just gotta fine tune to make it work

I got an NPC Spawn created
I edited the entry for him in my database to give him a merchant_id and a merchant_type
Gave him merchant_type of 1 currently but testing those to get it working

I also Created a Merchant in the merchants table and added like 8 items to that Merchant ID and linked the merchant_id's and inventory_id's

I got it where I can open him up as a merchant, but he is listing nothing for sale, so leads me to think that my issue is somewhere in the merchant_inventory

abndrew82
Posts: 31
Joined: Tue Apr 13, 2010 3:37 pm

Re: Merchant Creation

Post by abndrew82 » Wed Apr 21, 2010 3:49 pm

Update on this issue, to see if anybody can understand what I am doing wrong

I have a merchant created now

But for some reason, no matter what I did at first, would he have anything to sell, I had him in the these tables with these settings

merchants
id = 2, merchant_id = 2, inventory_id = 7 description = mymerch

And then in the table merchant_inventory I had the following fields (The Item IDs there, are for some basic level 1 Tin Chainmail armor)

id = 1, inventory_id = 7, item_id=55132, quantity=6535
id = 2, inventory_id = 7, item_id=55133, quantity=6535
id = 3, inventory_id = 7, item_id=55134, quantity=6535
id = 4, inventory_id = 7, item_id=55135, quantity=6535
id = 5, inventory_id = 7, item_id=55136, quantity=6535

Now when was happening is he would show as a merchant but never would have anything for sale.

So I went and changed the Spawns Merchant ID from 2 to 1 (Which was for the current merchant that was already in game, who sells food, water, and a backpack)

This made it so that my merchant now sells those items, but I have since then tried to add more items to inventory table and changed all my previous items to be in inventory_id 1 so that all merchants would sell them.

But that appears to not work, he still only sells the 3 items. I have also added some other items, but nothing seems to want to actually add more items to the merchant.

Here is an export of the items I added most recent that also dont show up

INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (12, 1, 1004, 65535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (13, 1, 1000, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (14, 1, 1001, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (15, 1, 1002, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (16, 1, 1003, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (17, 1, 1004, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (18, 1, 1005, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (19, 1, 1006, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (20, 1, 1007, 6535);

Any assistance would be greatly appreciated, really trying to get this merchant working, so that I can move onto beating my head against getting my quests working, which are another whole learning process for me to get some good more in depth quests for my world.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Merchant Creation

Post by Zcoretri » Wed Apr 21, 2010 4:28 pm

abndrew82 wrote:Update on this issue, to see if anybody can understand what I am doing wrong

I have a merchant created now

But for some reason, no matter what I did at first, would he have anything to sell, I had him in the these tables with these settings

merchants
id = 2, merchant_id = 2, inventory_id = 7 description = mymerch

And then in the table merchant_inventory I had the following fields (The Item IDs there, are for some basic level 1 Tin Chainmail armor)

id = 1, inventory_id = 7, item_id=55132, quantity=6535
id = 2, inventory_id = 7, item_id=55133, quantity=6535
id = 3, inventory_id = 7, item_id=55134, quantity=6535
id = 4, inventory_id = 7, item_id=55135, quantity=6535
id = 5, inventory_id = 7, item_id=55136, quantity=6535

Now when was happening is he would show as a merchant but never would have anything for sale.

So I went and changed the Spawns Merchant ID from 2 to 1 (Which was for the current merchant that was already in game, who sells food, water, and a backpack)

This made it so that my merchant now sells those items, but I have since then tried to add more items to inventory table and changed all my previous items to be in inventory_id 1 so that all merchants would sell them.

But that appears to not work, he still only sells the 3 items. I have also added some other items, but nothing seems to want to actually add more items to the merchant.

Here is an export of the items I added most recent that also dont show up

INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (12, 1, 1004, 65535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (13, 1, 1000, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (14, 1, 1001, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (15, 1, 1002, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (16, 1, 1003, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (17, 1, 1004, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (18, 1, 1005, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (19, 1, 1006, 6535);
INSERT INTO `merchant_inventory` (`id`, `inventory_id`, `item_id`, `quantity`) VALUES (20, 1, 1007, 6535);

Any assistance would be greatly appreciated, really trying to get this merchant working, so that I can move onto beating my head against getting my quests working, which are another whole learning process for me to get some good more in depth quests for my world.
Are those item_id's valid? And why are your quantity values 6535 instead of 65535?
You are restarting your world server after each change?

abndrew82
Posts: 31
Joined: Tue Apr 13, 2010 3:37 pm

Re: Merchant Creation

Post by abndrew82 » Wed Apr 21, 2010 5:50 pm

That was the issue, restarted my server and nowb my merchant has the items, so going to finish tweaking him tomorrow, and move onto my quest work.

Ahh that is probably the issue. I have not restarted my world server since I started it, just been reloading spawns and such. And the quantity I just typed wrong in the post.

Will have to restart tonight and see if that solves my issue.

Thanks

Drew - posted from my droid

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests