Next Previous Contents

5. Code Changes for CircleMUD 2.20

5.1 How do I fix the bug where people can junk more coins than available?

Apprently in Circle 2.2, you can drop any amount of coins, and then be rewarded with more coins than you had in the first place. Here is the fix from Jeremy Elson:

Around line 480 of act.obj1.c, you will find the code:

            if (!str_cmp("coins", arg) || !str_cmp("coin", arg))
              perform_drop_gold(ch, amount, mode, RDR);
            else {
              /* code to drop multiple items.  anyone want to write it? -je */
              send_to_char("Sorry, you can't do that (yet)...\n\r", ch);
-->           return;
            }
          } else {
          ....

It should be changed to:

            if (!str_cmp("coins", arg) || !str_cmp("coin", arg))
              perform_drop_gold(ch, amount, mode, RDR);
            else {
              /* code to drop multiple items.  anyone want to write it? -je */
              send_to_char("Sorry, you can't do that (yet)...\n\r", ch);
            }
-->         return;
          } else {
          ....

5.2 How do I fix the ``vstat'' bug that crashes the MUD?

To the fix for the vstat bug, from Jeremy Elson:

In the file act.wizard.c, in the function do_vstat, in the mobile section of the switch (around line 1150), you'll find the code:

        mob = read_mobile(r_num, REAL);
        do_stat_character(ch, mob);
        extract_char(mob);

Add the line char_to_room(mob, 0) before extract_char(), like this:

        mob = read_mobile(r_num, REAL);
        do_stat_character(ch, mob);
        char_to_room(mob, 0);
        extract_char(mob);

5.3 How do I fix the ``wizlock'' bug that lets lower immortals lock out higher immortals?

Simple, insert this code into 'do_wizlock()' in 'act.wizard.c':

        if (value < 0 || value > LEVEL_IMPL) {
          send_to_char("Invalid wizlock value.\n\r", ch);
          return;
        }

+        /*   Do not allow people to wizlock above their level.
+        *   This bug came with Circle 2.20 source -- VampLestat
+        */
+        if (value > GET_LEVEL(ch)) {
+          send_to_char("You may only wizlock below your level.\n\r", ch);
+          return;
+        }
        restrict = value;

5.4 How do I fix the ``mudlog'' bug that lets people see me log in, even if I'm wizinvis?

For all the mudlog calls for entering the game, quitting, and so forth, you must change

        mudlog(MAX(LEVEL_IMMORT, ...
to
        mudlog(MAX(GET_LEVEL(i), ...
where ``i'' is either ``ch'' or ``d->character'' depending on the call.


Next Previous Contents