I think this would be an excellent compromise for Bazaar functionality.
In my head, I personally think it would be best to incorporate in-game commands to move items you want to sell into a "bank" (read: a separate table in the DB, maybe called trader_items or something like that), then manipulate everything out of the game, through a web interface. For buyers, you could then send money to your trader account via an in-game command (kinda like a PayPal account) to buy items. Once you buy items, you could then either keep them in your bank until you remove them with another in-game command, or have it automatically put into the first available slot in your inventory or in-game bank.
The reason I think that would be the better way to do it is because characters' money is stored in the profile blob. It is only loaded from the database when loading into the server, so if someone is already logged in and you try to update it, they wouldn't actually lose any money for the transaction. And unless you use the built-in web server, you can't easily find out if someone's logged in or not (unless you use the telnet commands, which is kinda messy).
Luckily, the inventory stuff is all in tables in the database, so that's easy enough to manipulate directly via a web page (and is updated into the database real-time by the server).
Anyways, some stuff to think about...
|