RumbleRO Posted December 30, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 20 Reputation: 1 Joined: 09/02/22 Last Seen: January 13 Share Posted December 30, 2023 I would like to ask if it is possible or doable to disable warping on certain cell. I have my PvP Cell in the middle of Prontera but I can still use the command @go # and can warp to it prontera # #.. Is it possible to disable certain cell. Thanks! Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 30, 2023 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2364 Joined: 10/28/11 Last Seen: Saturday at 07:02 PM Share Posted December 30, 2023 you can add something like this for your command if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_PVP) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, "Not allowed in PVP Area"); return -1; } Quote Link to comment Share on other sites More sharing options...
0 Winterfox Posted December 30, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 92 Joined: 06/30/18 Last Seen: November 27, 2024 Share Posted December 30, 2023 You could use bindatcmd to wrap a costum @go around the original and check in this if the player using it is in the PvP Cell and if he is, ignore the call of @go. If he isn't, you could simply call go with the parameters he used. Quote Link to comment Share on other sites More sharing options...
0 RumbleRO Posted December 30, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 20 Reputation: 1 Joined: 09/02/22 Last Seen: January 13 Author Share Posted December 30, 2023 (edited) 2 hours ago, Emistry said: you can add something like this for your command if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_PVP) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, "Not allowed in PVP Area"); return -1; } I can still use @go 0 when inside the pvp cell.. Edited December 30, 2023 by RumbleRO Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 30, 2023 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2364 Joined: 10/28/11 Last Seen: Saturday at 07:02 PM Share Posted December 30, 2023 it should be placed before you warp to other place... above the pc_setpos(...) and your character's group shouldn't have the warp anywhere permission Quote Link to comment Share on other sites More sharing options...
0 RumbleRO Posted December 30, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 20 Reputation: 1 Joined: 09/02/22 Last Seen: January 13 Author Share Posted December 30, 2023 13 minutes ago, Emistry said: it should be placed before you warp to other place... above the pc_setpos(...) and your character's group shouldn't have the warp anywhere permission Above here? May I ask what you mean with Character's Group shouldn't have the warp anywhere permission. Thank you! Quote Link to comment Share on other sites More sharing options...
0 Winterfox Posted December 30, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 92 Joined: 06/30/18 Last Seen: November 27, 2024 Share Posted December 30, 2023 (edited) - script GO_WRAPPER -1,{ OnInit: .map$ = "prontera"; .start_x = 150; .start_y = 150; .end_x = 160; .end_y = 160; bindatcmd("go", strnpcinfo(3) + "::OnGoWrapper"); end; OnGoWrapper: if(getmapxy(.@map$, .@x, .@y) < 0) end; if(.map$ == .@map$ && (.@x >= .start_x && .@x <= .end_x) && (.@y >= .start_y && .@y <= .end_y)) { dispbottom("You can't use @go in this area."); end; } atcommand("@go " + implode(.@atcmd_parameters$, " ")); end; } Edited December 30, 2023 by Winterfox Quote Link to comment Share on other sites More sharing options...
0 RumbleRO Posted December 31, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 20 Reputation: 1 Joined: 09/02/22 Last Seen: January 13 Author Share Posted December 31, 2023 (edited) 3 hours ago, Winterfox said: - script GO_WRAPPER -1,{ OnInit: .map$ = "prontera"; .start_x = 150; .start_y = 150; .end_x = 160; .end_y = 160; bindatcmd("go", strnpcinfo(3) + "::OnGoWrapper"); end; OnGoWrapper: if(getmapxy(.@map$, .@x, .@y) < 0) end; if(.map$ == .@map$ && (.@x >= .start_x && .@x <= .end_x) && (.@y >= .start_y && .@y <= .end_y)) { dispbottom("You can't use @go in this area."); end; } atcommand("@go " + implode(.@atcmd_parameters$, " ")); end; } Hi. I tried this my server Crashes when i use @go outside the xy xy area. Edited December 31, 2023 by RumbleRO Quote Link to comment Share on other sites More sharing options...
Question
RumbleRO
I would like to ask if it is possible or doable to disable warping on certain cell.
I have my PvP Cell in the middle of Prontera but I can still use the command @go # and can warp to it prontera # #..
Is it possible to disable certain cell. Thanks!
Link to comment
Share on other sites
7 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.