void do_forest(char *u)
{
aClient *source;
- char *cmd;
int num = rand() % 12;
- source = find(u);
- if (!is_playing(u))
+ if (!(source = find(u)) || !source->stats)
{
notice(s_GameServ, u, "You must be playing the game to search the forest!");
+ return;
+ }
+ else if (!is_alive(source))
+ {
+ notice(s_GameServ, u, "You are dead. Wait until tomorrow to search the forest some more.");
+ return;
}
else
{
"till tomorrow!");
return;
}
- else if (isnt_fighting(u))
+ else if (!is_fighting(u))
{
Player *p = source->stats;
p->forest_fights--;