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

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.