Program_Snippets-V1.3/
Program_Snippets-V1.3/Docs/
HOW TO INSTALL THIS SNIPPET

1) **********BACK UP YOUR CODE*************
	I am not responsible for any damage to anything, including your person, as a result of using this snippet,
		use at your own risk.

2) Go through your code and change all get_char_room function calls to include a NULL in the middle.
	EXAMPLE:
		You find a piece of code that looks like:
			get_char_room( ch, arg )

		Change that to:
			get_char_room( ch, NULL, arg )

	Find the files that have this function call by entering your src directory and typing
		grep -l get_char_room *.c
	
	This will list all the files that call the function, then open each in your favorite editor,
		find the get_char_room calls and change them as explained above.
	You may ignore the following files when making this change:
		mob_prog.c
		mob_cmds.c
		mob_cmds.h
		olc_mpcode.c
	Also, do not change the actual function like this, that is taken care of later on.
	DO NOT change it in merc.h, that is also taken care of later on.

3) Go through your code and change all get_obj_here function calls to include a NULL in the middle.
	EXAMPLE:
		You find a piece of code that looks like:
			get_obj_here( ch, arg )

		Change that to:
			get_obj_here( ch, NULL, arg )

	Find the files that have this function call by entering your src directory and typing
		grep -l get_obj_here *.c
	
	This will list all the files that call the function, then open each in your favorite editor,
		find the get_obj_here calls and change them as explained above.
	You may ignore the following files when making this change:
		mob_prog.c
		mob_cmds.c
		mob_cmds.h
		olc_mpcode.c
	Also, do not change the actual function like this, that is taken care of later on.
	DO NOT change it in merc.h, that is taken care of later on.

4) Go through your code and change all get_obj_wear function calls to include a TRUE on the end.
	EXAMPLE:
		You find a piece of code that looks like:
			get_obj_wear( ch, arg )

		Change that to:
			get_obj_wear( ch, arg, TRUE )

	Find the files that have this function call by entering your src directory and typing
		grep -l get_obj_wear *.c
	
	This will list all the files that call the function, then open each in your favorite editor,
		find the get_obj_wear calls and change them as explained above.
	You may ignore the following files when making this change:
		mob_prog.c
		mob_cmds.c
		mob_cmds.h
		olc_mpcode.c
	Also, do not change the actual function like this, that will be taken care of later on.
	DO NOT change it in merc.h, that is taken care of later on.
		
5) Find every call to HAS_TRIGGER in your files and change each to HAS_TRIGGER_MOB.
	NOTE: You will only need to do this if you already have MOBprogs.
	EXAMPLE:
		You find a piece of code that looks like:
			HAS_TRIGGER( ch, TRIG_ACT )
		
		Change that to:
			HAS_TRIGGER_MOB( ch, TRIG_ACT )
		
		Find the files that have this call in them by entering your src directory and typing
			grep -l HAS_TRIGGER *.[c,h]
		
		This will list all the files that call the function, then open each in your favorite editor,
			find each HAS_TRIGGER and change them as explained above.
		You must change EVERY instance of HAS_TRIGGER, including in merc.h.
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

6) Find every instance of MPROG_LIST in your files and change each to PROG_LIST.
	EXAMPLE:
		You find:
			MPROG_LIST
					
		Change that to:
			PROG_LIST
		
		Find the files that have this call in them by entering your src directory and typing
			grep -l MPROG_LIST *.[c,h]
		
		This will list all the files that contain MPROG_LIST, then open each in your favorite editor,
			find each MPROG_LIST and change them as explained above.

		DO NOT change anything in merc.h.
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

7) Find every instance of MPROG_CODE in your files and change each to PROG_CODE.
	EXAMPLE:
		You find:
			MPROG_CODE
					
		Change that to:
			PROG_CODE
		
		Find the files that have this call in them by entering your src directory and typing
			grep -l MPROG_CODE *.[c,h]
		
		This will list all the files that contain MPROG_CODE, then open each in your favorite 
			editor, find each MPROG_CODE and change them as explained above.

		DO NOT change anything in merc.h.
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c
			
8) Find every call to mp_act_trigger and change each as shown in the following example.
	EXAMPLE:
		You find:
			mp_act_trigger( buf, to, ch, NULL, NULL, TRIG_ACT );

		Change that to (add the 2 NULL arguments after the second argument):
			p_act_trigger( buf, to, NULL, NULL, ch, NULL, NULL, TRIG_ACT );

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_act_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_act_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

9) Find every call to mp_percent_trigger and change each as shown in the following example.
	EXAMPLE:
		You find:
			mp_percent_trigger( ch, NULL, NULL, NULL, TRIG_ENTRY );

		Change that to (add 2 NULL arguments right after the first one):
			p_percent_trigger( ch, NULL, NULL, NULL, NULL, NULL, TRIG_ENTRY );

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_percent_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_percent_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

10) Find every call to mp_bribe_trigger and change each to p_bribe_trigger.
	EXAMPLE:
		You find:
			mp_bribe_trigger( victim, ch, silver ? amount : amount * 100 );

		Change that to:
			p_bribe_trigger( victim, ch, silver ? amount : amount * 100 );

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_bribe_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_bribe_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

11) Find every call to mp_exit_trigger and change each as shown in the following example.
	EXAMPLE:
		You find:
			mp_exit_trigger( ch, door )

		Change that to ( add the PRG_MPROG argument as the last argument):
			p_exit_trigger( ch, door, PRG_MPROG )

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_exit_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_exit_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c


12) Find every call to mp_give_trigger and change each as shown in the following example.
	EXAMPLE:
		You find:
			mp_give_trigger( victim, ch, obj );

		Change that to (add the 2 NULL arguments right after the first argument and TRIG_GIVE as the last argument):
			p_give_trigger( victim, NULL, NULL, ch, obj, TRIG_GIVE );

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_give_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_give_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

13) Find every call to mp_greet_trigger and change each as shown in the following example.
	EXAMPLE:
		You find:
			mp_greet_trigger( ch );

		Change that to (add the PRG_MPROG argument as the last argument):
			p_greet_trigger( ch, PRG_MPROG );

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_greet_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_give_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

14) Find every call to mp_hprct_trigger and change each to p_hprct_trigger.
	EXAMPLE:
		You find:
			mp_hprct_trigger( ch, victim );

		Change that to:
			p_hprct_trigger( ch, victim );

		Find the files that have this call in them by entering your src directory and typing
			grep -l mp_hprct_trigger *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each mp_hprct_trigger, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

15) Find every call to get_mprog_index and change each as shown in the example following
	EXAMPLE:
		You find
			get_mprog_index( vnum )
		
		Change that to ( PRG_MPROG should be the last argument ):
			get_prog_index( vnum, PRG_MPROG )
		
		Find the files that have this call in them by entering your src directory and typing
			grep -l get_mprog_index *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each get_mprog_index, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c

16) Find every call to mprog_type_to_name and change each to prog_type_to_name
	EXAMPLE:
		You find
			mprog_type_to_name( mprg->trig_type )
		
		Change that to:
			prog_type_to_name( mprg->trig_type )
		
		Find the files that have this call in them by entering your src directory and typing
			grep -l mprog_type_to_name *.c
		
		This will list all the files that call the function, then open each in your favorite editor, find
			each prog_type_to_name, and change them as explained above.
		
		DO NOT change anything in merc.h
		
		You may ignore the following files when making this change:
			mob_prog.c
			mob_cmds.c
			mob_cmds.h
			olc_mpcode.c
			
17) Open the snippet.c file and follow the instructions to make the changes to your code.  If you already
	have MOBprogs installed, just make sure the current MOBprog code is the same as the code being
	added.

18) Put the following files in your src directory, overwriting old files with these.

mob_prog.c
mob_cmds.c
mob_cmds.h
olc_mpcode.c

19) Do a clean recompile:

rm -f *.o
make

20) Start the MUD:)