Jump to content
  • 0
Tdi123

[resolved]

Question

7 answers to this question

Recommended Posts

  • 0

may try this

-	script	Sample	-1,{
	end;

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	[email protected]_gepard = 1;
	
	setarray .map$,
		"quiz_00"
		, "prt_are_in"
		, "bat_c01"
		, "guild_vs2"
		, "ordeal_1-2"
		, "coliseum"
		, "ama_test"
		, "quiz_02"
		, "safari"
		, "niflheim"
		, "que_qsch01"
		, "[email protected]"
		, "[email protected]"
		, "p_track01"
		, "pvp_n_2-1";
		
	[email protected]_size = getarraysize(.map$);
	for ([email protected] = 0; [email protected] < [email protected]_size; [email protected]++)
		setmapflag .map$[[email protected]], MF_LOADEVENT;
		
	.sql_field$ = ([email protected]_gepard ? "last_unique_id" : "last_ip");
	end;
	
OnPCLoadMapEvent:
	[email protected]$ = strcharinfo(3);
	if (inarray(.map$, [email protected]$) == -1) end;
	
	[email protected]$ = "SELECT `account_id` FROM `login`";
	[email protected]$ = [email protected]$ + " WHERE `group_id` < 99";
	[email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` AND `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` AND `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

	[email protected] = query_sql([email protected]$, [email protected]);
	[email protected]_aid = getcharid(3);
	
	if ([email protected]) {
		for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
			if (attachrid([email protected][[email protected]])) {
				if (strcharinfo(3) == [email protected]$) {
					attachrid [email protected]_aid;
					dispbottom "[ BrasilRO ] Me desculpe, mas para evitar abusos, Double Clients não são permitidos nesse mapa.";
					atcommand "@kick " + strcharinfo(0);
					end;
				}
			}
		}
	}
	end;
}

 

Link to comment
Share on other sites

  • 0
2 hours ago, Emistry said:

may try this

-	script	Sample	-1,{
	end;

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	[email protected]_gepard = 1;
	
	setarray .map$,
		"quiz_00"
		, "prt_are_in"
		, "bat_c01"
		, "guild_vs2"
		, "ordeal_1-2"
		, "coliseum"
		, "ama_test"
		, "quiz_02"
		, "safari"
		, "niflheim"
		, "que_qsch01"
		, "[email protected]"
		, "[email protected]"
		, "p_track01"
		, "pvp_n_2-1";
		
	[email protected]_size = getarraysize(.map$);
	for ([email protected] = 0; [email protected] < [email protected]_size; [email protected]++)
		setmapflag .map$[[email protected]], MF_LOADEVENT;
		
	.sql_field$ = ([email protected]_gepard ? "last_unique_id" : "last_ip");
	end;
	
OnPCLoadMapEvent:
	[email protected]$ = strcharinfo(3);
	if (inarray(.map$, [email protected]$) == -1) end;
	
	[email protected]$ = "SELECT `account_id` FROM `login`";
	[email protected]$ = [email protected]$ + " WHERE `group_id` < 99";
	[email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` AND `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` AND `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

	[email protected] = query_sql([email protected]$, [email protected]);
	[email protected]_aid = getcharid(3);
	
	if ([email protected]) {
		for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
			if (attachrid([email protected][[email protected]])) {
				if (strcharinfo(3) == [email protected]$) {
					attachrid [email protected]_aid;
					dispbottom "[ BrasilRO ] Me desculpe, mas para evitar abusos, Double Clients não são permitidos nesse mapa.";
					atcommand "@kick " + strcharinfo(0);
					end;
				}
			}
		}
	}
	end;
}

 

 

Did not work

Link to comment
Share on other sites

  • 0
-	script	Sample	-1,{

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	[email protected]_gepard = 1;
	
	setarray .map$,
		"quiz_00"
		, "prt_are_in"
		, "bat_c01"
		, "guild_vs2"
		, "ordeal_1-2"
		, "coliseum"
		, "ama_test"
		, "quiz_02"
		, "safari"
		, "niflheim"
		, "que_qsch01"
		, "[email protected]"
		, "[email protected]"
		, "p_track01"
		, "pvp_n_2-1";
		
	[email protected]_size = getarraysize(.map$);
	for ([email protected] = 0; [email protected] < [email protected]_size; [email protected]++)
		setmapflag .map$[[email protected]], MF_LOADEVENT;
		
	.sql_field$ = ([email protected]_gepard ? "last_unique_id" : "last_ip");
	end;
	
OnPCLoadMapEvent:
	[email protected]$ = strcharinfo(3);
	if (inarray(.map$, [email protected]$) == -1) end;
	
	[email protected]$ = "SELECT `account_id` FROM `login`";
	[email protected]$ = [email protected]$ + " WHERE 1=1";
	[email protected]$ = [email protected]$ + " AND `group_id` < 99";
	[email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` WHERE `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` WHERE `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

	debugmes [email protected]$;
	[email protected] = query_sql([email protected]$, [email protected]);
	[email protected]_aid = getcharid(3);
	
	if ([email protected]) {
		for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
			if (attachrid([email protected][[email protected]])) {
				if (strcharinfo(3) == [email protected]$) {
					attachrid [email protected]_aid;
					dispbottom "[ BrasilRO ] Me desculpe, mas para evitar abusos, Double Clients não são permitidos nesse mapa.";
					sleep2 2000;
					atcommand "@kick " + strcharinfo(0);
					end;
				}
			}
		}
	}
	end;
}

please at least try to tell "what" is not working next time, thank you.

Link to comment
Share on other sites

  • 0
2 hours ago, Emistry said:
-	script	Sample	-1,{

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	[email protected]_gepard = 1;
	
	setarray .map$,
		"quiz_00"
		, "prt_are_in"
		, "bat_c01"
		, "guild_vs2"
		, "ordeal_1-2"
		, "coliseum"
		, "ama_test"
		, "quiz_02"
		, "safari"
		, "niflheim"
		, "que_qsch01"
		, "[email protected]"
		, "[email protected]"
		, "p_track01"
		, "pvp_n_2-1";
		
	[email protected]_size = getarraysize(.map$);
	for ([email protected] = 0; [email protected] < [email protected]_size; [email protected]++)
		setmapflag .map$[[email protected]], MF_LOADEVENT;
		
	.sql_field$ = ([email protected]_gepard ? "last_unique_id" : "last_ip");
	end;
	
OnPCLoadMapEvent:
	[email protected]$ = strcharinfo(3);
	if (inarray(.map$, [email protected]$) == -1) end;
	
	[email protected]$ = "SELECT `account_id` FROM `login`";
	[email protected]$ = [email protected]$ + " WHERE 1=1";
	[email protected]$ = [email protected]$ + " AND `group_id` < 99";
	[email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` WHERE `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` WHERE `autotrade` > 0)";
	[email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

	debugmes [email protected]$;
	[email protected] = query_sql([email protected]$, [email protected]);
	[email protected]_aid = getcharid(3);
	
	if ([email protected]) {
		for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
			if (attachrid([email protected][[email protected]])) {
				if (strcharinfo(3) == [email protected]$) {
					attachrid [email protected]_aid;
					dispbottom "[ BrasilRO ] Me desculpe, mas para evitar abusos, Double Clients não são permitidos nesse mapa.";
					sleep2 2000;
					atcommand "@kick " + strcharinfo(0);
					end;
				}
			}
		}
	}
	end;
}

please at least try to tell "what" is not working next time, thank you.

I tested OffLine by IP and it presents this error, with unique_id, nothing happens when entering maps that cannot dual acc

1202078669_Semttulo.png.fac9e5ed62e2efc1e6fc99cc97c9b75b.png

with or without group_id 99, same error happens

 

1206376353_Semttulo.png.c72f7cd61fd4bccbffcbce02f50de8d9.png

tested in the following ways:

[email protected]$ = "SELECT `account_id` FROM `login`";
    [email protected]$ = [email protected]$ + " WHERE 1=1";
    [email protected]$ = [email protected]$ + " AND `group_id` < 100";
    [email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
    [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` WHERE `autotrade` > 0)";
    [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` WHERE `autotrade` > 0)";
    [email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

[email protected]$ = strcharinfo(3);
    if (inarray(.map$, [email protected]$) == -1) end;
    
    [email protected]$ = "SELECT `account_id` FROM `login`";
    [email protected]$ = [email protected]$ + " WHERE 1=1";
    [email protected]$ = [email protected]$ + " AND `group_id` < 99";
    [email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
    [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` WHERE `autotrade` > 0)";
    [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` WHERE `autotrade` > 0)";
    [email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

[email protected]$ = strcharinfo(3);
    if (inarray(.map$, [email protected]$) == -1) end;
    
    [email protected]$ = "SELECT `account_id` FROM `login`";
    [email protected]$ = [email protected]$ + " WHERE 1=1";
    [email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3);
    [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` WHERE `autotrade` > 0)";
    [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` WHERE `autotrade` > 0)";
    [email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")";

[email protected]_gepard = 0; and [email protected]_gepard = 1;

Did not work

Link to comment
Share on other sites

  • 0

your script suppose to kick the second or next character who have same IP or unique id.

But you tested with only one char, which is also an Admin character.

Test it with 2 normal character instead.

remove the debug message, since its meant for debug purpose

debugmes [email protected]$;

 

Link to comment
Share on other sites

  • 0
On 5/5/2022 at 12:45 AM, Emistry said:

your script suppose to kick the second or next character who have same IP or unique id.

But you tested with only one char, which is also an Admin character.

Test it with 2 normal character instead.

remove the debug message, since its meant for debug purpose

debugmes [email protected]$;

 

I tested with admin account, and with groud_id 0 player account

Did not work

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



×
×
  • Create New...

Important Information

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