[CODE] [NEWBIE] Spec_assign.c

From: Don Goodner (goofy2@flash.net)
Date: 04/29/99

Hi there,

I recently added mob classes to my mud. These correspond with the mortal =
classes (magic user, cleric, thief, warrior etc...).  I was hoping to =
have a bit of code in spec_assign.c which would add the "magic_user" =
spec proc to all mobs that are magic users. I modified the code from the =
room section of spec_assign.c which makes all dts dumps if dts_are_dumps =
=3D yes as stated in config.c.
if (dts_are_dumps)

for (i =3D 0; i < top_of_world; i++)


world[i].func =3D dump;


This is the loop that I came up with myself, which looks like it should =
work in every way, shape, and form. However when I reboot the game, it =
crashes when it tries to load the mobs.


if (IS_SET(MOB_FLAGS(mob_proto + m), MOB_SPEC))

for (m =3D 0; m < top_of_mobt; m++)

if (mob_proto[m].player.class =3D=3D CLASS_MAGIC_USER)=20

mob[m].func =3D magic_user;


Everything compiles just fine. If anyone has any suggestions please let =
me know.

Don Goodner

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

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