Kong 9 Posted February 20, 2015 (edited) Got it, thank you very much Mumbles! ~ Can you please confirm (via in-game test) that nowarpto prevents this version of @go from warping to a map flagged with nowarpto, and that nowarp prevents warping from a map flagged with nowarp? I am unable to test any in-game behaviours at this time. Actually this nowarpto mapflag is designed for @warp command and not @go since you only have limited maps available for @go and you can simply remove the map if you don't want to allow people from warping to that town. Edited February 20, 2015 by Kong Quote Share this post Link to post Share on other sites
Mumbles 193 Posted February 20, 2015 Actually this nowarpto mapflag is designed for @warp command and not @go since you only have limited maps available for @go and you can simply remove the map if you don't want to allow people from warping to that town. Edit: I have another problem though, the script does not bypass the nowarp mapflag even if your GM level is high. So the documentation for nowarpto is correct, then; lost track of what the original issue was for a sec lol. In your last reply, you mentioned replacing mf_nowarp with mf_nowarpto: } else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp)) { However, the intent of this line is to prevent warping if the player's Group ID isn't high enough OR if the destination has a nowarp flag, regardless of Group ID. You can bypass this for GMs by changing the expression a little (I'm sure there's a prettier way to do it, but I'm not feeling up to it): } else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp) && getgroupid() < getarg(4)) { In regard to your original inquiry, the behaviour of nowarp is to prevent the use of @go to a destination; to prevent the use of @go from a map flagged with nowarp (despite this not being the intent of the nowarp flag), you can still prevent warping by adding an expression similar to my original suggestion: } else if (getmapflag(strcharinfo(3), mf_nowarp)) { message strcharinfo(0), "You are not authorised to warp from this map."; If you would like to prevent warping from specific maps, I would recommend moving forward with the filter/blacklist route — hell, you could even prevent both nowarp-flagged and specific maps from being warped to if you wanted to. 1 Kuroyama reacted to this Quote Share this post Link to post Share on other sites
xlaws27 3 Posted May 12, 2015 Actually this nowarpto mapflag is designed for @warp command and not @go since you only have limited maps available for @go and you can simply remove the map if you don't want to allow people from warping to that town. Edit: I have another problem though, the script does not bypass the nowarp mapflag even if your GM level is high. So the documentation for nowarpto is correct, then; lost track of what the original issue was for a sec lol. In your last reply, you mentioned replacing mf_nowarp with mf_nowarpto: } else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp)) { However, the intent of this line is to prevent warping if the player's Group ID isn't high enough OR if the destination has a nowarp flag, regardless of Group ID. You can bypass this for GMs by changing the expression a little (I'm sure there's a prettier way to do it, but I'm not feeling up to it): } else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp) && getgroupid() < getarg(4)) { In regard to your original inquiry, the behaviour of nowarp is to prevent the use of @go to a destination; to prevent the use of @go from a map flagged with nowarp (despite this not being the intent of the nowarp flag), you can still prevent warping by adding an expression similar to my original suggestion: } else if (getmapflag(strcharinfo(3), mf_nowarp)) { message strcharinfo(0), "You are not authorised to warp from this map."; If you would like to prevent warping from specific maps, I would recommend moving forward with the filter/blacklist route — hell, you could even prevent both nowarp-flagged and specific maps from being warped to if you wanted to. i tried it but still any gm lvl cant .@go 0 on castles Quote Share this post Link to post Share on other sites
JoyRo 5 Posted May 3, 2016 (edited) Hey Mumbles, Nice script thanks! Edited May 3, 2016 by JoyRo Quote Share this post Link to post Share on other sites
rokimoki 19 Posted September 11, 2016 I want to know if I must remove @go command from src or this will replace the current functionality that @go does in src... Quote Share this post Link to post Share on other sites
Mumbles 193 Posted September 11, 2016 I want to know if I must remove @go command from src or this will replace the current functionality that @go does in src... This code might be deprecated. If it does still work, it should overwrite the existing functionality of @go. When this was written, you did not need to make any src changes, as bindatcmd binded @go to the specified label within the script. Quote Share this post Link to post Share on other sites
rans 7 Posted September 12, 2016 Waiting for @warp like this Quote Share this post Link to post Share on other sites
Begin 11 Posted June 2, 2018 Thanks for another wonderful script, sir! Quote Share this post Link to post Share on other sites
Fred 0 Posted August 16, 2020 (edited) I created the code for glast_01 } else if (alias("36", "glast")) { go("glast", 370, 304, 0, 0, .cost); } else { message strcharinfo(0), "36: Glast"; message strcharinfo(0), "@go failed."; } end; But seems not work ? I replaced the @go command on src\map\atcommand Edited August 16, 2020 by Fred Quote Share this post Link to post Share on other sites
Mumbles 193 Posted August 17, 2020 2 hours ago, Fred said: But seems not work ? I replaced the @go command on src\map\atcommand Well...this was your first mistake. This is a script-based atcommand utility; it should be loaded as a custom .txt script. Copy the original file I provided and add its location to npc/scripts_custom.conf; doing this will override the src-based atcommand when your server initializes. 2 hours ago, Fred said: I created the code for glast_01 } else if (alias("36", "glast")) { go("glast", 370, 304, 0, 0, .cost); } else { message strcharinfo(0), "36: Glast"; message strcharinfo(0), "@go failed."; } end; I think you might have misunderstood the way the script functions. Aliases included in the alias() function serve to allow a player to type multiple different variants of a phrase to arrive at the same location. An example in your case: alias("36", "glast", "gh") ...would allow the player to type: @go "36" @go "glast" @go "gh" ...and still arrive at the same map and coordinates that you set for that alias. You seem to have added the alias name in the go() function instead of the map name. The correct way to add an @go point for glast_01 would be to include the map_name in the go() function. Try this: go("glast_01", 370, 304, 0, 0, .cost); Hope this resolves your issue. Please note that I wrote this script-based atcommand utility several years ago; I have not kept up with Hercules's progress, so this information may be entirely deprecated. However, if you are running a version of Hercules where this script was still compatible, my corrections should suffice. Good luck! Quote Share this post Link to post Share on other sites
Fred 0 Posted August 17, 2020 it's woks thanks! Quote Share this post Link to post Share on other sites