Jump to content
  • 0
Sign in to follow this  
estoudegreve

Catch dual

Question

This script is to disconect dual account when trying to participate the same event, live pvp o BG.

 

 -	script	catchDual	-1,{
OnCatch:
	mes "[^010849===^000000 ^016B14Anti DC^000000 ^010849===^000000]";
	atcommand "@battleignore";
	sleep2 1000;
	mes "Catch you!";
	sleep2 1000;
	atcommand "@kick "+strcharinfo(0);
	close2;
	end;

OnPCLoadMapEvent:
	if( strcharinfo(3) == strnpcinfo(4) )
	{
		set .@safadaum, 0;
		set .@invokeid, getcharid(3);
		
		query_sql("SELECT account_id FROM `login` where last_unique_id = (SELECT last_unique_id FROM `login` WHERE account_id = '"+getcharid(3)+"')",.@account_id);
		
		detachrid;
		
		for(set .@i, 0; .@i < getarraysize(.@account_id); set .@i, .@i + 1)
		{
			if( .@account_id[.@i] && attachrid(.@account_id[.@i]) && .@account_id[.@i] != .@invokeid)
				if( strcharinfo(3) == strnpcinfo(4) )
				{
					set .@safadaum, 1;
					detachrid;
					break;
				}
		}
		
		if( attachrid(.@invokeid) )
			if( .@safadaum ) { attachrid(.@invokeid); goto OnCatch;}
	}
end;

OnInit:
	setmapflag strnpcinfo(4), mf_loadevent; // Active flag load event on map
end;	
}

/*
	Duplicates
*/

guild_vs3,0,0,1	duplicate(catchDual)	catchDual#12	-1

 

It's activating with anyone with differents accounts!

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.