Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2011, 11:22 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default Bazaar bots

Has anyone ever done an auction bot ? I was just asking because i also run a Trinity Core server and there is an AHBOT that someone created. Pretty damn cool since it buys and sells items. I got very positive reviews when I added the code to my server. I was thinking this should not be too hard to implement in the EqEmulator server. There again I would not want to recreate the wheel if someone has already done it, or may even be able to build off of existing code. The most I have come up with is someone has created merchants that sell gear in the bazaar.
Reply With Quote
  #2  
Old 01-02-2011, 12:27 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by provocating View Post
Has anyone ever done an auction bot ? I was just asking because i also run a Trinity Core server and there is an AHBOT that someone created. Pretty damn cool since it buys and sells items. I got very positive reviews when I added the code to my server. I was thinking this should not be too hard to implement in the EqEmulator server. There again I would not want to recreate the wheel if someone has already done it, or may even be able to build off of existing code. The most I have come up with is someone has created merchants that sell gear in the bazaar.
I've been thinking about implementing something like this in perl for a while now.

Wouldn't be *that* hard with perl's DBI module.

Just gotta make a table to store items you hand to an NPC, and then have someone who can buy the items search like they do normally in the bazaar, just with mysql queries in perl instead of C++. Table doesn't have to be complex either; just id, itemid, sellername, price, sold (this will be one or zero.)

Hopefully that lets you brainstorm a bit,
Reply With Quote
  #3  
Old 01-02-2011, 02:05 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I am going to get started on this. I have taken PERL classes years ago and have about 20 PERL books around work and my house. It will just take me a while to get back into the groove of things. In fact since I have learned other languages since playing with PERL, it should make more sense to me now.

What they do in Trinity Core is have the BOT buy items in intervals until he reaches his MAX, then he quits. Same with buying, in intervals he will buy auction items for a random price with a min, and max amount. One thing that does pose a question, do all items in PEQ have a buy / sell price and are they realistic ? If not that is going to be the hardest work for me.
Reply With Quote
  #4  
Old 01-03-2011, 02:47 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

The more I think about it, I am not sure this can be done in Perl alone, maybe someone can tell me if it can be done in Perl.

I do not want your standard NPC merchants that I have seen implemented in the past. I want these to have trader satchels with items and the NPC's actually put the items up for sale. This way the player could actually use the Bazaar window to find items, like in live. The NPC's would give random calls pulled out of a table, maybe pull the item names from the table and the asking price, this would be done with variables. The call would be at random times, with the text also being random and pulled from a large pool of possibilities. The merchants would also need to buy the players items if he auctions them, at random times. This would force the player to actually use the auction system and the NPC auctioneer would buy the players items at a lower cost than what he would sell it back for. This sounds like it would be hard to do, but very possible. I am just not sure if I will have to edit the zone file or I could do it all in Perl.
Reply With Quote
  #5  
Old 01-10-2011, 12:54 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by provocating View Post
The more I think about it, I am not sure this can be done in Perl alone, maybe someone can tell me if it can be done in Perl.

I do not want your standard NPC merchants that I have seen implemented in the past. I want these to have trader satchels with items and the NPC's actually put the items up for sale. This way the player could actually use the Bazaar window to find items, like in live. The NPC's would give random calls pulled out of a table, maybe pull the item names from the table and the asking price, this would be done with variables. The call would be at random times, with the text also being random and pulled from a large pool of possibilities. The merchants would also need to buy the players items if he auctions them, at random times. This would force the player to actually use the auction system and the NPC auctioneer would buy the players items at a lower cost than what he would sell it back for. This sounds like it would be hard to do, but very possible. I am just not sure if I will have to edit the zone file or I could do it all in Perl.
Yes, it could be done in Perl. Infact I was just thinking about this once again because I wanted to get to this months ago, but wasn't something I wanted to attack right now. I could have something functional in a short while.
Reply With Quote
  #6  
Old 01-10-2011, 01:09 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Just the code to make an npc hold the satchel and equip it, then turn on trading would be enough. I am just stuck at this part. Maybe there is some undocumented functions I am not aware of.
Reply With Quote
  #7  
Old 08-21-2011, 11:25 PM
BrandeX
Sarnak
 
Join Date: Aug 2009
Location: China
Posts: 33
Default

Quote:
Originally Posted by Secrets View Post
I've been thinking about implementing something like this in perl for a while now.

Wouldn't be *that* hard with perl's DBI module.

Just gotta make a table to store items you hand to an NPC, and then have someone who can buy the items search like they do normally in the bazaar, just with mysql queries in perl instead of C++. Table doesn't have to be complex either; just id, itemid, sellername, price, sold (this will be one or zero.)

Hopefully that lets you brainstorm a bit,
They have seller "bots" on EQTitan server. You hand them items and set a price via # commands. The bots sell them while you are elsewhere or offline, and you collect the cash when you zone in to baz.
Reply With Quote
  #8  
Old 11-28-2011, 10:57 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Well after months of letting it sit I finally got back on this during the Thanksgiving Holidays.

What I ended up doing is starting with just one NPC. The NPC randomly pulls a small list of items from the item table, based on certain criteria. The items are then loading into him like a vendor would. He randomly yells in the zone with random text and links to what is for sale. I know it is a lot of randomness but I did not want anything to be static. I am thinking having him randomly spawn / despawn and during the respawn the items clear out.

It sounds easy to do all of this, but it has not been super easy for me to do with my lack of coding experience, but it is now done. I had to modify the server code a bit because clearing out the vendors items did not seem to have a built in routine. Also the pricing in the database was an issue as some items had a zero value. I found someone had a post on modifying server pricing and used it. I need to go back through that and critique the pricing.

Now all I have left to do is come up with shouts for zone, then make 30+ of these guys with different names, looks, shouts and behaviors.....tada.....East Commons tunnel is now alive.
Reply With Quote
  #9  
Old 11-28-2011, 05:47 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

So far so good, I am sure it needs tons of tweeking, but he is working.

Reply With Quote
  #10  
Old 04-15-2012, 10:17 AM
Furinex
Hill Giant
 
Join Date: Apr 2002
Location: Rochester, NY
Posts: 179
Default

You should share this... Im looking for something for solo servers that allows the acquisition of items unattainable solo. This looks like the solution.
__________________
U.S. Navy - Retired
17 Year EQ Veteran
Reply With Quote
  #11  
Old 01-07-2011, 04:23 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

I would love to see something like that implemented on the server/db.
On live right now, they have a couple of npc's in the pok selling defiant
gear for various levels, which is something I thought about doing for my
server, but it would be kewl to have some bots in Baz, with items that
are searchable with the /baz window.
Reply With Quote
  #12  
Old 01-10-2011, 09:32 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

So my first step is going to be to have them equip the trader satchels, is this possible ? I am going through each and every Perl object under quest, and also some of the other objects but not seeing it yet. I plan on doing a more exhaustive search at lunch today.
Reply With Quote
  #13  
Old 01-10-2011, 11:10 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I am thinking that the whole idea of an NPC holding a traders satchel, and moving items in an out of a database may not work. I guess the whole bazaar trader deal is client side correct ? So even if I could get an NPC to equip a satchel, and put things in it I still could not get them to actually turn on the trader function ?

If all else fails I could rather easily just do this. Set up a spawn point, make that spawn point randomly spawn maybe 10 vendors, each with a 10 percent chance of being spawned. Each vendor has different items. The vendors have player names instead of npc names, makes it more real. Have them do random calls, at random times. This would give an element of randomness. That vendor stays there for an amount of time then despawns at a random time, then it repeats. Do this for maybe 50-100 spawn points would be a start. It is not what I want though. What I actually want are the items randomly generated. As far as getting the items in the database and random items that seems easy with MySQL DBI statements in the vendor Perl file. It is getting that NPC to do the trader things I am getting stuck at.
Reply With Quote
  #14  
Old 01-11-2011, 02:19 PM
Chanus
Hill Giant
 
Join Date: Oct 2010
Posts: 123
Default

I believe pricing is attached to the item itself, and then the variance on vendors is a field on the merchant itself... and then there's things like CHA modifying prices, but that shouldn't come into to play in the Bazaar.
Reply With Quote
  #15  
Old 01-11-2011, 02:31 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Well I know that

I need to know where the data was gathered from ?
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 12:00 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3