Jump to content
  • 0

Catch dual


FelipeMartins

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

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

It's activating with anyone with differents accounts!

 

 -	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

 

Link to comment
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.   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...