jcanet@neosoft.com (Jim) wrote: >I would like to add level limits to items, as I get very tired of watching >newbies run around with my suposed 'high-level' weapons and armor. My >question is: has anyone done this and does it require a pfile wipe or >plrobj file deletion? Yep, one of the first things I did, and no, no player file wipe required. Here's how ya do it Rv style: 1) Hack the -MEMORY- structure for objects in structs.h to include a 'level' field. 2) Hack db.c, the bit where it loads objects from theier files. Add an -optionial- level flag field on the end of one of the lines that gets scanned in. (I think I used the line with obj cost in) 3) If this field is empty, the object gets a default level flag of 0. (Hence no need to re-write all your object files at once) 4) If the field does exist, then that is the object's level flag. 5) Hack act.obj.c to stop players wearing/holding/wielding objs of a greater level than themseleves. Give them a message along the lines of "You don't yet understand how to use <obj>". 6) Hack act.wizard.c - stat_object so you can see what has what. 6) Get hold of OasisOLC, uncomment all the level flag code in there so you can edit obj levels with that }:> >The other thing I wanna do is have it check the objects currently around- >either on players or in their rent files when it goes to reload items, I >know there are item limits installed, but it only seems to check what is >currently loaded, on who is playing at the time of zone reset. This'd cause mucho lag, unless you construct a table at boot time, which would then hog memory... But hey, it's your mud :) Rv.
This archive was generated by hypermail 2b30 : 12/18/00 PST