> Ok, if I were to do this... would it mean that you could 'advance' at any
> time above lvl 10 for archer (see code below)
> > if (GET_LEVEL(ch) >= 10)
Yep.. Or any other class. The next line switches depending on the
current class of the character.
> > switch (GET_CLASS(ch))
> > case CLASS_ARCHER:
--snip--
> > case CLASS_MAGIC_USER:
> > GET_CLASS(ch) = CLASS_SUPERMAGE;
Bascicly he is saying add all classes that can be advanced after this
point. You need a new case statement for each class that can advance (ie.
archer->bowman->sharpshooter = 2 case statments)
> > default:
> > log("SYSERR: Unknown class sent to do_class_advance!");
> > break;
This is for if someone trys to advance and it can't be done..
> #define CLASS_ARCHER 4
> #define CLASS_BOWMAN 5
> #define CLASS_SHARPSHOOTER 6
Looks fine but you might want to do something more like so
(this assumes all you have is Warrior, Thief, Cleric, Mage)
#define CLASS_WARRIOR 1
#define CLASS_THIEF 2
#define CLASS_CLERIC 3
#define CLASS_MAGE 4
#define CLASS_NINJA 5 //Ninja is first advance of Warrior
#define CLASS_ASSASSIN 6 //Assassin is first advance of Thief
#define CLASS_PRIEST 7 //Priest is first advance of Cleric
ect..
> UTIL.H
>
> #define IS_ARCHER(ch) (!IS_NPC(ch) && \
> (GET_CLASS(ch) == CLASS_SHARPSHOOTER || \
> GET_CLASS(ch) == CLASS_BOWMAN || \
> GET_CLASS(ch) == CLASS_ARCHER))
This should work fine.
To add the advance command into the mud go into interpreter.c
add ACMD(do_class_advance) with all the others
then add { "advance", do_class_advance, 0, 0}
(Just look at the other stuff like this and then fix what isn't right as I
am writing this from memory.)
-~=Brian=~-
P.S. If you need more help e-mail me off the list: tresni@ikickass.org
+------------------------------------------------------------+
| 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 : 04/10/01 PDT