CUSTOM ITEM SCRIPT FOR @GO

MikZ

New member
Messages
461
Points
0
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!

Code:
	Script: <"	input .@map$;
			if ( getmapusers( .@map$ ) != -1 ) warp .@map$,0,0; end; ">
},
 
Last edited by a moderator:
assuming you have this https://github.com/HerculesWS/Hercules/blob/stable/npc/mapflag/town.txt

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

 
Last edited by a moderator:
Back
Top