On Mon, 14 Oct 1996, Allen Miles wrote:
> Hi there, I suppose I would be considered a newbie programmer. I have a
> few questions:
>
> 1. I have made a Paladin class and am working on Anti-Paladin's and
> Bard's. My question is: how can I make it so that if a Paladin is not
> of good align, he/she loses the ability to cast spells and use skills?
In do_cast put in:
if ((GET_CLASS(ch) == CLASS_PALADIN || GET_CLASS(ch) == CLASS_BARD) &&
!IS_GOOD(ch)) {
send_to_char("You can't cast spells when you've turned your back on your religion.\r\n", ch);
return;
}
if (GET_CLASS(ch) == CLASS_ANTI_PALADIN && !IS_EVIL(ch)) {
send_to_char("Anti-paladins can onl y cast spells if they are evil!\r\n", ch);
return;
}
You'll also have to put this in the skills you want. It might be better
to make this into a function and return TRUE/FALSE depending on whether
or not they can cast the spells/use the skills.
> 3. I also have implamented races but i cannot get classes to be race
> restricted. I have looked at two people's codes and mine looks similar
> but it doesn't work.
Oh, jeez... <looks at Nashak>
<*=-+Daniel+-=*>
"Forgive me father, for I am sin."
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST