Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   SMAUG: For Sale Property and, Homes (http://www.topmudsites.com/forums/showthread.php?t=5312)

efgosser 01-12-2009 03:27 AM

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.

Lazerous 08-13-2009 09:29 PM

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
skills.

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> <#>

Examples:

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.


All times are GMT -4. The time now is 08:06 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022