> RESTORE ALL
> How would I go about doing that? Setting everyone's stats to max?
I'm not sure if stock do_restore checks the parameter at all, so this
code might need to be hacked in to do that. But, basically, to iterate
through a list of players and restore them, do this:
add this to the top of do_restore in act.wizard.c:
struct char_data *vict, *list;
struct descriptor_data *j;
this is the code to actually restore people, note the comments, you'll
need to take them and the irrelevant line out:
for (j = descriptor_list; j; j = j->next)
if (STATE(j) == CON_PLAYING && j->character && j->character != ch)
{
vict = j->character;
if (GET_LEVEL(ch) <= GET_LEVEL(vict))
continue;
////////////////////////////////////////////////////////////////////////
////////////
// DO YOUR RESTORING HERE
// if you are using the stock code, use:
GET_HIT(vict) = GET_MAX_HIT(vict);
// if you are using the events patch, use:
alter_hit(vict, -(GET_MAX_HIT(vict) - GET_HIT(vict)));
////////////////////////////////////////////////////////////////////////
/////////////
act("$n has restored you!", FALSE, ch, 0, vict, TO_VICT);
}
If you don't already know how to check if the user typed 'restore all'
then you can do this:
one_argument(argument, buf);
if (!*buf)
send_to_char("Restore which what where?\r\n", ch);
else if (!str_cmp("all", buf)) {
// restore all code goes here
} else {
// regular code goes here
}
Hope that helps. :)
-Mark Smith
xb95@yahoo.com
ICQ: 2903909
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST