Page 1 of 1

[mod] AdvancedMarket [advanced_market]

PostPosted: Fri Sep 20, 2013 14:32
by arsdragonfly
Trade everything everywhere, no chest-shops involved! Acts like a stock market!!!
Github repo:https://github.com/arsdragonfly/advanced_market
License:CC0
Dependencies:money,locked_signs

Quick start:
Dig some dirt.
Hold the dirt in your hand.
/am sell 5
(sell these dirt at the price of 5$ each dirt block)
/am buy default:dirt 1 5
(buy 1 dirt block at the price of 5$, in this case the deal is then concluded)
/am refreshbuffer
(the dirt is in your "buffer", and you use this command to put it back into your inventory.)

Buy low , sell high and maybe become a monopoly! :D
This mod is still WIP and has many bugs to be fixed :P

New feature
Added vieworder (/am vieworder)
Added cancelorder (/am cancelorder <order_number>
Added viewlog (/am viewlog)
Added getname (/am getname) to get the engine name of the item you're holding, like default:dirt.

A diagram to help you understand all the stuff:
Image

Data structure:
+ Spoiler

Full readme:
+ Spoiler

PostPosted: Fri Sep 20, 2013 14:35
by rubenwardy
I recommend you change your commands to /am or amarket. Shorter.

PostPosted: Fri Sep 27, 2013 13:01
by arsdragonfly
rubenwardy wrote:I recommend you change your commands to /am or amarket. Shorter.

Updated.
https://github.com/arsdragonfly/advanced_market/commit/0f1e84ce6fa170a355d5e3edfc28be6a08e511b9

PostPosted: Fri Sep 27, 2013 16:12
by Dan Duncombe
arsdragonfly wrote:
rubenwardy wrote:I recommend you change your commands to /am or amarket. Shorter.

Updated.
https://github.com/arsdragonfly/advanced_market/commit/0f1e84ce6fa170a355d5e3edfc28be6a08e511b9


Not to mean anything, but my money mod uses craftitem money, not virtual accounts, intentionally, because I don't like the virtual account concept, it is too easily tweaked by admin.

PostPosted: Fri Sep 27, 2013 16:56
by rubenwardy
You can go into players/name.txt and edit their inventory.

PostPosted: Fri Sep 27, 2013 18:44
by Dan Duncombe
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest

PostPosted: Sat Sep 28, 2013 00:46
by arsdragonfly
Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest

For the safety of your personal account, you can use your "virtual" money to buy any item which you think is valuable.
Manipulating a craftitem-based market is as easy as /giveme blah blah blah and /am buy(or sell) blah blah blah :P
Also, virtual money can be easily divided. This is a great advantage as well.
E.g. suggest cobblestone worth 0.01$/brick , 0.01craftitemoney/brick, buying 50 cobblestone would be harder on a craftitem-based market.

PostPosted: Sat Sep 28, 2013 10:13
by Dan Duncombe
arsdragonfly wrote:
Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest

For the safety of your personal account, you can use your "virtual" money to buy any item which you think is valuable.
Manipulating a craftitem-based market is as easy as /giveme blah blah blah and /am buy(or sell) blah blah blah :P
Also, virtual money can be easily divided. This is a great advantage as well.
E.g. suggest cobblestone worth 0.01$/brick , 0.01craftitemoney/brick, buying 50 cobblestone would be harder on a craftitem-based market.

You can't use giveme if you don't have the priv. Anyway, you could just give yourself 50 diamonds and sell them to the server admin and cheat that way.

PostPosted: Sat Dec 07, 2013 08:55
by arsdragonfly
Updated!

PostPosted: Sat Dec 07, 2013 10:11
by Krock
arsdragonfly wrote:Updated!

Cool, please also update image previews, they're down :/

PostPosted: Sat Dec 07, 2013 11:45
by arsdragonfly
Krock wrote:
arsdragonfly wrote:Updated!

Cool, please also update image previews, they're down :/

Are they ok now?

PostPosted: Sat Dec 14, 2013 09:25
by arsdragonfly
bump

Re: [mod] AdvancedMarket [advanced_market]

PostPosted: Sat May 31, 2014 13:18
by arsdragonfly
Update and bump!

Re: [mod] AdvancedMarket [advanced_market]

PostPosted: Mon Jul 14, 2014 15:14
by arsdragonfly
Updated. Now with fewer bugs.

Re: [mod] AdvancedMarket [advanced_market]

PostPosted: Mon Jul 14, 2014 18:26
by rubenwardy
Usually with stock markets you put limits on it, rather than a set price. Like, I want to sell for no less than £5. I want to buy for no more than £6 pounds.

Re: [mod] AdvancedMarket [advanced_market]

PostPosted: Mon Jul 14, 2014 23:08
by arsdragonfly
rubenwardy wrote:Usually with stock markets you put limits on it, rather than a set price. Like, I want to sell for no less than £5. I want to buy for no more than £6 pounds.

That's the way it works. You can try it out yourself by wash buying/selling.

Re: [mod] AdvancedMarket [advanced_market]

PostPosted: Thu Jul 09, 2015 10:51
by arsdragonfly
Mod updated with some tweaks/fixes.

Re:

PostPosted: Fri Jul 10, 2015 19:00
by Anonymous_moose
Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest


Anyone can get it if it is in a chest.
A locked chest, on the other hand....

Re: Re:

PostPosted: Sun Jul 12, 2015 23:39
by programmingchicken
Anonymous_moose wrote:
Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest


Anyone can get it if it is in a chest.
A locked chest, on the other hand....

Can be edited with a mod to default_game and a priv.

Re: [mod] AdvancedMarket [advanced_market]

PostPosted: Mon Jul 13, 2015 08:36
by prestidigitator
Pretty cool. I'd suggest renaming "refreshbuffer" to something more user-centric and more intuitive, and possibly enhancing and breaking it up into smaller functions, with the understanding that the amount of stuff being handled by a user at any one time might grow quite a bit beyond test scenarios. Also an "account" metaphor might make more sense to many users than "buffer". Maybe something like:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/am deposit
-> Put 5 default:wood from hand into account (5 in stock)

/am balance
-> $0
-> 5 default:wood

/am sell all default:wood for $5
-> Selling default:wood for $5 each (5 in stock, no limit)

/am orders
-> Selling default:wood for $5 each (5 in stock, no limit)

-> Henry bought 3 default:wood for $5 each ($15 total)

/am balance
-> $15
-> 2 default:wood

/am withdraw all default:wood
-> Withdrew 2 default:wood from account into inventory (0 in stock)

/am orders
-> Selling default:wood for $5 each (0 in stock, no limit)

/am deposit
-> Put 10 wool:white from hand into account

/am deposit
-> Put 4 default:steel_ingot from hand into account

/am balance
-> $15
-> 10 wool:white
-> 4 default:steel_ingot

/am sell 2 wool:white for $10
-> Selling wool:white for $10 each (10 in stock, limit 2)

/am sell all default:steel_ingot for $50
-> Selling default:steel_ingot for $50 (4 in stock, no limit)

/am buy all default:steel_ingot for $40
-> Buying default:steel_ingot for $40 (4 in stock, no limit)

-> Henry bought 1 wool:white for $10

/am balance
-> $25
-> 9 wool:white
-> 4 default:steel_ingot

/am orders
-> Selling default:wood for $5 each (0 in stock, no limit)
-> Selling wool:white for $10 each (9 in stock, limit 1)
-> Selling default:steel_ingot for $50 each (4 in stock, no limit)
-> Buying default:steel_ingot for $40 each (4 in stock, no limit)

-> Henry bought 2 default:steel_ingot

/am sell 0 wool:white
-> Canceling sale of wool:white

-> Bought 3 default:steel_ingot from Stan for $38 each ($114 total)
-> Henry bought 5 default:steel_ingot for $50 each ($250 total)

/am buy 10 default:mese_crystal for $100
-> Buying default:mese_crystal for $100 each (0 in stock, limit 10)

/am buy 5 default:mese_crystal
-> Buying default:mese_crystal for $100 each (0 in stock, limit 5)

/am orders
-> Selling default:wood for $5 each (0 in stock, no limit)
-> Selling default:steel_ingot for $50 each (0 in stock, no limit)
-> Buying default:steel_ingot for $40 each (0 in stock, no limit)
-> Buying default:mese_crystal for $100 each (0 in stock, limit 5)


(It's pointless to worry about what admins can do. Admins control mods, not the other way around. While mods should be designed to make it difficult to accidentally do something destructive, they should ultimately be focused on empowering admins rather than limiting them.)