PDA

View Full Version : How to make a vendor.


Jacksparrow
06-13-2007, 12:25 PM
---------------------------------------------------------------------------
http://www.mediafire.com/?0tnxlei1t1d - sql file that has all the things needed all you have to do is follow the guide and change them to how you like it.
-----------1st command---------------------------------------------
INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, displayid, unk2, unk3, Civilian, Leader)
VALUES
(400000000, "Illidan Stormreaver", "Azzinoths Revenge", 0, 4, 0, 0, 0, 0, 16412, 1, 1, 1, 0);
---------------------------------------------------------------------------
---------customise--------------------------------------------------

52100=the entry ID of your vendor must be unique.
Gladia=name of your vendor.
1H sword vendor =subname (where the guild name would normally appear)
16412=display ID= what your vendor looks like.
Thats all you need to change for that command---------------------------------------------------------------------------

-----------2nd command---------------------------------------------------

INSERT INTO creature_proto
(entry, level, faction, health, mana, scale, npcflags, attacktime,
mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage,
mountdisplayid, item1slotdisplay, item1info1,
item1info2, item2slotdisplay, item2info1, item2info2,
item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor,
resistance1, resistance2, resistance3,resistance4, resistance5,
resistance6, combat_reach, bounding_radius, auras, boss)
VALUES
(400000000, 70, 120*, 10000, 5000, 1, 4, 1000, 300, 400, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, "", 0);
-----------------------------------------------------------------------------
--------------Customise--------------------------------------

52100=entry ID =must be the same as in command 1.
70=level of your vendor.
10000=health of you vendors.
5000=mana of your vendors.
1=size of your monster. 1 is normal size. Having anything (can't be 0) and dont use any '','' in your value
, number like 1,5 may not work.
300=minimum damage he can deal.
400= maximum damage he can do must be greater than the minimum damage.

*120=faction= 120 means he will sell to horde AND ally. PM if you know the other factions I’m missing, so i can add them, thx.
---------------------------------------------------------------------------

-------------3rd command---------------------------

INSERT INTO `vendors` VALUES ('4000000000', '23054', '1');
---------------------------------------------------------------------------

---------------Customise---------------------------------------------

This is where you start adding your stuff to the vendor

52100=vendorGuid must be the same as entry ID in command 2 and 1, otherwise you won’t give the items to the right vendor.
23054=the itemGuid of the item you want to add to your vendor. This is just the entry ID of the item and can be found with the download I’ve included with the guide.
---------------------------------------------------------------------------
------------------------4th command-------------------------------

*INSERT INTO `vendors` VALUES ('52100', '23577', '1');

again,52100 tell to WHO to sell and 23577 tell WHAT to sell.

*This command will give the item to you vendor its the same as command 3 but give another item to your vendors. Repeat this command for each item you want to add, (changing the itemGuid is necessary) ItemGUID= ENTRY ID in the downloaded document

example: In the sql I’ve supplied, the command appears three times. Once for ‘Gressil’, once for ‘Hungering Cold’ and ‘Thunderfury’.

Example:

INSERT INTO `vendors` VALUES ('52100', '23054', '1'); 23054 for gressil see item entry id in the document downloadable on the top of the post

*INSERT INTO `vendors` VALUES ('52100', '23577', '1');
23577 for The hungrering cold.

You can continue to add items this way with a separate line between each of them, new entryID is what you need to change. (see below).

example:
*INSERT INTO `vendors` VALUES ('52100', 'new entryID', '1');

*INSERT INTO `vendors` VALUES ('52100', 'new entryID', '1');

*INSERT INTO `vendors` VALUES ('52100', 'new entryID', '1');

and add as many as you like :p

P.S if you already have a pre-made vendor you can use it too!

example you created a vendor who his entry is 4000000000

You can create a .sql from a normal txt file just change the extension from .txt to .sql

Between each command don’t forgot to skip 1 line then add

*INSERT INTO `vendors` VALUES ('4000000000', '19019', '1');

will add thunderfury(19019)

darkpingu
06-14-2007, 05:12 AM
Man, it works to make an vendor, but when i've added him in game and try to click on him. it crashes the whole server...any idea why?

Jacksparrow
06-14-2007, 12:38 PM
ahh no cause that never happend maybe you messed up or something cause it works for me and nebels

krazyone432
06-14-2007, 12:40 PM
Yesssssssahh!! guess you didnt do my vendors? instead you made a guide for to do myself :P

Jacksparrow
06-14-2007, 12:43 PM
yea yours would take 2 long for me 2 do

krazyone432
06-14-2007, 12:59 PM
can you atleast make me emtpy vendors?

Jacksparrow
06-14-2007, 01:10 PM
ahh just follow the guide its easy

darkpingu
06-14-2007, 01:33 PM
Nah, its not eays xD :P since im doing wrong all the time :P

darkpingu
06-14-2007, 01:35 PM
the 2nd command gets fukked upp when i'm copying it to my vendor sql
:/ it looks totally weirdo

Jacksparrow
06-14-2007, 02:42 PM
ahh just downalod the one i have and edit the stuff thats all

darkpingu
06-14-2007, 03:16 PM
yea but the vendor u made i HUGE! and even tho i .modify scale 0.6 on it
the next time i logg on its that HUGE again... -.-

darkpingu
06-14-2007, 03:22 PM
Man plz make an Empty vendor that we can dl :/ i rly dont understand a sht, cuz if i copy ur vendor then only change the items and the .npc spawn number, it says : Duplicate entry '2000000' for key 1 when i execute it.

Jacksparrow
06-14-2007, 03:30 PM
well like i said follow the instructions and change the size to 1 i made it 4

darkpingu
06-14-2007, 04:24 PM
yea, but the Error about Dublicate entry then?

Wildcard999
06-14-2007, 05:51 PM
Ok you can try this if you dont want to follow the directions, but they are pretty straight forward. Find a vendor name anywhere and then just do a .npc spawn. Once you have the vendor standing there type this command

.vendoradditem | n | Adds to vendor |

while selecting him and then add the items you want. Im not sure if it will work only a thought. I would still go really slow through Jacksparrow directions because they work perfect. Anyways just my two cents, not sure if it is worth much.

Nice guide by the way Jack.

Jacksparrow
06-14-2007, 05:56 PM
well the duplicate like i said follow the guide change that custome id to one that you like

darkpingu
06-14-2007, 07:04 PM
Ok you can try this if you dont want to follow the directions, but they are pretty straight forward. Find a vendor name anywhere and then just do a .npc spawn. Once you have the vendor standing there type this command

.vendoradditem | n | Adds to vendor |

while selecting him and then add the items you want. Im not sure if it will work only a thought. I would still go really slow through Jacksparrow directions because they work perfect. Anyways just my two cents, not sure if it is worth much.

Nice guide by the way Jack.

Yeah, i've already done that 1 time, but its quite boring...Cuz i want to name my vendors myself :(
And btw jack, since i get this error when i execute the file, : error cant dublicate 200000 or whatever. I changed the Value 2000000 to 2000003 and i didnt get that error anymore, but when i added it to my server and right clicked on the vendor to check all his stuff. My whole server crashed and antrix.exe closed and logonserv.exe said : Removing realm "Pinguin's server" .... :/

darkpingu
06-14-2007, 07:07 PM
I changed your vendor sql and it looks like this :

INSERT INTO items (entry, class, subclass, field4, name, name2, name3, name4, displayid, quality, flags, buyprice, sellprice, inventorytype, allowableclass, allowablerace, itemlevel, requiredlevel, RequiredSkill, RequiredSkillRank, RequiredSkillSubRank, RequiredPlayerRank1, RequiredPlayerRank2, RequiredFaction, RequiredFactionStanding, `Unique`, maxcount, ContainerSlots, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, dmg_min1, dmg_max1, dmg_type1, dmg_min2, dmg_max2, dmg_type2, dmg_min3, dmg_max3, dmg_type3, dmg_min4, dmg_max4, dmg_type4, dmg_min5, dmg_max5, dmg_type5, armor, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, ammo_type, range, spellid_1, spelltrigger_1, spellcharges_1, spellcooldown_1, spellcategory_1, spellcategorycooldown_1, spellid_2, spelltrigger_2, spellcharges_2, spellcooldown_2, spellcategory_2, spellcategorycooldown_2, spellid_3, spelltrigger_3, spellcharges_3, spellcooldown_3, spellcategory_3, spellcategorycooldown_3, spellid_4, spelltrigger_4, spellcharges_4, spellcooldown_4, spellcategory_4, spellcategorycooldown_4, spellid_5, spelltrigger_5, spellcharges_5, spellcooldown_5, spellcategory_5, spellcategorycooldown_5, bonding, description, page_id, page_language, page_material, quest_id, lock_id, lock_material, sheathID, randomprop, unk203_1, block, itemset, MaxDurability, ZoneNameID, mapid, bagfamily, TotemCategory, socket_color_1, unk201_3, socket_color_2, unk201_5, socket_color_3, unk201_7, socket_bonus, GemProperties, ItemExtendedCost, ReqDisenchantSkill, unk2)
VALUES (20000006,2,7,-1,"Pinguin's Pizza","Pinguin's Pizza","Pinguin's Pizza","Pinguin's Pizza",32837,6,0,0000,0000,13,-1,-1,80,70,0,0,0,0,0,0,0,99,1,0,1,9999,4,9999,5,9999, 12,9999,14,9999,19,9999,18,9999,36,9999,28,9999,5, 9999,9999,9999999,0,9999,999999,1,9999,9999999,2,9 999,9999999,3,9999,99999999,4,0,9999,9999,9999,999 9,9999,9999,30000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"This will consume anybody who wields it.",0,0,0,0,0,1,1,0,0,0,0,99999999,0,0,0,0,2,0,8,0,4, 0,2888,0,0,0,0);

INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, displayid, unk2, unk3, Civilian, Leader)
VALUES
(4000003, "Pingu", "Pinguin's Pizza", 0, 4, 0, 3, 0, NULL, 17870, 1, 1, 1, 0);

INSERT INTO creature_proto
(entry, level, faction, health, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, item1slotdisplay, item1info1, item1info2, item2slotdisplay, item2info1, item2info2, item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, bounding_radius, auras, boss)
VALUES
(4000003, 100, 120, 10000, 5000, 1, 4, 1000, 300, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, "", 0);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("4000003", "30311", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("4000003", "18584", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("4000003", "18583", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("4000003", "32837", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("4000003", "32838", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("40000003", "32375", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("40000003", "20000006", -1);

Jacksparrow
06-14-2007, 08:02 PM
ahh no here is what it says in mine
INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, displayid, unk2, unk3, Civilian, Leader)
VALUES
(4000000, "Illidan Stormweaver", "Azzinoths Revenge", 0, 4, 0, 3, 0, NULL, 17870, 1, 1, 1, 0);

INSERT INTO creature_proto
(entry, level, faction, health, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, item1slotdisplay, item1info1, item1info2, item2slotdisplay, item2info1, item2info2, item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, bounding_radius, auras, boss)
VALUES
(4000000, 100, 120, 10000, 5000, 5, 4, 1000, 300, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, "", 0);

exept i removed the items so there is a shop with no items

darkpingu
06-14-2007, 08:19 PM
But how do i change the : #number# for it? i mean, like if i want it to be .npc spawn 5000000? and if i wanna the name of it.

Can i change it to look like this :

INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, displayid, unk2, unk3, Civilian, Leader)
VALUES
(5000000, "Pingu", "Pinguin pizza", 0, 4, 0, 3, 0, NULL, 17870, 1, 1, 1, 0);

INSERT INTO creature_proto
(entry, level, faction, health, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, item1slotdisplay, item1info1, item1info2, item2slotdisplay, item2info1, item2info2, item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, bounding_radius, auras, boss)
VALUES
(5000000, 100, 120, 10000, 5000, 5, 4, 1000, 300, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, "", 0);

As u can see, i changed the place where the name stood and both places where it said : VALUES 4000000

Jacksparrow
06-14-2007, 08:20 PM
yes and then when you add item you have to have it like this
INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("5000000", "18582", -1);

darkpingu
06-14-2007, 08:28 PM
THNXXXX!!!
xD

Jacksparrow
06-14-2007, 08:44 PM
np happy to help

darkpingu
06-14-2007, 08:49 PM
Man, i've created a vendor now, but it happens same thing as before...When i right click on the vendor to check the stuff he have, (in game) i get dc and the server crashes :(


Any clue why?

Jacksparrow
06-14-2007, 08:50 PM
idk what rev you using?

KaiserJoe
06-14-2007, 10:38 PM
What table does it save the thing to because I want to remake him, or redo him rather, and it just says my vendor id already tooken. So how do I remove him then add him again?

Jacksparrow
06-14-2007, 11:00 PM
it saves it into vendors

darkpingu
06-15-2007, 12:28 PM
rev 3 :/ same thing happened when i used rev 2 :(

Jacksparrow
06-15-2007, 12:48 PM
idk whats the problem then works fine for other people

darkpingu
06-15-2007, 01:17 PM
Lolz, i have no idea whats the prob...-.- or else i whould have fixed it instead of asking what to do..


Hmm...
Here's what my vendor looks like :


INSERT INTO creature_names
(entry, creature_name, Subname, Flags1, type, Family, Rank, unk4, SpellDataID, displayid, unk2, unk3, Civilian, Leader)
VALUES
(5000000, "Pingu", "Pingus pizza", 0, 4, 0, 3, 0, NULL, 17870, 1, 1, 1, 0);

INSERT INTO creature_proto
(entry, level, faction, health, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, item1slotdisplay, item1info1, item1info2, item2slotdisplay, item2info1, item2info2, item3slotdisplay, item3info1, item3info2, respawntime, resistance0_armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, bounding_radius, auras, boss)
VALUES
(5000000, 100, 120, 10000, 5000, 1, 4, 1000, 300, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, "", 0);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("5000000", "30311", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("5000000", "30317", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("5000000", "22691", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("5000000", "19019", -1);

INSERT INTO vendors
(vendorGuid, itemGuid, amount)
VALUES
("5000000", "18582", -1);

Can you find anything wrong with it? :/

Jacksparrow
06-15-2007, 02:41 PM
ahh no i cannot try to execute the premade one i posted and try to use that one. then tell me what happens

darkpingu
06-15-2007, 05:09 PM
do u mean the "enjoy.sql" ?
I've already executed that 1 and added it to my dl, but when i "right click" on it it works perfectly :S >_<

Jacksparrow
06-15-2007, 05:10 PM
lol ok well maybe ask me to make you a vendor if this doesnt work ill do it for you just post in my other thread where you can request some.

darkpingu
06-15-2007, 05:12 PM
lol ok well maybe ask me to make you a vendor if this doesnt work ill do it for you just post in my other thread where you can request some.

Roger that :D ;P

Jacksparrow
06-15-2007, 05:13 PM
lol maybe you dont have the hand of faith uh uh lol jk

Achay
06-23-2007, 04:45 PM
OMG Jack you are a star, this is exactly what I was looking for. I followed your Guide and made my first vendor and it worked perfectly. Nice job made it so easy to do.

I have two question. How do I set the price of each item. I have a huge amount of vendors and items to load them up with, and would love to be able to change the price in the script I am making. Is there an extra bit I can add to the end of each item that is added setting a new price?

Also, i plan to make a second set of scripts that have exactly the same as the vendor one I made, except remove the create vendor setion, so all it will be doing is restocking. Is this the way it is done or can I set the stock to infinate?

Dr.Kaze
06-23-2007, 04:46 PM
Yeah Jack, thanks, this could help me also with my vender making stuff just as it helped Achay :D

Edit : When I learn how to make my own server :( but I dont have to since Achay has one :D

Achay
06-23-2007, 09:12 PM
I have one more question. Once I have run my vendor script into the Dbase I find that in order to make any changes (im still experimenting so a lot of changes are needed) it wont let me reinstall the script.

Could you show me how to make a remove script? I have removed all reference in the Vendor table but there must be something left as it wont let me install it again, some other table maybe.

[EDIT]

Sorry, Im a muppet, just noticed the creature_proto line, removed it and all is well.

blukkie
06-24-2007, 10:15 AM
Awesome, it worked.
Post 1 could be a bit better though. Badly setup and had to figure out some stuff my own, but none the less it helped me get my 2 vendors to work first time I tried.

kael
07-19-2007, 02:54 AM
heres another one;
shat'tar, too lazy to look up the other one: 1741