-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TODO: allow players to sell items to server #31
Comments
Put in some crude logic and psuedo code comments to cope with the various combinations of options likely to be encountered in the /sell command
This auto generates the NPC character and balance, adds a npc starting bal constant etc.. might need tweaking i can only test offline..
…t mod loads without errors at least
Making painfully slow progress.. but with two kids running around screaming its a wonder it even loaded without errors lol.. The create NPC account bit works tho, but the fact i used the reset command logic makes it a rather messy bit of code. have to see how things progress - so far about the only useful thing i have been able to use from my old IT software development training is designing the milestones, I seem to be sucking at the coding part :( |
The trained monkey (me) got some sleep, last nights key mashing has been corrected to resemble order instead of chaos.. might need help on regex tho to make sure its right
@midspace Both seem similar complexity.
/sell all iron
Will hold off the "global market "offer table"" till next release, and price logic is used player-player anyway, so we need only worry about player to player trades or selling to the price table at 0.0.0 I m thinking in line with our previous release focusing on player interaction the player to player should be the priority, since the lack of a /buy command is irrelevant.then. |
@midspace Having trouble building my sell regex - refer notes in code - can i get an assist :) |
Sorry, I've been very busy building a new mining ship on the server. |
oh well at least players cant complain we didnt leave enough spare parts.. |
any way we can use this to discriminate material type, for our qty checks? |
yes. To a degree we're already checking the material types in the MessageSell.ProcessServer(). I intend to move those validations into ProcessServer(), as this will better encapsulate the functionality if we extend it later into an API, and it reduces the potential for hackers misusing it, as it will do it's own validation instead of relying upon validation prior to it running. |
I've like to move the RangeCheck into the ProcessServer also. |
I've been thinking.... Sent from my Windows Phone From: midspacemailto:notifications@github.com
yes. To a degree we're already checking the material types in the MessageSell.ProcessServer(). I intend to move those validations into ProcessServer(), as this will better encapsulate the functionality if we extend it later into an API, and it reduces the potential for hackers misusing it, as it will do it's own validation instead of relying upon validation prior to it running. Reply to this email directly or view it on GitHub: |
Game already works like that now in effect @SaltPepp without an economy players would trade materials with each other. However the economy mod can work similarly; you just send an offer to sell goods to a player for free, then hope they send the goods free back in return. The idea had occurred to me in passing. In financial market terms its considered barter or tether type trade. re: rangecheck @midspace I always assumed we would be moving that stuff out of the main file, as we did with the other commands, I considered making it in another file, but while it is a placeholder didnt think it would matter yet; and was undecided which would be the best place as rangecheck can be used for other stuff too potentially. |
All underlying error checks, pricing lookups, item transfers, and payment technologies for this command are now in place. Sell command to sell to server is now fully operational within the stated aims of this milestone. Good Work Everyone. May still be bugs, but basic functionality is ready to go. |
Need the ability for a player to sell a chosen item and qty back to the server in exchange for its listed value
eg
/value iron ore
(replies 2ea)
/sell 20 iron ore
(removes 20 iron ore from their inventory and pays them 40)
optionally the amount they get paid is deducted from the balance of an NPC player in the bank file
eg Merchant
So we will need to create a fake bank entry for the "merchant" this will be paid to and drawn from when players transact with the server. Once we transition to global commodity market the merchant account will behave like a trader that always lists at the same price (based on price table) that way at least one merchant is always active even if its the server itself
long term keep track of available supply of resources too in order to transition to the global market later
The text was updated successfully, but these errors were encountered: