Looking for a snippet
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jan 1, 2012 4:57 pm
GroupMembers
Posts600
JoinedDec 3, 2008
I am looking for a snippet for player shops. One that allows mortals to set up shops and collect money whenever they want.
#2 Jan 8, 2012 2:47 am
GroupMembers
Posts147
JoinedJun 9, 2009
Don't know of any of those. Shouldn't be too difficult to set up though. My code, an swr, has it so I could try to rip out that stuff if you're interested. Only thing is I'm in the middle of attempting to convert to using std::string instead of char* and refactoring most of the structures out of mud.h so everything is a complete mess right now heh.
#4 Jan 9, 2012 11:04 pm
GroupMembers
Posts147
JoinedJun 9, 2009
Ok, stuck it up under swr snippets, here. It could use some cleaning but it does work as far as I can tell. Never really did much with it myself.
#5 Jan 10, 2012 5:52 pm
GroupMembers
Posts600
JoinedDec 3, 2008
quick question how does the system know where to load the mobs too? and is there a way to limit the mobs to one per room?
#6 Jan 11, 2012 12:35 am
Last edited Jan 11, 2012 5:02 am by Andril
GroupMembers
Posts147
JoinedJun 9, 2009
hmm, how does it know where to stick the vendors on load?
I believe if you check the load/save functions it's in there.
yeah, the loading function loads the vnum of the room it needs to be put in and then sticks the vendor mob in it. looks like it's doing some other stuff as well, like clearing all other mobs out of it. Kinda pointless to me so you could probably edit that if you want.
Interesting. It's doing a lot of excessive stuff in the loading section that isn't really necessary from what I can tell. Specifically in the "END" part of the switch. I might have to clean that up a bit.
As far as limiting the mobs, I assume you mean one vendor per room here, I guess you could run through the list of shops in the area and check against the keepers in_room->vnum value. Maybe a second room flag, ROOM_VENDOR_BOUGHT, that's set when a vendor is first placed there and checked against? There's probably a better way though.
Edit: Updated the file a bit. Did some cleaning up of a few functions and removed a couple of things I missed before. Check the download page.
I believe if you check the load/save functions it's in there.
yeah, the loading function loads the vnum of the room it needs to be put in and then sticks the vendor mob in it. looks like it's doing some other stuff as well, like clearing all other mobs out of it. Kinda pointless to me so you could probably edit that if you want.
Interesting. It's doing a lot of excessive stuff in the loading section that isn't really necessary from what I can tell. Specifically in the "END" part of the switch. I might have to clean that up a bit.
As far as limiting the mobs, I assume you mean one vendor per room here, I guess you could run through the list of shops in the area and check against the keepers in_room->vnum value. Maybe a second room flag, ROOM_VENDOR_BOUGHT, that's set when a vendor is first placed there and checked against? There's probably a better way though.
Edit: Updated the file a bit. Did some cleaning up of a few functions and removed a couple of things I missed before. Check the download page.
#7 Jan 11, 2012 2:10 pm
GroupMembers
Posts600
JoinedDec 3, 2008
now I need to do the same thing about the space system, Kinda scared.
#8 Jan 14, 2012 3:46 pm
GroupMembers
Posts600
JoinedDec 3, 2008
Does anyone know where to find instructions for adding mccp into a smaug codebase?
#9 Jan 15, 2012 10:41 am
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
There use to be one not sure what happened to it though...
#10 Jan 15, 2012 4:02 pm
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002
Looks to have vanished into the ether or something. We used to have one here, not sure where it went. The one on mudbytes got axed when Davion deleted my account there. I don't even have it in my archives anymore, which is even stranger, because I've kept all sorts of stuff there.
You could simply switch over to SmaugFUSS though since MCCP is built in to that. Otherwise someone would need to reconstruct a snippet file for MCCP and upload it.
You could simply switch over to SmaugFUSS though since MCCP is built in to that. Otherwise someone would need to reconstruct a snippet file for MCCP and upload it.
#11 Jan 31, 2012 2:30 am
GroupMembers
Posts600
JoinedDec 3, 2008
Does anyone have a snippet for it, and I would switch over to smaugfuss1.9 but I already have so much done and the time for me to open the codebase I been working on is fast approaching.. Could be a future update or something, but in the mean time I need to get mccp installed in this one.
#12 Feb 1, 2012 8:25 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
http://www.dotd.com/mud/source/smaug14a-mccp.patch seems to at least give some info on it.
Pages:<< prev 1 next >>