Jump to content
  • 0
Sign in to follow this  
MikZ

CUSTOM ITEM SCRIPT FOR @GO

Question

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 by MikZ

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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;
}

 

Share this post


Link to post
Share on other sites
  • 0
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 by MikZ

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.