I want to be able to add a restore all option to the function do_restore in act.wizard.c.
I want this to be able to restore all hp/mana/moves to all people online. Currently it only works for one designated person.
Code:
ACMD(do_restore)
{
char buf[MAX_INPUT_LENGTH];
struct char_data *vict;
int i;
one_argument(argument, buf);
if (!*buf)
send_to_char(ch, "Whom do you wish to restore?\r\n");
else if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
send_to_char(ch, "%s", CONFIG_NOPERSON);
else if (!IS_NPC(vict) && ch != vict && GET_LEVEL(vict) >= GET_LEVEL(ch))
send_to_char(ch, "They don't need your help.\r\n");
else {
if (!IS_NPC(vict) && GET_LEVEL(ch) >= LVL_GRGOD) {
if (GET_LEVEL(vict) >= LVL_IMMORT)
for (i = 1; i <= MAX_SKILLS; i++)
SET_NAT_PSKILL(vict, i, MAX_PROFICIENCY);
if (GET_LEVEL(vict) >= LVL_GRGOD) {
for (i = 0; i < NUM_ABILITIES; i++)
GET_STAT_MAX(vict, i) = MAX_STAT_ATTRIBUTE;
GET_NAT_STR(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_ADD(vict) = GET_STAT_MAX(vict, ABILITY_ADD) = 0;
GET_NAT_INT(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_WIS(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_DEX(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_STR(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_CON(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_CHA(vict) = MAX_STAT_ATTRIBUTE;
GET_NAT_HIT(vict) = MAX_HIT;
GET_NAT_MANA(vict) = MAX_MANA;
GET_NAT_MOVE(vict) = MAX_MOVE;
GET_MANA_GAIN(vict) = MAX_MANA_GAIN;
GET_MOVE_GAIN(vict) = MAX_MOVE_GAIN;
GET_HIT_GAIN(vict) = MAX_HIT_GAIN;
GET_NAT_AP(vict) = MIN_AP;
}
}
update_pos(vict);
adjust_hits_and_attacks(vict, TRUE);
affect_total(vict);
send_to_char(ch, "%s", CONFIG_OK);
act("You have been fully healed by $N!", FALSE, vict, 0, ch, TO_CHAR);
}
}