Auto-populating merchants
I know this has been touched on here and there before and its something ive always wanted on my server. Is there a way to set up merchants that will randomly pull from the items database to stock their wares? Reset on a timer would be nice but even a reset on server boot up would be just as good for me. How would I go about setting this up and what work outside of the pl file would be needed?
|
Hey Azrealvect!
I was also looking for this for some makeshift trader system. I tried learning Pearl for this but I already had some experience in SQL(Very little really). I ended up with the following that I pretty much looped over and over for the number of MerchantsIds I had in another table. The script below only shows how to get random items of a certain item type in MariaDB/MySQL. You could easily change this to work to pull any item by removing the "itemtype =" line. Code:
-- Select used to provide random items to Bazaar merchants |
All times are GMT -4. The time now is 09:15 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.