There is a fix on the snippet site of Alex's it is called "remort.txt" and in there it details specifically how to make do_cast and list_skills work for previous classes. ast for do cast in utils.h you need to define a GET_REMORT(ch) ((ch)->player.was_class) Make sure there is a place for was_class in char_file_u and define it just like class. Then in do_cast change that line to read as follows if ((GET_LEVEL(ch) < SINFO.min_level[(int) GET_CLASS(ch)]) && (30 < SINFO.min_level[(int) GET_REMORT(ch)])){ send_to_char("You do not know that spell!\r\n", ch); return; } Then list skills you need to add #define CLASS(ch, i) \ ((i) == 0 ? GET_CLASS(ch) : (i) == 1 ? GET_REMORT(ch) : #define HAS_CLASS(ch, i) (CLASS((ch), (i)) != GET_CLASS(ch)) #define CLASS_SKILL(ch, i, skl) \ (HAS_CLASS((ch), (i)) && \ (LVL_IMMORT -1) >= spell_info[(skl)].min_level[CLASS((ch), (i))]) if (GET_REMORT(ch) == -1){ if (GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) { sprintf(buf, "%-20s %s\r\n", spells[i], how_good(GET_SKILL(ch, i))); strcat(buf2, buf); } } else if (GET_REMORT(ch) > -1) { if ((GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) || CLASS_SKILL(ch, 1, i)){ sprintf(buf, "%-20s %s\r\n", spells[i], how_good(GET_SKILL(ch, i))); strcat(buf2, buf); } } That should do it :) Malcor Scorn wrote: > ok i just patched in a multiclass code from the contrib directory and it > works fine cept for two problems......spells cannot be cast by a warrior > even if he was a cleric and multiclassed due to this in do_cast() : > if (GET_LEVEL(ch) < SINFO.min_level[(int) GET_CLASS(ch)]) { > send_to_char("You do not know that spell!\r\n", ch); > return; > ok and the second problem is the list_skills doesnt list the skills from > the previous class........just current class....and that wouldnt be so bad > if just a reference for players but the do_cast is the big problem > Help Anyone? > Scorn > > +------------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | > +------------------------------------------------------------+ +------------------------------------------------------------+ | 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/15/00 PST