Friends added this @mobalive command on my server
Recompiled when they appeared following ERROR!
When I use the command on the server to the Disconnected Server.
I try to log into the server again select char I want to log in and is giving.
* I can only log in again to the server if I turn off the emulator and on again!
Here is the
atcommand.c command that I added.
/*========================================== * MOB Alive *------------------------------------------*/ACMD(mobalive){ char mob_name[100]; int mob_id; int number = 0; struct s_mapiterator* it; if (!message || !*message || sscanf(message, "%99[^n]", mob_name) < 1) { clif->message(fd, "Por favor, digite o nome do monstro (uso: @mobalive <nome>

."); // Please enter a monster name (use: @mlive <nome ou id do monstro>

. return false; } if ((mob_id = atoi(mob_name)) == 0) mob_id = mob->db_searchname(mob_name); if(mob_id > 0 && mob->db_checkid(mob_id) == 0){ snprintf(atcmd_output, sizeof atcmd_output, "ID %s inválido!",mob_name); clif->message(fd, atcmd_output); return false; } if(mob_id == atoi(mob_name) && mob->db(mob_id)->jname) strcpy(mob_name,mob->db(mob_id)->jname); // --ja-- // strcpy(mob_name,mob_db(mob_id)->name); // --en-- snprintf(atcmd_output, sizeof atcmd_output, "Procurando pelo monstro %s em %s ...", mob_name, mapindex_id2name(sd->mapindex)); clif->message(fd, atcmd_output); it = mapit_geteachmob(); for(; { TBL_MOB* md = (TBL_MOB*)mapit_next(it); if( md == NULL ) break;// no more mobs if( md->bl.m != sd->bl.m ) continue; if( mob_id != -1 && md->class_ != mob_id ) continue; if( md->spawn_timer == INVALID_TIMER ) { ++ number; snprintf(atcmd_output, sizeof(atcmd_output), "Há pelo menos um %s vivo.", md->name); clif->message(fd, atcmd_output); } } if ( ! number ) clif->message(fd, "Nenhum encontrado."); mapit_free(it); return true;}
#HELPPPP !