Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2012, 10:45 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default merchant idea if possible?

Would it be possible to make a merchant that his sell list is updated?

Something like You have X NPC ( merchant ) and every hour or so a script checks through the items in the DB and selects randomly say 10 or 20 items from the database that have a sell value and are not no drop then adds then to the merchant list setting the price to be something like price value of item normallyx10?

Would that be possible? Would kindof be like having 10 or so Bazaar vendors if it was possible.

Also is there a place where say premade custom merchants are posted that people can look through for their own local servers or something?
Reply With Quote
  #2  
Old 10-25-2012, 11:28 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

I could swear I saw in change-log recently (2-3 months ago) that Perl quest commands were implemented
that allowed to add temporary items to merchants in limited quantities on the fly.

But now I am looking over change-log file and can't see anything like that.
Was I dreaming???

While on the subject - would be nice to implement "merchant greed" Its been long implemented on P99....
Reply With Quote
  #3  
Old 11-05-2012, 10:31 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

What is merchant greed? And anyone have any idea how to begin to implement this? Sounds relatively simple to make static bazaar merchants (say 2 or 3) and have their sale lists be populated from the items table with droppable items and have the price be inflated from the buy price.
Reply With Quote
  #4  
Old 11-06-2012, 12:49 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

merchant greed is a special merchant feature that existed since early days of EQ.

As you know merchant bases his buy/sell prices of your CHA and your faction.
Merchant Greed feature can make additional adjustments to that merchant buy/sell ratio. This is how merchants outside of big city rip you off (buy your items for less and sell you items for more, than the merchants in the city do, while being on same faction) Classical example is Tubal Weaver at Qeynos Gates.

This feature has been implemented a while ago on P99
Reply With Quote
  #5  
Old 11-07-2012, 04:59 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Hmm I dunno much about perl or c++ (Other than previously working on WOW private servers) but it doesnt seem like these things should be very hard to implement. Does noone know any information to get either of these projects rolling? Where in the coding does it account for periodic updates to the world? I mean implementing a timer where the server randomly selects say 20 items from the item db that are not no drop and have a sell price and adding them to a specific merchant should not be that hard SQL queries should be able to do this no?
Reply With Quote
  #6  
Old 11-07-2012, 06:07 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

If they aren't hard to implement then surely you'll have no trouble doing it right?
Reply With Quote
  #7  
Old 11-07-2012, 07:33 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Well that's hardly productive. I'm not insisting it's easy and someone should do it. I'm saying other people seem interested in bazaar bots and if we worked together we may come up with something. I asked if anyone could offer some advice did not ask anyone else to do it simply asked as a community if there were any ideas. Thanks anyways though. If I do intend figure it out I will happily post anything I come up with here.
Reply With Quote
  #8  
Old 11-07-2012, 07:46 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Quote:
it doesnt seem like these things should be very hard to implement.
Quote:
should not be that hard
Quote:
I'm not insisting it's easy
Maybe you are Goldilocks, not too hard, not too easy but juuuuust hard enough.
Reply With Quote
  #9  
Old 11-07-2012, 08:27 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Well i was thinking something along the lines of a command that prompts this.

Code:
Void command_Bazload(Client *c, const Seperator *sep)
{
sprintf(query, INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (22, "select max(slot) +1", (SELECT id from items where nodrop =1 AND price > 200 LIMIT 1, 1), 1));
sprintf(query, INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (23, "select max(slot) +1", (SELECT id from items where nodrop =1 AND price > 200 LIMIT 1, 1), 1));
sprintf(query, INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (24, "select max(slot) +1", (SELECT id from items where nodrop =1 AND price > 200 LIMIT 1, 1), 1));
}
Then have premade Bazaar merchants with ( in this example ) a npcid of 22, 23 and 24.

But as i said earlier i havent worked on server related files in some time and have not worked very much at all on eq related server files so my skills are shall we say extremely rusty. ( so keep in mind that that Query DOES not work correctly. It inserts an item into the list but always the first returned one.)

It seems the problem here is I cannot remember how to make it auto increment the slot id correctly and also make it select the id randomly instead of always returning the first one...

Then it would be a matter of finding in the server coding how to add this into startup, run the query multiple times..say 60 and then when the server restarted it would automatically populate the bazaar vendor with items..

Or you could use the command to do the same instead of putting into the startup automatically.

In response to those people giving me a hard time trying to drum up interest in this.


At least im trying.... It may very well be that I am goldilocks and it is too hard in some respect and easier in others :P

But i am attempting to learn and improve my and others experience.
Reply With Quote
  #10  
Old 11-08-2012, 03:26 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Sorry I cannot seem to Edit my post above so i did not have to double post....


Well i figured some stuff out and this works well enough for me until I get some more work done on it.

At the moment What is required is to create 3 Npcs with MerchantIds of 22, 23, 24 ( You can change this in the SQL if you want to)

Then you dump your items table to a SQL and rename it Bazlist. ( Can also be changed in the SQL if you want to )

Then you run this SQL
Code:
Delete from Merchantlist where merchantid =22;
Delete from Merchantlist where merchantid =23;
Delete from Merchantlist where merchantid =24; 
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 0,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 1,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 2,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 3,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 4,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 5,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 6,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 7,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 8,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 9,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 10,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 11,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 12,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 13,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 14,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 15,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 16,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 17,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (22, 18,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);

INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 0,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 1,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 2,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 3,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 4,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 5,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 6,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 7,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 8,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 9,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 10,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 11,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 12,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 13,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 14,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 15,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 16,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 17,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (23, 18,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);

INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 0,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 1,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 2,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 3,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 4,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 5,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 6,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 7,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 8,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 9,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 10,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 11,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 12,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 13,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 14,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 15,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 16,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 17,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
INSERT into Merchantlist(merchantid, slot, item, faction_required, level_required, alt_currency_cost) VALUES (24, 18,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), -100, 0, 0);
Running that SQL will populate your 3 vendors with 18 items each RANDOMLY chosen from the bazlist table.

The reason I did this by creating a custom table is that you can add or remove items to this list so that they will also randomly appear or NOT appear on the vendor without editing or changing your items table itself.

The benefit of this for instance is that I removed all no drop, all items over reqlevel 65, all LDON reward items, all no rent items from the Bazlist table which will ensure they do not appear on these merchants however they are not removed from the game.

Please feel free to offer and suggestions and improvements to this idea that are you may have.

You can make a DB trigger to run this query every day or so and it will automatically on the fly update their inventories ( players logged in while they query is ran for some reason seem to have to log out to see changes)

I was attempting to make this into a command that can be used ingame but I cannot atm seem to get a command to run a basic SQL query. I will repost here if and when I get that part figured out.
Reply With Quote
  #11  
Old 11-08-2012, 11:44 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Sigh.. I posted the wrong script above. The one i should have posted puts the items into the Merchantlist_temp folder so they only sell 1 of them....

If anyone is interested in it post here and I will put the right one up.

ALSO is there a time limit for editing posts or something?
Reply With Quote
  #12  
Old 11-10-2012, 02:30 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Not sure exactly..but what I've seen is 1 hour to edit.

Also, if you log in from another IP in that hour, that nixes it too.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #13  
Old 09-21-2015, 01:44 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Not sure if anyone used this at all but here is an updated SQL for the current DB versions.

Code:
SET @Npcid1 :=999260; /*Edit this to reflect the Npcid for your first Merchant*/
set @Npcid2 :=999261; /*Edit this to reflect the Npcid for your second Merchant*/
set @Npcid3 :=999262; /*Edit this to reflect the Npcid for your third Merchant*/
/*Ensure your CUSTOM items table you copied from items to create the list that this SQL chooses items from is named Bazlist or change Bazlist below*/

Delete from Merchantlist_temp where npcid =@Npcid1;
Delete from Merchantlist_temp where npcid =@Npcid2;
Delete from Merchantlist_temp where npcid =@Npcid3; 
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 0,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 1,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 2,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 3,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 4,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 5,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 6,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 7,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 8,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 9,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 10,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 11,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 12,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 13,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 14,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 15,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 16,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 17,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid1, 18,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);

INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 0,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 1,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 2,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 3,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 4,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 5,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 6,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 7,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 8,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 9,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 10,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 11,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 12,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 13,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 14,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 15,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 16,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 17,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid2, 18,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);

INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 0,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 1,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 2,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 3,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 4,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 5,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 6,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 7,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 8,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 9,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 10,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 11,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 12,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 13,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 14,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 15,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 16,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 17,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
INSERT into Merchantlist_temp(npcid, slot, itemid, charges) VALUES (@Npcid3, 18,(SELECT id FROM bazlist ORDER BY RAND() LIMIT 1), 1);
Just set the Npcid's at the top and ensure your custom items table is named Bazlist or change it in the Sqls to reflect the name of yours.

To create the bazlist I copied the Items table in my database then ran these a few Queries. DO NOT RUN THESE ON YOUR NORMAL ITEMS TABLE.

Code:
Delete from 'bazlist' where price = 0;
Delete from 'bazlist' where reqlevel > 65;
Delete from 'bazlist' where nodrop = 0;
Delete from 'bazlist' where norent = 0;
Delete from 'bazlist' where ldonprice > 0;
Delete from 'bazlist' where ldonsold >0;
This gives you a table full of droppable pre-level 65 gear that is not from Ldon and has a price at a merchant.

Then the Sql you run will select 60 items from it at random and sell them.

Just like a normal bazaar vendor it will populate with garbage as well (for example 1pp runes and such) so it creates a bit of fun checking them to see what has been added.

Not sure if anyone was using but figured id update since i've been using it for awhile.
Reply With Quote
  #14  
Old 09-21-2015, 01:56 PM
starblight's Avatar
starblight
Sarnak
 
Join Date: Jan 2007
Posts: 76
Default

Thanks for updating. I was thinking about making something like this but was not sure how to go about it.
Reply With Quote
  #15  
Old 09-22-2015, 04:06 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Most welcome starblight.

Next task.

Find a way to make this automatically run every so often..

Im thinking maybe adding it to globals with a timer or something. Or maybe easier to set up a script in Mysql to do it. Not sure at this point.

Might end up just tacking it on to server start up somehow.
Anyone know how to add running an Sql in a batch file? or if thats possible..
Reply With Quote
Reply


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 05:13 AM.


 

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