Jump to content
  • 0
Sign in to follow this  
latheesan

Is there an NPC event I can use to detect when player enters a map?

Question

Is there an NPC event I can use to detect when player enters a map?

 

I want to prevent duel client on event maps, but to be able to do that, I need to first detect user entering a specific map.

 

How can I go about doing this?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

 

-	script	mapload	FAKE_NPC,{
OnPCLoadMapEvent:
sleep2 10; // small delay
	if( strcharinfo(3) == "mapname") { // if player goes to map
		query_sql("SELECT COUNT(*) FROM `login` WHERE `last_ip` = (SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+")",.@ipcount); // check and count ip
		if (.@ipcount >= 2) {	// and if yes
			warp "prontera",156,184;	// warp out
			message strcharinfo(0),"Access Deined: No Dual Clienting allowed here"; // and tell why
			end;
		}
	} else {
		end;
	}
}
 
<MAPNAME>	mapflag	loadevent // mapflag for the map you wanna use it

 

 

edit: added spoiler. just read you wanted only the eventname. It's OnPCLoadMapEvent. You also need to give the map the loadevent mapflag

Edited by Ridley

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.