darking123 Posted May 13, 2020 Share Posted May 13, 2020 when a player has been unjailed or the jailtime lapsed. The player returns to it's original position before it went to the prison. may I ask how to change it so that the player will return to his savepoint instead or specific map and coordinates? Thank you! Quote Link to comment Share on other sites More sharing options...
0 HaureN Posted May 13, 2020 Share Posted May 13, 2020 let me see if i get it, you want to player be teleported to a specific location when jail is over? u can use part of @go command (https://github.com/rathena/rathena/blob/ca56c060cf3d4c11b0f6da9c5d5b2d8e8e5c3d7e/src/map/atcommand.cpp#L1939) if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == SETPOS_OK) { clif_displaymessage(fd, msg_txt(sd,0)); // Warped. } in @unjail (https://github.com/rathena/rathena/blob/ca56c060cf3d4c11b0f6da9c5d5b2d8e8e5c3d7e/src/map/atcommand.cpp#L4957) //Reset jail time to 1 sec. sc_start(NULL,&pl_sd->bl,SC_JAILED,100,1,1000); clif_displaymessage(pl_sd->fd, msg_txt(sd,120)); // A GM has discharged you from jail. clif_displaymessage(fd, msg_txt(sd,121)); // Player unjailed. return 0; i'm not sure but would be something like that(?) //Reset jail time to 1 sec. pc_setpos(sd, mapindex_name2id(prontera), 150, 150, CLR_TELEPORT); // really not sure sc_start(NULL,&pl_sd->bl,SC_JAILED,100,1,1000); clif_displaymessage(pl_sd->fd, msg_txt(sd,120)); // A GM has discharged you from jail. clif_displaymessage(fd, msg_txt(sd,121)); // Player unjailed. return 0; Quote Link to comment Share on other sites More sharing options...
0 darking123 Posted May 13, 2020 Author Share Posted May 13, 2020 33 minutes ago, HaureN said: let me see if i get it, you want to player be teleported to a specific location when jail is over? u can use part of @go command (https://github.com/rathena/rathena/blob/ca56c060cf3d4c11b0f6da9c5d5b2d8e8e5c3d7e/src/map/atcommand.cpp#L1939) if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == SETPOS_OK) { clif_displaymessage(fd, msg_txt(sd,0)); // Warped. } in @unjail (https://github.com/rathena/rathena/blob/ca56c060cf3d4c11b0f6da9c5d5b2d8e8e5c3d7e/src/map/atcommand.cpp#L4957) //Reset jail time to 1 sec. sc_start(NULL,&pl_sd->bl,SC_JAILED,100,1,1000); clif_displaymessage(pl_sd->fd, msg_txt(sd,120)); // A GM has discharged you from jail. clif_displaymessage(fd, msg_txt(sd,121)); // Player unjailed. return 0; i'm not sure but would be something like that(?) //Reset jail time to 1 sec. pc_setpos(sd, mapindex_name2id(prontera), 150, 150, CLR_TELEPORT); // really not sure sc_start(NULL,&pl_sd->bl,SC_JAILED,100,1,1000); clif_displaymessage(pl_sd->fd, msg_txt(sd,120)); // A GM has discharged you from jail. clif_displaymessage(fd, msg_txt(sd,121)); // Player unjailed. return 0; thank you for your response however that is not working. It just teleport the player back to his original position. I think it is something to do with how SC_JAILED bahave. hmm. Quote Link to comment Share on other sites More sharing options...
when a player has been unjailed or the jailtime lapsed. The player returns to it's original position before it went to the prison.
may I ask how to change it so that the player will return to his savepoint instead or specific map and coordinates? Thank you!
Link to comment
Share on other sites