Adding stat rerolling function

Posted by Edgeofforever on Sun 24 Oct 2004 05:53 AM — 3 posts, 15,161 views.

#0
If there is anywhere this has already been discussed, please direct me there.

I'm trying to create a function that will reroll stats on command. I already believe I know how to set up the actual rolling and where, (in the nanny function in mud.comm.c) and I also know how to create the loop, I just dont know how to call to the character and ask for input, then accept that input and compare it to see if the loop ends or not. Any help would be appriciated.

Canada #1
What do you mean, on command? On who's command? The player? If thats the case, you would set it up like a regular command in the style of

void do_command(CHAR_DATA *ch, char*argument)
{
/* Perform function here */
}
In this circumstance, ch would point to your player. They would call such a function like any other command.

If you want to use a command that forces people to reroll, I would recommend copying another immortal command, something that uses get_char_world to find a target.
#2
Thanks, I got it now.