Jump to content

JuLiAnChz

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by JuLiAnChz

  1. Hi! I have a question, making reference to send packages to the server from external sockets, for example, i want to simulate the command @kami from the web, the server receive request and show a message in the user's client. Español Hola! Tengo una pregunta, haciendo referencia al envio de paquete al servidor desde sockets externos, por ejemplo, quiero simular el comando @kami desde una web, el servidor recibe la peticion y muestra el mensaje en los clientes del usuario.
  2. Yes, search in your code and modify corresponding. If you cant, write me in p2
  3. Follow the patch, and set my changes. In the first page is the downloadable
  4. Hola como vas!, gracias por responder. Esto es lo que sale en los logs de cada uno: Cannot start 'char-server', because it is already running p5497 Cannot start 'login-server', because it is already running p5497 Cannot start 'map-server', because it is already running p5497 Pero esto está ahi hace rato, de hecho creo que no esta escribiendo en los logs. El que tengo es de 64 bits.
  5. Buena noche, dias... Tengo una curiosidad, en el momento que subo mi emulador, los clientes pueden acceder correctamente, la cuestion es que si no hay ningun usuario, a eso de 10 minutos, no se puede acceder a la lista de personajes, solamente loggea pero cuando selecciono el servidor se queda y dice al rato que no hay conexion, si reinicio la conexion vuelve y funciona de primera, pero lo raro es que cuando dejo un personaje dentro del juego, ya sean 2 dias enteros el servidor anda de primera, pero si desconecto y no queda nadie, vuelve y pasa el problema. Que podria pasar? muchas gracias
  6. if you want to specify the MOB_ID, here is my MOD static int buildin_autoattack_sub(struct block_list *bl, va_list ap) { int *target_id = va_arg(ap, int *); *target_id = bl->id; struct mob_data* *md2 = va_arg(ap, struct mob_data* *); *md2 = BL_CAST(BL_MOB, bl); return 1; } void autoattack_motion(struct map_session_data* sd, int mob_id){ int i, target_id; struct mob_data* md2; for (i = 0;i <= 9;i++) { target_id = 0; map_foreachinarea(buildin_autoattack_sub, sd->bl.m, sd->bl.x - i, sd->bl.y - i, sd->bl.x + i, sd->bl.y + i, BL_MOB, &target_id, &md2); if (target_id) { if (mob_id != 0 && mob_id == md2->mob_id) { unit_attack(&sd->bl, target_id, 1); } else if (mob_id == 0) { unit_attack(&sd->bl, target_id, 1); } else { target_id = 0; } break; } target_id = 0; } if (!target_id) { unit_walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), sd->bl.y + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), 0); } return; } int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd = NULL; int mob_id = (int *)data; sd = map_id2sd(id); if (sd == NULL) return 0; if (sd->sc.option & OPTION_AUTOATTACK) { autoattack_motion(sd, mob_id); add_timer(gettick() + 1000, autoattack_timer, sd->bl.id, (intptr_t)mob_id); } return 0; } ACMD_FUNC(autoattack) { nullpo_retr(-1, sd); int mob_id = 0; char monster[NAME_LENGTH]; memset(monster, '\0', sizeof(monster)); if (message || *message) { if (sscanf(message, "%23s", monster) > 0) { if ((mob_id = mobdb_searchname(monster)) == 0) mob_id = mobdb_checkid(atoi(monster)); if (mob_id == 0) { clif_displaymessage(fd, msg_txt(sd, 40)); // Invalid monster ID or name. return -1; } } } if (sd->sc.option & OPTION_AUTOATTACK) { sd->sc.option &= ~OPTION_AUTOATTACK; unit_stop_attack(&sd->bl); clif_displaymessage(fd, "Has desactivado AutoAtaque"); } else { sd->sc.option |= OPTION_AUTOATTACK; add_timer(gettick() + 200, autoattack_timer, sd->bl.id, (intptr_t)mob_id); clif_displaymessage(fd, "Has Activado AutoAtaque"); } clif_changeoption(&sd->bl); return 0; } EDIT: @autoattack - All @autoattack poring - Only poring @autoattack 1002 - Only poring
×
×
  • Create New...