Yep yep, I looked late last night and it was up. I hope it's mildly useful to everyone. I probably should update my comments in the code a bit more though. :)
You dont. You make a room flag called ROOM_LOCKER and flag the room. It'll then save every item in the room to file and re-load them when the game reboots, provided it's not on a reset.
08 Jun, 2006, Hades_Kane wrote in the 6th comment:
Votes: 0
Oh, that's pretty neat… I might look into installing this. It would be a GREAT addition to player houses as that would really be one thing that would be worth buying them for alone.
I think perhaps a locker item type might would a bit better in limiting the amount of items a person can save through a reboot/crash etc, unless this code does it somewhere and I'm missing it. Maybe I'll look into modifying it into an object if someone else doesn't beat me to it. Even still, I'm probably not experienced enough to figure that out yet, though :p
Yeah, I can't imagine it'd take anyone long to get that working right. Though, I would add a check for your locker size in do_quit, to warn a player before logging out if they have an item that won't be saved.
Wait, this is for rooms, isn't it? Either way, I'd have a warning. Personally, my MUD will probably wind up with an account system that stores one 'inventory' for all of your characters, but lets each individual character carry a maximum of 32 items on their person. Something like Dragon Quest/Dragon Warrior.
You dont. You make a room flag called ROOM_LOCKER and flag the room. It'll then save every item in the room to file and re-load them when the game reboots, provided it's not on a reset.
Ahh, I see that now, hadn't looked for that. Most locker codes I "d seen were of the container variety. Very interesting!
Maybe an addendum to the file, a 'help locker' type thing? I know people putting it in could write one up, but it might save a few 'genius' questions like mine earlier heheh. ;)
Actually that's a great idea Skol. What I'll do is write up a quick spliff on that stuff and put in the options for limiting items allowed to be saved in a room, etc, etc, etc with directions on how to change it. :)
-Aidan
09 Jun, 2006, Hades_Kane wrote in the 11th comment:
Votes: 0
That'd be great. Will you update us on when you've done that?
New locker code has been uploaded. Hope it's a bit easier to understand. I didn't compile it, so it should work, but there may be a few typo's in the code. Easily fixed, but I'm using a custom version of the code on my own game.
-Aidan
09 Jun, 2006, Hades_Kane wrote in the 14th comment:
–Aidan