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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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