Jump to content
  • 0

bindatcmd @warp fields/dungeons entrances


_Terra

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   46
  • Joined:  07/15/13
  • Last Seen:  

Hello i wanna request a basic warp script that allows warp to any dungeon/field when you type "@warp pay_dun00" coordinates shouldn't work.

Is not necessary put all maps, i can put the rest of the maps myself.

Help is appreciated.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

-	script	Samepl	-1,{
	
	OnInit:
		bindatcmd "test",strnpcinfo(3) + "::OnAtcommand";
		end;
		
	OnAtcommand:
		if (getmapusers(.@atcmd_parameters$[0]) != -1) {
			message strcharinfo(0), "Map not found.";
			
		}
		else if (getmapflag(.@atcmd_parameters$[0], MF_NOWARPTO) && getgmlevel() < 99) {
			message strcharinfo(0), "You are not authorized to warp to this map.";
		}
		else if (getmapflag(.@atcmd_parameters$[0], MF_NOWARP) && getgmlevel() < 99) {
			message strcharinfo(0), "You are not authorized to warp from your current map.";
		}
		else {
			message strcharinfo(0), "Warped to " + .@atcmd_parameters$[0];
			warp .@atcmd_parameters$[0], 0, 0;
		}
		end;
}

just add the mapflag MF_NOWARPTO to any map that you want prevent player to warp into those maps.

 

or change the warp atcommand to enforce random warp

https://github.com/rathena/rathena/blob/master/src/map/atcommand.cpp#L600

mapindex = mapindex_name2idx(map_name, nullptr);
x = 0;
y = 0;

 

Edited by Emistry
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...