Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Tutorials/Howto's > Tutorials--Outdated Use the Wiki > Tutorials::Discussion

Tutorials::Discussion Discuss Tutorials here. Do NOT POST tutorials here, they belong on the wiki.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-29-2004, 04:23 PM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default HOWTO - Create Custom Merchant with Custom Prices

Ok, so i finally succeeded in creating a custom merchant with custom prices on my linux box, and although all the information is here, it seems to be spread out a bit and i thought i'd do a quick write-up and synthisize the info for anyone who doesn't already know how to do this.... worst case it just get's burried in the back of the forum topic's lists or gets deleted /shrug



Ok, this tutorial is going to be using straight-up mysql prompt on the linux box, which is what i was using... never downloaded any of the mysql front end or anything but i'd imagine it's much the same, so they should all more or less work with the commands i'll give as examples...


First off, you need to make yer custom merchant's merchantid table... this is simple enough...

First, you need all the itemid's of the items you're going to put on your merchant... this is simple enough; I did it by logging into the game and doing a #finditem (item name) to get the item id # for the item... if you like you can type it into the mysql cmd line using

Quote:
SELECT id from ITEMS WHERE name = '(item name)';
If you only know part of the name, use a Like command

Quote:
SELECT id from ITEMS WHERE name LIKE '(part of item name)%';
Note that the % should be where the part of the name you don't know is.... so if you want to know something like an iron ration, or a iron ration or something you could do '%ration' for example...

This also means you can glue bits and peices together with %'s between, ... % just means to the command 'and something else where i don't know what' so if you were lookin for an item named Blighted Robe you could do a Like Bl%ted%b% and it would come up, since the first % includes all possible characters between Bl and ted... so Bl igh ted would be returned... this will help if you remember bits and peices of an item name.

Ok, once you get the item returned (whether in game or in the above search query) it should have the item id off to the left, a number... for example 1233 is a blighted robe (random one i seem to have accidently memorized... not that i play necros or anything )

Now, repeate these steps and write down a list of all the item id's that you want to have on yer merchant...

Next; open up a text editor (or, if your non ghetto, try a real editor, i used notepad until i realised i was gonna be doin this alot, then i switched over to ultraedit32... anything that can save in .sql or .txt will work however)

ok, type in 'use (name of database)' in my case my DataBase (DB) is named eq, so i have 'use eq' at the top... not really sure if this is needed, but i find mysql to do wierd things so redundancy never hurts.

Go to the next line and type;

Quote:
insert into merchantlist (merchantid,slot,item) values;
after values type in (merchantid-number, slot, itemidnumber); Make sure to add the semi-colon or your gonna be in a world of hurt

So lets assume i want to impliment a backpack (itemid 17969 in my DB) into merchantid# 56008, on slot 1 of the merchant, the line would look like;

Quote:
insert into merchantlist (merchantid,slot,item) values (56008,1,17969);
Repeate this step changing the slot number only to create a complete merchant list... i.e. keep the merchant id number the same for every item you want the same merchant to be selling.

Thus if i want a merchant to sell a bunch of bags it'd be...

Quote:
insert into merchantlist (merchantid,slot,item) values (56008,1,17969);
insert into merchantlist (merchantid,slot,item) values (56008,2,17403);
insert into merchantlist (merchantid,slot,item) values (56008,3,17359);
Where 17969, 17403, and 17359 are all bags that i wish the same vendor to be selling.

Ok, once you finish your file with every item you wish assigned a slot number, save the file as something you can easily remember, and bring up your mysql cmd line on your linux box...

Type in source /(location of file)/filename

So, in the above case, had i saved the file as 'bagmerchant.txt' under the folder 'eq' i'd type

Quote:
source /eq/bagmerchant.txt;
This pre-supposes you have the file saved on the same computer, which isn't necessarily true for your linux box... if it's saved elsewhere you should know how to specify the location of the file to your own box, but it'll vary with your network setup, so that's for somewhere else... for the sake of this tutorial i suggest just putting it on the same box if you can /shrug

Ok, congradulations, you have now created your own merchantid with all of your own custom merchant information.

Next step is spawning the merchant:

Go in-game with a gm-flaged character with the #spawn ability. Type #spawn to get the order of information you need to place, for more info on this, see this great How-To: http://www.eqemulator.net/forums/viewtopic.php?t=8225

Now you should see how to create a spawn... simply put in the desired race/hp/level etc, for the sake of this tutorial the only important fields are the (Class) and the (Merchant_id) fields.

In order to create your vendor, you must put 41 as the desired class (merchant) and the merchant_id must be the same id you specified in the above file... thus had you used merchant_id of 56007, you must imput 56007 as the merchant_id field.

So, if i were to spawn a human female merchant with the name "My Merchant" selling the above bags at lvl 75 with 1 million hp it would look like;

Quote:
#spawn My_Merchant 1 75 1 1000000 1 41 0 0 56008
This makes a vendor named My Merchant (_ become spaces) of race 1 (human) level 75 material 1 (see spawn tutorial for more info on this) with 1000000 hit points, gender 1 (female) class 41 (merchant) wielding no visual weapons and a merchant id of 56008.

Congradulations, you have spawned a vendor!!

Now to keep the vendor in that place you spawned it, and to make it stay there when the zone shuts down and comes back up again, type #npcspawn create and then #npcspawn add, now the vendor is in your spawn database and will remain until deleted!

See next Post for information on how to customize item costs and sellback value
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:27 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3