I'm creating a new RPG, but I can't seem to figure out how to make an auction system much like the one used in Seika.
What I'm wanting to do is have 3 verbs. 1 is to start an auction which will ask for an item out of the user's inventory to auction, and then add it into a (list?) that can only hold 1 item. After that, it will ask a price to start the bidding at. After awhile, if the item is not bid on, it should return to the user's inventory.
The second one is to stop an auction, therefore returning the object in the (list?) to the users inventory and cancels all bids out.
The third one is a bid verb. This should not be less or equal to the object in the (list?)'s saleprice, and this will update the object in the (list?)'s saleprice to the new amount. Once the object has had a bid on it for so long, it should be given to the highest bidder, and the saleprice should be added to the person who started the auction's gold.
A push in the right direction or something like that would be very helpful.
ID:168866
Aug 19 2005, 1:52 pm
|
|
In response to CaptFalcon33035
|
|
Every time anyone starts an auction, the game locks up.
|
In response to Sinoflife
|
|
I never made a delay to the while proc. That's a vital mistake on my part. Anyway, I'll just make a link to the file so you don't have to indent a bunch of crap.
Auction.zip I wouldn't have zipped it, but HostUltra doesn't allow unknown file extensions for free account users. I'm broke. [Edit] It also doesn't allow remote linking of files. You have to go to the download page and get it yourself. Download Page I should really update that page. |
In response to CaptFalcon33035
|
|
Thanks. However, if someone bids on an item twice, it displays 2 messages to world saying Going once or Going twice, and players can bid something such as 100.1.(Fixed with fintext())
Also, I don't want players to be able to bid on their own item. ex: Artemio has bid 10 on the Large Axe of Knowledge currently at auction. Going once. Going twice to Artemio for Large Axe of Knowledge. Shinryu has bid 11 on the Large Axe of Knowledge currently at auction. Going once. Artemio has bid 10 on the Large Axe of Knowledge currently at auction. Going once. Going twice to Shinryu for Large Axe of Knowledge. Shinryu has won the auction with a bid of 11 gold. |
In response to Sinoflife
|
|
Use the ownbidder variable to check if that person is the bidder. If so, return the proc so that nothing happens. As for the bidding twice thing, check to see if the highbidder variable is referenced to him. If it is, return that proc as well.
There is a while proc in the Auction_Bid verb. Use that to check to see if the user is still the highest bidder. And if he's not, return the proc. |
In response to CaptFalcon33035
|
|
I tried if(O.ownbidder==usr) return, but it says that it's an undefined variable.
|
If there are any flaws, you should be able to notice them right away, I hope.
[EDIT] I never took the verbs away from the person when the auction was stopped.