Re: Dual Classing [NEWBIE]

From: Dana Luther (
Date: 06/08/00

>I understand all this, but how do I set it so that they can only 'advance'
>if they are at a certin level? And what would be needed to make the advance
>command (i know, code that checks your current class, level, and both
>true then it changes your level to 0 and class to the next one [bowman or
>sharpshooter], but i need the code)

  .....normal variable info here...

 ....standard don't mess around as NPC code here...

  if (GET_LEVEL(ch) >= X)  {   <--- insert the level you want them to be to
do this in the place of the big X
     switch (GET_CLASS(ch))
        case CLASS_ARCHER:
          GET_CLASS(ch) = CLASS_BOWMAN;
          act("You have advanced into the specialization of bowmen!", TRUE,
ch, 0, 0, TO_CHAR);
          act("$n has reached a new level of specialization.", FALSE, ch, 0,
0, TO_ROOM);
        case CLASS_MAGIC_USER:
        .... blah blah blah  *wink*..... <-- insert all the possible class
combinations here
            log("SYSERR: Unknown class sent to do_class_advance!");
     etc. etc. etc.


That's the REALLY bare bones of it, simply altering their class. It should
be enough to point you in the right direction though. It doesn't take into
account that they get any other bonus at the time of advancement. If you're
using events, you'll want to make sure you free and re-enqueue the events
that are class related for this character (i.e., if your mages are set up to
regen better mana or something, who knows what you might have).
This also doesn't take into consideration that you might want them to
fulfill some other requirement than level (which I'd assume you'd want, but
wouldn't actually need. Some quest they must complete which sets a FLAG on
them as "ready to advance" or somewhat)

This is pretty simple stuff that you'd figure out simply by reviewing some
of the code for a few minutes. Just open up the utils.h file and start
reading it. You'll find all ways you could possibly want to access the
information about a character, room, or object there.

There are so many ways to do the advance up a class that I can't even begin
to tell you how, but basically, you determine how you want to reference it
(I assume you'd do it as another class option -> CLASS_BOWMAN    with the
alteration for IS_ARCHER  covering CLASS_ARCHER and CLASS_BOWMAN as was
mentioned in a previous post.

I really can't stress reading the files enough. Just look through them.
There are TONS of explanations in there about how to do things and what the
various functions are for.  I took a few moments to do this just to start
you in some direction, but that's about as far as I can take it being this
abstract. There are probably lots of other ways to go about doing this, this
is just one. Start reading and expiramenting. And back everything up first.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT