This turned out quite nicely. As I am building area's with it now I'm wondering how I managed without it before. It adds a lot of depth and flexibility to my areas. :)
If anyone wants to get a system like this setup just send me an e-mail or something and I'll help.
Here is a bit of info on how mine works.
ALL mudvars are stored in a text file (mudvar.txt) in the system directory. Thus, all mudvars are then read from the same file.
Several commands allow for easy creation (do_makevar), deletion (do_deletevar), viewing (do_showvar), and manipulation (do_editvar).
Mudprog ifcheck's have been modified to allow checking of this. Any mob/obj/room prog may check the current value of a mudvar. The syntax is like this:
if mudvar(dog) == 1
mpecho Woof!
endif
Supposing the mudvar named dog existed, and its value was 1, the program would then echo Woof!
In addition to checking the state of mudvars, I also made it so you can check if a mob/obj/room has a certain flag set. I also made two mpcommands, which allow you to set a mudvar or toggle a room/obj/mob flag.
So, if you wan't something like this and you need help getting started or get stuck somewhere, send me an e-mail or IM me or something.
Just curious, how many of you MU* owners/programmer's have a system like this (or a system that poses the same purpose) in your mud currently? |