You'd want to use a mob program for that. I'm not sure how exactly 'nudity' would be defined; probably something along the lines of not having anything besides a weapon equipped. You might have to write your own ifcheck e.g. is_nude($n) if yuo want more precise control. Are you familiar with mud progs? That would be a good place to start; then you can fine tune your ifcheck later.
if ispc($n)
mea $n The automation says "Greetings $n!"
if OvnumWear (9003) == 0
mea $n The automation says "You are violating this cities nudity laws, $n"
mptransfer $n 10308
endif
else
mea "Greetings $i"
endif
---
Object 9003 is trousers and room 10308 is a "prison cell".
Well, the only problem with code like this is that it makes everybody wear the trousers identified by 9003. What if you make a different vnum for trousers, and somebody wears that instead? Your code would send them to jail for that... :P
I don't remember off-hand if there's an ovnumwear for wear locations. If there isn't one, it should be quite easy to add to the ifchecks in mudprog.cpp.
And I appreciate, knowing what I'm doing wrong(it does help to a degree).
However, the amount of problems which can occur is virtually infinite.
I'm not sure that I can find out how to do what I want by going through every possible method of messing it up until I find the right way by accident.
I meant adding an ifcheck to the C code, not the mudprog. Do you know how to write C? If so, look at mudprog.c and look for the ifcheck code. E.g., search for ovnumwear. You'll want one that takes a character as its argument, such as name($n). If you know C, it should be fairly easy to make your own ifcheck that makes sure the person is wearing something at the legs/arm/etc. locations. If you don't know C, then this will be a lot more difficult; I'd suggest you learn it. Nick Gammon has some excellent material on this site - look around in the sections for links to documentation. You can also search on the web for C tutorials. But a word of warning: it's not something you can pick up in a day or two.
Yes, I was attempting to make it in a C source file, by using a predefined mob prog command, with changes applied so that it focused on the PC rather than the NPC.
However, I couldn't find a way of directing it. I may re-look it over.
Mud_prog.c is where I was looking.
Look at the ifchecks for e.g. name($n) or class($n). That will show you how to get the character variable passed to the ifcheck 'function'. (Function is something of a misnomer in mudprog, but whatever.) You don't want to look at mudprog commands, rather, there's a big function that executes if statements that you'll want to find. I think it has 'ifcheck' in the function name. But you could just search for 'name' (or better yet ovnumwear) and you'll find the function eventually.
Once you have the character pointer, it should be pretty easy to see if s/he's wearing something in all the right wearlocs.