Modified Changes snippet.

Original copyrights belong to xkilla.
This snippet was last modified by Greven and Gavin of Dark Warriors. The original SWR port was by Atrox of Paradawn, and the original code was by Xkilla.

You may use this modified code free, and pass it around and modify it as you like, as long as the comments are left in the files. Its not mandatory, but we would appreciate if you let the authors know that your using this code. You can reach them at darkwarsmud@hotmail.com. Any questions or problems with this snippet, please post your questions on http://www.dementiasystems.com/forum/. Please report any bugs or suggestions to darwarsmud@hotmail.com. Thanks.

This code has been tested on stock SWR, so it should work on any SWR, and likely and SMAUG as well.

C++ conversion (probably bad) done by Khonsu. This is my first attempt at converting something from C to C++ but it compiles cleanly and works.

Overview of commands:
-------------------------------------------------
changes      - Lists changes to player.
chedit       - Allows player to delete changes, and load/save the changes table
addchange    - Adds a change to the change table, and echoes to the mud

Instructions
-------------------------------------------------
Copy the changes.cpp and changes.h to your src directory.

db.c
----
At the top of the file, with the other include files, add the following after '#include "mud.h"'

#include "changes.h"

/*
    * abit/qbit code 
    */
   log_string( "Loading quest bit tables" );
   load_bits(  );

And add below that:

        log_string( "Loading changes" );
        load_changes( );


makefile
--------

In you makefile, add changes.c to C_FILES, and changes.o to your O_FILES (no O_FILES in AFKMud don't worry)

Copy the changes.dat file into your system directory. (You can delete my two test changes after you test to make sure its working)

Make and reboot/copyover/hotboot your mud.

From within the mud, add:

cedit changes create do_changes
cedit changes level 105
cedit changes addchange do_addchange
cedit addchange level 105
cedit changes chedit do_chedit
cedit chedit level 105


Ok, that should be it. Now you add commands with addchange, and view them with changes. If you have more than 10, and you want to see all of the changes, use "changes all"