EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Adding items to a merchant (https://www.eqemulator.org/forums/showthread.php?t=38868)

vindr3d 10-05-2014 09:03 PM

Adding items to a merchant
 
Hey guys.

I am having trouble adding items to my newly created NPC. I have made him and checked to see that he can be right clicked on. The only thing that pops up is a "Cloth Cap". I went to the merchantlist table and added his ID with the slot and item number I want him to sell but they do not show up when I restart everything and click on him. (I want to make him an epic 1.0 vendor for everyone)

What I find weird is that it doesn't have anything in the merchantlist table for his ID for the cloth cap.

It took me probably 4-5 hours to figure out how to create a working merchant(still pretty new at this) because there is a guide to make an NPC but not a merchant.

As always, I appreciate any help/everyones knowledge of getting me this far with the server!!!

jdoran 10-05-2014 09:33 PM

As I recall there is a list of items a vendor might have, and each vendor is then associated with that table.

The 'merchant_id' is the id of the table, and should match merchantid in 'merchantlist'. I haven't done this in a while, and may be off base. But that is as near as I can recall.

Edit: I should be more clear. I am talking about the merchant_id in npc_types matching the id in merchantlist.

vindr3d 10-05-2014 10:56 PM

Yes. I just double checked. Both are id 189528.

Should i Maybe start with slot 2 since slot 1 on him is magically taken by the "Cloth Cap"?

vindr3d 10-05-2014 10:59 PM

nope...just started server and checked...i have the beastlord epics (mh and oh) and bard epic set to be sold by him(slots 2-4) but it still just shows "Cloth Cap"(slot 1 i would assume even though there is no entry for it)

I tried GeorgeS' tool but it kept giving me a database connection error. I followed the instructions provided.



Edit: sorry I fail at editing, I keep quick replying. I have the 3 epics listed in the merchantlist table under the NPC's merchant ID with the other default values (faction required -100, level required 0, alt currency cost 0, classes required 65535, probability 100).

Kingly_Krab 10-05-2014 11:02 PM

Mind running these queries and posting the results?
Code:

SELECT * FROM `merchantlist` WHERE `merchantid` = '189528';
Code:

SELECT * FROM `npc_types` WHERE `merchant_id` = '189528';

vindr3d 10-05-2014 11:24 PM

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.0.9-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use peq
Database changed
MariaDB [peq]> SELECT * FROM `merchantlist` WHERE `merchantid` = '189528';
+------------+------+-------+------------------+----------------+---------------
----+------------------+-------------+
| merchantid | slot | item | faction_required | level_required | alt_currency_c
ost | classes_required | probability |
+------------+------+-------+------------------+----------------+---------------
----+------------------+-------------+
| 189528 | 2 | 8495 | -100 | 0 |
0 | 65535 | 100 |
| 189528 | 3 | 8496 | -100 | 0 |
0 | 65535 | 100 |
| 189528 | 4 | 20542 | -100 | 0 |
0 | 65535 | 100 |
+------------+------+-------+------------------+----------------+---------------
----+------------------+-------------+
3 rows in set (0.00 sec)

MariaDB [peq]>


MariaDB [peq]> SELECT * FROM `npc_types` WHERE `merchant_id` = '189528';
Empty set (0.10 sec)

MariaDB [peq]>



The second query I guess is the problem?




EDIT: I just found the problem. In npc_types table, the merchant ID was different than what I had set it to for the actual ID in the merchantlist table. I changed it to 189528 and then loaded the server. The 3 epics I set the NPC to sell showed up.

Thank you for the help cause without your posts, I wouldn't of even looked at it this much farther.

THANK YOU THANK YOU!!

Kingly_Krab 10-05-2014 11:38 PM

Glad your issue was resolved.

vindr3d 10-05-2014 11:40 PM

For those looking to make a new merchant, make sure you make the class "41". This is the shop keeper class.

Drathil 12-02-2023 04:54 AM

Wow
 
Quote:

Originally Posted by vindr3d (Post 234516)
For those looking to make a new merchant, make sure you make the class "41". This is the shop keeper class.

You my friend, are a life saver. Thank you.


All times are GMT -4. The time now is 01:41 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.