Jump to content
  • 0
Sign in to follow this  
iraciz

Anti multi login by ip - Need to exclude AT Merchants!

Question

Good Day,
I found this script, and it's working fine, but is also counting the autotrade merchants! to the point if you have an autotrade logged out, you can't dual login!

Any possible way to not count the autotrade merchants in this script? In order to keep an autotrade vending and still log with two maximun same ip accounts.

Thanks in advance.

-	script	Only2perIP	-1,{
OnPCLoginEvent:
if (getgmlevel() >= 99) end;
set [email protected]$, strcharinfo(0);
if (query_sql("SELECT `char`.`name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_ip='"+getcharip()+"' AND `char`.online=1 AND `char`.char_id!="+getcharid(0), [email protected]$) >= 2) {
	for (set [email protected],0; [email protected]<getarraysize([email protected]name$); set [email protected]i,[email protected]i+1) {
		if (checkvending([email protected]name$[[email protected]i]) != 2)
			set [email protected]sameip, [email protected]sameip +1;
	}
	if ([email protected]sameip >= 2) {
		announce "Sorry, only 2 accounts per IP can be logged in at a time.", bc_self;
		sleep 1000;
		atcommand "@kick " + [email protected]$;
	}
}
end;
}

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Solved by my own means.

satanbitch1.thumb.png.d8ffa6cbd9e309af3d33d0eaa7efb26e.png

Autotrade merchants are not counting in the multi login ip filter,
Only 3 accounts per IP and the fourth was kicked.

Also added an exception, just in case there are confirmed brothers, couples, etcm in different pcs but using same ip:

if (#brothers) end;

 

-	script	Only3perIP	-1,{
OnPCLoginEvent:
if (getgmlevel() >= 99) end;
if (#brothers) end;
set [email protected]$, strcharinfo(0);
if (query_sql("SELECT `char`.`name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_ip='"+getcharip()+"' AND `char`.online=1 AND `char`.char_id!="+getcharid(0), [email protected]$) >= 2) {
	for (set [email protected],0; [email protected]<getarraysize([email protected]name$); set [email protected]i,[email protected]i+1) {
		if (!checkvending([email protected]name$[[email protected]i]) )
			set [email protected]sameip, [email protected]sameip +1;
	}
	if ([email protected]sameip >= 3) {
		announce "Lo sentimos, Solo se permite un maximo de 3 cuentas logeadas por IP.", bc_self;
		mes "Suzaku Ro";
		mes "Lo sentimos, solo  se permite un maximo de 3 cuentas logeadas por IP!";
		sleep 4000;
		atcommand "@kick " + [email protected]$;
	}
}
end;
}

 

Edited by iraciz

Share this post


Link to post
Share on other sites
  • 0

 

Share this post


Link to post
Share on other sites

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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.