[Code][long]Remort

From: Demond LaZaro (demond@TOLKIEN.REALMS.ORG)
Date: 01/23/98


I'm haveing problems with my do_remort code can anyone see a problem with
it?
Thanx,
Demond

#define REMORT_LVL      20

ACMD(do_remort)
{
  extern void advance_level(struct char_data * ch);

  if (((GET_LEVEL(ch) >= 5) && (GET_CLASS(ch) == CLASS_WARRIOR))) {
        if (is_abbrev(argument, "shaman")) {
                  GET_CLASS(ch) = CLASS_MAGIC_USER;
                  GET_LEVEL(ch) = 5;
                  advance_level(ch);
        } else if (is_abbrev(argument, "priest")) {
                  GET_CLASS(ch) = CLASS_CLERIC;
                  GET_LEVEL(ch) = 5;
                  advance_level(ch);
        } else if (is_abbrev(argument, "thief")) {
                  GET_CLASS(ch) = CLASS_THIEF;
                  GET_LEVEL(ch) = 5;
                  advance_level(ch);
        } else
                  send_to_char("You may only remort into a:\r\nThief\r\nShaman\r\nPriest\r\n", ch);
  } else if ((GET_LEVEL(ch) >= REMORT_LVL) && (GET_LEVEL(ch) <= LVL_IMMORT)) {
    switch (GET_CLASS(ch)) {
        case CLASS_WARRIOR:
                if (is_abbrev(argument, "shaman")) {
                  GET_CLASS(ch) = CLASS_MAGIC_USER;
                  GET_LEVEL(ch) = 5;
                  advance_level(ch);
                } else if (is_abbrev(argument, "priest")) {
                  GET_CLASS(ch) = CLASS_CLERIC;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else if (is_abbrev(argument, "thief")) {
                  GET_CLASS(ch) = CLASS_THIEF;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else
                  send_to_char("You may only remort into a:\r\nThief\r\nShaman\r\nPriest\r\n", ch);
                break;
        case CLASS_THIEF:
                if (is_abbrev(argument, "fighter")) {
                  GET_CLASS(ch) = CLASS_WARRIOR;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else if (is_abbrev(argument, "ninja")) {
                  GET_CLASS(ch) = CLASS_NINJA;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else
                  send_to_char("You may only remort into a:\r\nNinja\r\nFighter\r\n", ch);
                break;
        case CLASS_CLERIC:
                if (is_abbrev(argument, "fighter")) {
                  GET_CLASS(ch) = CLASS_WARRIOR;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/10;
                  GET_MAX_MOVE(ch)/20;
                  GET_MAX_MANA(ch)/20;
                  advance_level(ch);
                } else if (is_abbrev(argument, "monk")) {
                  GET_CLASS(ch) = CLASS_MONK;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  GET_MAX_MANA(ch)/20;
                  advance_level(ch);
                } else
                  send_to_char("You may only remort into a:\r\nMonk\r\nFighter\r\n", ch);
                break;
        case CLASS_MAGIC_USER:
                if (is_abbrev(argument, "fighter")) {
                  GET_CLASS(ch) = CLASS_WARRIOR;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/10;
                  GET_MAX_MOVE(ch)/20;
                  GET_MAX_MANA(ch)/20;
                  advance_level(ch);
                } else if (is_abbrev(argument, "mage")) {
                  GET_CLASS(ch) = CLASS_MAGE;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  GET_MAX_MANA(ch)/20;
                  advance_level(ch);
                } else
                  send_to_char("You may only remort into a:\r\nMage\r\nFighter\r\n", ch);
                break;
        case CLASS_NINJA:
                if (is_abbrev(argument, "master")) {
                  GET_CLASS(ch) = CLASS_MASTER;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else if (is_abbrev(argument, "thief")) {
                  GET_CLASS(ch) = CLASS_THIEF;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else if (is_abbrev(argument, "fighter")) {
                  GET_CLASS(ch) = CLASS_WARRIOR;
                  GET_LEVEL(ch) = 5;
                  GET_MAX_HIT(ch)/20;
                  GET_MAX_MOVE(ch)/20;
                  advance_level(ch);
                } else
                  send_to_char("You may only remort into a:\r\nFighter\r\nMaster\r\nThief\r\n", ch);
                break;
        default:
                break;
    }
  } else {
        send_to_char("You need to be level 20  or higher to remort!\r\n", ch);
        return;
  }
  return;
}



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name: Demond LaZaro the Implementor     Phone: 1-505-776-8866
Mud: Master's Realm Mud                 Code Base: CircleMud bpl11
Addy: realms.org 6969                   Addy2: 206.185.32.8 6969
Mud2: Towers from Beyond 2              Code Base: CircleMud bpl12
Addy: realms.org 6050                   Addy2: 206.185.32.8 6050
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


     +------------------------------------------------------------+
     | 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