/* Dazzle came up with a great idea, and it inspired me so I worked on it some more. * Basically I put everything into one command. You can turn each type on independantly, or * you can turn them all on or off at once. Expanding the tick updates into a new function * was his idea so i'm giving him credit for that as well. */ Changes for file merc.h *********************** put this with your other external variables extern bool double_exp; extern bool double_qp; extern bool quad_damage; extern int global_exp; extern int global_qp; extern int global_quad; extern sh_int display; extern sh_int qpdisplay; extern sh_int quaddisplay; Changes for file fight.c ************************ add this to the damage function right before damage is shown if (IS_NPC(victim) && !IS_NPC(ch) && quad_damage) dam = dam * 4; in function xp compute with the other declaration add this int bonus = 0; at the end right before the xp is returned put this bonus = xp; if (double_exp) { xp += bonus; } Changes for file act_wiz.c ************************** put this with the other local functions bool double_exp = FALSE; bool double_qp = FALSE; bool quad_damage = FALSE; Put this at the end of act_wiz.c void do_double( CHAR_DATA *ch, char *argument ) { char arg[MIL]; char arg1[MIL]; char arg2[MIL]; int amount; argument = one_argument( argument, arg ); argument = one_argument( argument, arg1); one_argument( argument, arg2); if ( arg[0] == '\0'|| arg1[0] == '\0' ) { send_to_char("Syntax: all ticks.\n\r",ch); send_to_char("Syntax: ticks.\n\r", ch ); send_to_char("Valid types are: double | quest | quad\n\r", ch ); return; } if (!str_cmp(arg, "all")) { if (!str_cmp(arg1, "on")) { if ( arg2[0] == '\0' || !is_number( arg2 ) ) { send_to_char("You need to apply the number of ticks.\n\r", ch ); return; } if (double_exp || double_qp || quad_damage ) { send_to_char("One of the types is already in affect! Please turn it off in order to use the all option.\n\r",ch); return; } amount = atoi( arg2 ); if ( amount < 0 || amount > 500 ) { send_to_char( "Please choose an amount between 0 and 500.\n\r", ch ); return; } global_exp = amount; double_exp = TRUE; global_qp = amount; double_qp = TRUE; global_quad = amount; quad_damage = TRUE; info( NULL, 0, "{G[INFO]:{x {R%s has declared %d ticks of double exp, double qp, and quad damage for everyone!{x\n\r", ch->name, amount ); return; } if (!str_cmp(arg1, "off")) { if (!double_exp && !double_qp && !quad_damage) { send_to_char("All of the double types are off. Turn them on first.\n\r",ch); return; } double_exp = FALSE; global_exp = 0; global_qp = 0; double_qp = FALSE; quad_damage = FALSE; global_quad = 0; info( NULL, 0, "{G[INFO]:{x {R%s has removed all of the double types!{x\n\r", ch->name); return; } } if (!str_cmp( arg, "exp")) { if (!str_cmp(arg1, "on")) { if ( arg2[0] == '\0' || !is_number( arg2 ) ) { send_to_char("You need to apply the number of ticks.\n\r", ch ); return; } if (double_exp) { send_to_char("Double exp is already in affect!\n\r",ch); return; } amount = atoi( arg2 ); if ( amount < 0 || amount > 500 ) { send_to_char( "Please choose an amount between 0 and 500.\n\r", ch ); return; } global_exp = amount; double_exp = TRUE; info( NULL, 0, "{G[INFO]:{x {R%s has declared %d ticks of double exp for everyone!{x\n\r", ch->name, amount ); return; } if (!str_cmp(arg, "off")) { if (!double_exp) { send_to_char("Double exp is not on please turn it on first!\n\r",ch); return; } double_exp = FALSE; global_exp = 0; info( NULL, 0, "{G[INFO]:{x {R%s has removed double experience!{x\n\r",ch->name); return; } } if (!str_cmp( arg, "quest")) { if (!str_cmp(arg1, "on")) { if ( arg2[0] == '\0' || !is_number( arg2 ) ) { send_to_char("You need to apply the number of ticks.\n\r", ch ); return; } if (double_qp) { send_to_char("Double questpoints is already in affect!\n\r",ch); return; } amount = atoi( arg2 ); if ( amount < 0 || amount > 500 ) { send_to_char( "Please choose an amount between 0 and 500.\n\r", ch ); return; } global_qp = amount; double_qp = TRUE; info( ch, 0, "{G[INFO]:{x {R%s has declared %d ticks of double questpoints for everyone!{x\n\r", ch->name, amount ); send_to_char("Double questpoints is now in affect!\n\r",ch); return; } if (!str_cmp(arg, "off")) { if (!double_qp) { send_to_char("Double questpoints is not on please turn it on first!\n\r",ch); return; } double_qp = FALSE; global_qp = 0; info( NULL, 0, "{G[INFO]:{x {R%s has removed double questpoints!{x\n\r",ch->name); return; } } if (!str_cmp( arg, "quad")) { if (!str_cmp(arg1, "on")) { if ( arg2[0] == '\0' || !is_number( arg2 ) ) { send_to_char("You need to apply the number of ticks.\n\r", ch ); return; } if (quad_damage) { send_to_char("Quad damage is already in affect!\n\r",ch); return; } amount = atoi( arg2 ); if ( amount < 0 || amount > 500 ) { send_to_char( "Please choose an amount between 0 and 500.\n\r", ch ); return; } global_quad = amount; quad_damage = TRUE; info( NULL, 0, "{G[INFO]:{x {R%s has declared %d ticks of quad damage for everyone!{x\n\r", ch->name, amount ); return; } if (!str_cmp(arg, "off")) { if (!quad_damage) { send_to_char("Quad damage is not on please turn it on first!\n\r",ch); return; } quad_damage = FALSE; global_quad = 0; info( NULL, 0, "{G[INFO]:{x {R%s has removed quad damage!{x\n\r",ch->name); return; } } send_to_char("Syntax: all ticks.\n\r",ch); send_to_char("Syntax: ticks.\n\r", ch ); send_to_char("Valid types are: double | quest | quad\n\r", ch ); } Changes for file update.c ************************* int global_exp; int global_qp; int global_quad; sh_int display; sh_int qpdisplay; sh_int quaddisplay; Put this in update after the char_update function void update_bonuses() { if ( global_exp-- >= -1 ) { display++; if ( display >= 3 && global_exp > 0 ) { info( NULL, 0, "{G[INFO]:{x {BThere are %d ticks of double exp left.{x\n\r", global_exp ); display = 0; return; } if (global_exp == 0) { info( NULL, 0, "{G[INFO]:{x {BDouble exp has run out!{x\n\r" ); double_exp = FALSE; return; } } if ( global_qp-- >= 0 ) { qpdisplay++; if ( qpdisplay >= 3 && global_qp > 0 ) { info( NULL, 0, "{G[INFO]:{x {BThere are %d ticks of double questpoints left.{x\n\r", global_qp ); qpdisplay = 0; return; } if ( global_qp == 0 ) { info( NULL, 0, "{G[INFO]:{x {BDouble questpoints has run out!{x\n\r" ); double_qp = FALSE; return; } } if ( global_quad-- >= 0 ) { quaddisplay++; if ( quaddisplay >= 3 && global_quad > 0 ) { info( NULL, 0, "{G[INFO]:{x {BThere are %d ticks of quad damage left.{x\n\r", global_quad ); quaddisplay = 0; return; } if ( global_quad == 0 ) { info( NULL, 0, "{G[INFO]:{x {BQaud damage has run out!{x\n\r" ); quad_damage = FALSE; return; } } } Put this in update_handler in the pulse_point section update_bonuses();