|01-12-2009, 04:27 AM||#1|
Join Date: Jan 2009
SMAUG: For Sale Property and, Homes
Is their a code for personal stores in SMAUG. Like you walk along a street and you see a store for sale, you buy it and stock it with the stuff you get off of monsters, and put it for sale. Or maybe a peice of property for sale you can buy for your personal house, to store your extra stuff.
|08-13-2009, 10:29 PM||#2|
Join Date: Jan 2005
Re: SMAUG: For Sale Property and, Homes
nice question, I haven't seen such a piece of code, but great idea. I too have thought about such an idea
and never seen such code around. Sadly my skills as a coder are limited and I don't think that is within my
Ok here are my thoughts on this...
Lets see, you would need a new mob flag, thats easy... have to look at the store code to see how to
adjust that to accept store ownership. Then the player file would need a new field at least 1, to say the
vnum of your store mob. So that would be a couple more spots in the code base to adjust there. Now the
store code, that would need to make the mobs start to keep track of all the business they do so that you
the owner can get his/her fair share. Maybe make it also be based on mobs align, like if evil guy will take
more of your money then say if the mob was good, you would get all your profits. You would also like the
store code to have a spot for the owners take or percent of the income. Then maybe add in a new mob
field for loyalty as well, and say if the mob doesnt get paid well the loyalty drops and say if it reaches a
certain point, the mob takes all the items and your gold and leaves with it! Zomg! The <CENCENSORED>!
Then you would have to create a few new shop owners commands, like call it for this example:
shopstock + shopbank + shopstats.
After those commands, you might need a few adjustments in shop code so the mob recognises the
owner and you get some sort of discount etc, prob with a few grumblings from the mob too...
Like when the buy command is used make it check there the player for a shop vnum and compare
the two if they match you get your discount or if its upset at you maybe an increase but telling
you its a discount...ohhh...sneaky SOB!
Shopbank <vnum or name, what ever you set this up for> <give/take> <amount>
Shopstock <VNUM, or name> <give/take> <item>
shopstats <vnum> <stat to modify> <#>
shopbalance 452 give 5000
shopbalance 452 take 1000
shopstock 452 take sword
shopstock 452 give sword
shopstats 452 open 1
shopstats 452 close 23
* Done in 24 hr format.
shopstats 452 profit 5
* This would be treated as 5% so cost value of item would be 95% to seller and 5% to shop on items bought.
* On items sold this would be taking the cost value of item and adding 5% to that number and charging that.
These are just examples of things for your idea and maybe where you can start to look in your code
for where to begin on this, but plan it all out first before you jump in and back up code as always!
But good luck to you and if you find anything post here and let me know, would love to take a look.
Last edited by Lazerous : 08-13-2009 at 10:31 PM. Reason: minor syntax change...