At 01:59 PM 11/2/97 -0800, you wrote:
>I have finished adding multi classes to my mud, and now I am trying to
>add a command players can use to set their second class. This is what I
>got so far:
>
>
>ACMD(do_dual)
>{
int i;
> skip_spaces(&argument);
> one_argument(argument, buf);
>
>/* Check to see if they already have a second class */
> if (GET_SECOND_CLASS(ch) != CLASS_UNDEFINED) {
> send _to_char("You already are multi-classed!\r\n", ch);
> return; }
>/* Check to see if they entered a argument */
> if (!*buf) {
> send_to_char("What would you like to multi-class too?\r\n", ch);
> return; }
>/* Set their second class <warrior, mage, cleric or thief> */
if ((i = parse_class(*buf)) == CLASS_UNDEFINED) {
send_to_char("Options: warrior, mage, cleric, thief\r\n", ch);
return;
} else {
GET_SECOND_CLASS(ch) =i;
}
>*** Does anyone have ideas on how I can get this to work? ***/
>
> GET_SECOND_EXP(ch) = 1; // Initalize second class
> GET_SECOND_LEVEL(ch) =1; // parameters.
>}
>
>
>I got it to work in do_set by using this case structure:
>
>case 49:
> if ((i = parse_class(*val_arg)) == CLASS_UNDEFINED) {
> send_to_char("That is not a class.\r\n", ch);
> return;
> }
> GET_SECOND_CLASS(vict) = i;
> break;
>
>So the command: <set buba second_class thief> works just fine.
>
>Also I would like to this command to only be used in one particular
>room, anyone got ideas on how I can do this?
>
>Thanks! - Shaw
Turn the command into a special procedure and assign it to a room.
.--. .----------- StormeRider
// / \ __ / ------ winds@ici.net
///////\( `-, ----
//// /// '~ ( --- CircleMUD 3.0bpl11
// / // : ; --- cmoo.com:4004
/ / /) / --
//..\\ http://members.tripod.com/~WindsOfStorm
UU UU
'//||\\`
+------------------------------------------------------------+
| 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/08/00 PST