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

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.