[CODE][Newbie] Implementing object levels

From: Codex / Arcanium (arcaniac@GEOCITIES.COM)
Date: 09/29/97

Hey everyone.
Anyone of you ever tried (and succeeded) to add minimum levels required
to use an object? I have... it doesn't work though.
What I've been trying to do is add a fifth object value to the objects.
The mud boots up and compiles normally, no error messages, however the
fifth value
doesn't seem to be read at all

Here's what i did,
First I changed the "int value[4];"-line to "int value[5];" in the file
(Yes, i know there are two places you need to change this, and that
it'll mess up the player files, so I deleted the previous playerfile to
start all over.)

Then I edited the do_wear, do_wield, do_grab commands.
I added theese lines to those three commands:

if (GET_LEVEL(ch) < GET_OBJ_VAL(obj, 5))  {
 send_to_char("You don't know how to use it!\r\n", ch);

Then i changed the objsave.c file. The obj_from_store() and
obj_to_store() commands.
There I added the line: GET_OBJ_VAL(obj ,4) = object.value[4];
(and the other way around for the second command);

I've also made sure that the obj files are edited to contain a fifth
This by only including one zone in the mud (would have taken to much
time to change all the object files).
By doing this i had to remove the assignments for all now non-existing
mobs, objs, and rooms in the spec_assign.c.... works fine, no error
I also changed the starting room for imms, mortals and frozen players to
rooms in my fixed zone.

So, I'm kind of hoping someone of you have run into the same problem
sometime before and can help me..
Can you?


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST