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