darking123 Posted May 13, 2020 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 931 Reputation: 13 Joined: 12/20/11 Last Seen: November 21, 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 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 35 Reputation: 25 Joined: 10/17/13 Last Seen: December 30, 2022 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 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 931 Reputation: 13 Joined: 12/20/11 Last Seen: November 21, 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...
Question
darking123
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
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.