Jump to content
  • 0

block two acc on a map


Question

Posted

It is possible to put in a certain map?

-	script	Only1perMAC	-1,{
OnPCLoginEvent:
	if (getgmlevel() >= 99) end;
	if (query_sql("SELECT `char`.`name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_mac=(SELECT last_mac FROM login WHERE account_id="+getcharid(3)+") AND `char`.online=1 AND `char`.char_id!="+getcharid(0), .@name$) >= 1) {
		for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) {
			if (!checkvending(.@name$[.@i]))
				set .@samemac, .@samemac +1;
		}
		if (.@samemac >= 1) {
			announce "Sorry, only 1 account per computer can be logged in at a time.", bc_self;
			sleep2 1000;
			atcommand "@kick "+strcharinfo(0);
		}
	}
	end;
}

2 answers to this question

Recommended Posts

Posted


- script Only1perMAC -1,{

OnPCLoadMapEvent:

if ( getgmlevel() >= 99 ) end;

.@mymap$ = strcharinfo(3);

.@amount = query_sql( "SELECT `name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE last_mac"+

"=(SELECT last_mac FROM login WHERE account_id="+getcharid(3)+") AND online=1 AND char_id!="+getcharid(0), .@name$ );

if ( .@amount > 0 ) {

for ( ; .@i < .@amount; .@i++ ) {

getmapxy .@map$, .@x, .@y, 0, .@name$[.@i];

if ( .@map$[.@i] == .@mymap$ )

break;

}

if ( .@i < .@amount ) {

announce "Sorry, only 1 account per computer can be logged in at a time.", bc_self;

sleep2 1000;

atcommand "@kick "+strcharinfo(0);

}

}

end;

}

prontera mapflag loadevent

Posted
-	script	Only1perMAC	-1,{
OnPCLoadMapEvent:
	if ( getgmlevel() >= 99 ) end;
	.@mymap$ = strcharinfo(3);
	.@amount = query_sql( "SELECT `name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE last_mac"+
					"=(SELECT last_mac FROM login WHERE account_id="+getcharid(3)+") AND online=1 AND char_id!="+getcharid(0), .@name$ );
	if ( .@amount > 0 ) {
		for ( ; .@i < .@amount; .@i++ ) {
			getmapxy .@map$, .@x, .@y, 0, .@name$[.@i];
			if ( .@map$[.@i] == .@mymap$ )
				break;
		}
		if ( .@i < .@amount ) {
			announce "Sorry, only 1 account per computer can be logged in at a time.", bc_self;
			sleep2 1000;
			atcommand "@kick "+strcharinfo(0);
		}
	}
	end;
}

prontera	mapflag	loadevent

 

 

Good tested, but when I get automatically get disconnected.

In need of a script to block dual acc on some maps, more block via not the right IP, because if the guy play a lan house he will not sign.
So I thought via MAC, more does not work.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...