MikZ 5 Posted May 19, 2018 (edited) Good day! May I request a script in consumable items to allow players to warp to a town. wanted to have it like @go not @warp to player can just input town number or name. no dungeon or field. strictly for town warp. Thanks! Script: <" input .@map$; if ( getmapusers( .@map$ ) != -1 ) warp .@map$,0,0; end; "> }, Edited May 19, 2018 by MikZ Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 19, 2018 assuming you have this https://github.com/HerculesWS/Hercules/blob/stable/npc/mapflag/town.txt prontera,150,185,5 script test 1_F_MARIA,{ input .@map$; if ( getmapusers( .@map$ ) == -1 ) dispbottom "no such map"; else if ( !getmapflag( .@map$, mf_town ) ) dispbottom "not a town"; else atcommand "@go "+ .@map$; // yeah lazy to note down the coordinate, so use atcommand end; } 1 MikZ reacted to this Quote Share this post Link to post Share on other sites
0 MikZ 5 Posted May 19, 2018 (edited) 2 hours ago, AnnieRuru said: assuming you have this https://github.com/HerculesWS/Hercules/blob/stable/npc/mapflag/town.txt prontera,150,185,5 script test 1_F_MARIA,{ input .@map$; if ( getmapusers( .@map$ ) == -1 ) dispbottom "no such map"; else if ( !getmapflag( .@map$, mf_town ) ) dispbottom "not a town"; else atcommand "@go "+ .@map$; // yeah lazy to note down the coordinate, so use atcommand end; } Thank you so much Ms. AnnieRuru!!! Edited May 19, 2018 by MikZ Quote Share this post Link to post Share on other sites
Good day!
May I request a script in consumable items to allow players to warp to a town.
wanted to have it like @go not @warp to player can just input town number or name. no dungeon or field. strictly for town warp.
Thanks!
Script: <" input .@map$; if ( getmapusers( .@map$ ) != -1 ) warp .@map$,0,0; end; "> },
Share this post
Link to post
Share on other sites