Tutti 1 Posted May 2, 2015 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 ! Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted May 2, 2015 are you sure you are using Hercules source? because it must be mapit->next, and mapit->free.. Quote Share this post Link to post Share on other sites
0 Tutti 1 Posted May 2, 2015 I change mapit-> free for mapit-> next? What do I fix this? I changed mapit-> free to mapit-> next and continued giving same thing in game when I use the Offline command to the server. As such the above Screenshot Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted May 4, 2015 I change mapit-> free for mapit-> next? What do I fix this? I changed mapit-> free to mapit-> next and continued giving same thing in game when I use the Offline command to the server. As such the above Screenshot after changes you must compile it.. sorry cant test it.. Quote Share this post Link to post Share on other sites
0 Tutti 1 Posted May 4, 2015 Friend not worked Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted May 4, 2015 @@Tutti, Compile error or what? Quote Share this post Link to post Share on other sites
0 Tutti 1 Posted May 5, 2015 He gave the same when using the command Disconnected from server. And train depot can not log more like this in Screenshots Quote Share this post Link to post Share on other sites
#HELPPPP !
Share this post
Link to post
Share on other sites