Echoes 6 Posted August 29, 2018 As the title say, is there a way to kick the player to character selection instead of account login when using @kick command? It may need some src edits at worst. Thank you Quote Share this post Link to post Share on other sites
0 CarlosHenrq 13 Posted August 31, 2018 You need to change @kick or create a new one like @kick2charselect In clif.c you have this: static void clif_parse_Restart(int fd, struct map_session_data *sd) { switch(RFIFOB(fd,2)) { case 0x00: pc->respawn(sd,CLR_OUTSIGHT); break; case 0x01: /* Rovert's Prevent logout option - Fixed [Valaris] */ if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] && (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); } else { clif->disconnect_ack(sd, 1); } break; } } Need to use this: //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); =] Quote Share this post Link to post Share on other sites
0 Echoes 6 Posted August 31, 2018 @CarlosHenrq Weird, I have the same code: static void clif_parse_Restart(int fd, struct map_session_data *sd) { switch(RFIFOB(fd,2)) { case 0x00: pc->respawn(sd,CLR_OUTSIGHT); break; case 0x01: /* Rovert's Prevent logout option - Fixed [Valaris] */ if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] && (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); } else { clif->disconnect_ack(sd, 1); } break; } } What do you mean by use that portion of the code? How can I use only that portion? o.0 Quote Share this post Link to post Share on other sites
0 CarlosHenrq 13 Posted August 31, 2018 48 minutes ago, Echoes said: What do you mean by use that portion of the code? How can I use only that portion? o.0 The "secret" is here: //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); This sends the packet to char-server and char-server should respond with OK or NOT OK. If OK, map-server should disconnect the character and the client'll popup the character selection. Quote Share this post Link to post Share on other sites
0 Echoes 6 Posted August 31, 2018 1 minute ago, CarlosHenrq said: The "secret" is here: //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); This sends the packet to char-server and char-server should respond with OK or NOT OK. If OK, map-server should disconnect the character and the client'll popup the character selection. Ah, yeah, I understand that part, but how do I make the command to read that line instead of the kicking to login one Dx Quote Share this post Link to post Share on other sites
0 CarlosHenrq 13 Posted August 31, 2018 Basically you have, in atcommand.c: /*========================================== * *------------------------------------------*/ ACMD(kick) { struct map_session_data *pl_sd; memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!*message) { clif->message(fd, msg_fd(fd,1026)); // Please enter a player name (usage: @kick <char name/ID>). return false; } if ((pl_sd=map->nick2sd(message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_fd(fd,3)); // Character not found. return false; } if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { clif->message(fd, msg_fd(fd,81)); // Your GM level don't authorize you to do this action on this player. return false; } clif->GM_kick(sd, pl_sd); return true; } Change: clif->GM_kick(sd, pl_sd); To: chrif->charselectreq(pl_sd, sockt->session[pl_sd->fd]->client_addr); And this made the trick... 1 Echoes reacted to this Quote Share this post Link to post Share on other sites
0 Echoes 6 Posted September 1, 2018 Thank you!!!!! Quote Share this post Link to post Share on other sites
As the title say, is there a way to kick the player to character selection instead of account login when using @kick command?
It may need some src edits at worst.
Thank you
Share this post
Link to post
Share on other sites