Vendor buy rates. #745
-
I know that standard vendors buy items (and the value that they will buy for can be adjusted on items_basic.sql and that this line of code generates the costs for each item in the guild shop's inventory, but I can't for the life of me find (or even derive) the formula for how much the guild shops will buy an item for. Any assistance would be appreciated, I'm trying to tweak it downward to ensure that exploits are more difficult/rare. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
<begin edit> New style guild shops are done in script, and the old school variable stock variable price guild shops are in a different sql table (and are a pain in the rear) https://github.com/LandSandBoat/server/blob/base/sql/guild_shops.sql (you can see from the 1st file comments that the file is largely unmaintained) The minimum and maximum of the quantities and costs are set there, and the place you already linked does math based on the current stock to set the price within those parameters. These used to be very exploitable on retail circa 2004 and this vileness was based on that era but with a twist that makes it much much worse: private servers go down far more often than retail which makes the whole thing reset. If someone figures out a way to intentionally crash, they can even use that to force a reset to accelerate buy low+sell high. |
Beta Was this translation helpful? Give feedback.
-
Yes, that's why I want to tinker with them for my server. My plan is to remove the ability of these shops to buy anything that they do not normally keep in stock (which if I understand things correctly, can be accomplished by removing those lines from the table), and lower the value that they are willing to buy an item to make sure that it can't rise above the cost to buy the item from a vendor (this is the part that I'm having trouble with). Basically my question is where does it take the price that it calculates there and turn it into the price that the guild will buy an item for? |
Beta Was this translation helpful? Give feedback.
-
Thanks, that's exactly what I needed, I can adjust that formula to suit my needs. I appreciate it! |
Beta Was this translation helpful? Give feedback.
<begin edit>
see in thread comment
<end edit>
New style guild shops are done in script, and the old school variable stock variable price guild shops are in a different sql table (and are a pain in the rear) https://github.com/LandSandBoat/server/blob/base/sql/guild_shops.sql
(you can see from the 1st file comments that the file is largely unmaintained)
The minimum and maximum of the quantities and costs are set there, and the place you already linked does math based on the current stock to set the price within those parameters. These used to be very exploitable on retail circa 2004 and this vileness was based on that era but with a twist that makes it much much worse: private servers go d…