Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to make an auction system?

Asked by 4 years ago

I am making an rpg type game and i want players to be able to auction items by talking to a npc and puting the item into a workspace gui that other people can come and talk to that npc to pull up all the listed items for sale and bid on them.

My problem is of course people leaving the server when the items time is not up yet or they bid and then leave the server. I also have little knowledge on how each server responds to each other. I thought about having a bank system tied to each players id so if the item sells, the money goes into the bank and if the person logs back on later they can pick it back up.

But i am still confused on how information is transferable between servers. Say a person sells a sword for 1 hour in auction and they leave the game. The sword sells for 100 coins but since the player is gone, it goes to the bank. If the player logs back on later in the day on a whole other server than they where on, will the money still be in the bank? What if the server shuts down while the item is still up for auction with time on it? Should i just void the bids and put the item into the bank? What if the person put the sword up for auction for 1 hour, logs out, comes back in within the hour but is in another server but can they access the auction gui and see the sword thats up for auctiob? Is it possible to put the auction gui so it connects to all servers?

i know this is alot of questions but i am trying to figure out my options.

0
What you can do, is save each item in a global datastore with a table of bids from players. Whoever wins you can use UpdateAsync, add it into a player's inventory system while also removing it from the auction. You can also set a "LobbyServer" which is a server that manages all of the auctions. BlackOrange3343 2676 — 4y
0
Post your code. Also, make a more descriptive title hiimgoodpack 2009 — 4y
0
chill your moderation butt checks mr. pack .... why would he post code for a conceptual question? ForeverBrown 356 — 4y
0
Forever is right, this doesn't require code. He is asking conceptual question your moderation is not on point and ahould be removed. karlo_tr10 1233 — 4y
View all comments (3 more)
0
duuuuuuuuuuuuuuude this is a concept hiimgoodpack like forever said, chill your moderation BashGuy10 384 — 4y
0
hiimgood look at how many claims u've made EmbeddedHorror 299 — 4y
0
The OP asks about the items being transferred between different servers and what happens when something gets saved in one server. The answers to the question would rely on the code which saves the items. The title asks how the OP would make an auction system, when the OP actually wants to know about what will happen between servers when something happens. hiimgoodpack 2009 — 4y

Answer this question