Block dual accounts

Yoh Asakura

New member
Messages
261
Points
0
Emulator
Hi.

I have a script that blocks dual accounts but if I let my char in prontera in @afk for example, and then if I go to the pvp (which has the mapflag to block dual acc) my char from prontera will be kicked. Why if I didin't put mapflag in prontera?

Code:
-	script	blockdual	-1,{OnPCLoadMapEvent:	query_sql "SELECT `name` FROM `char` INNER JOIN `login` ON `login`.`account_id` = `char`.`account_id` WHERE `char`.`online` = '1' AND `login`.`last_ip` IN (SELECT `last_ip` FROM `login` WHERE `login`.`account_id` = '"+getcharid(3)+"')",.@name$;	for(set @i,0; @i < getarraysize(.@name$) && getarraysize(.@name$) > 1; set @i,@i+1){		if(getcharid(0) == getcharid(0,.@name$[@i])) continue;		atcommand "@adjgmlvl 0 "+.@name$[@i];		atcommand "@kick "+.@name$[@i];	}	if (getarraysize(.@name$) > 1) {		mes "^FF0000[Guardian]^000000";		mes "Sorry, you can't use double account in this place.";		close;	}end;} // Mapflagpvp_n_6-5	mapflag	loadevent
 
Last edited by a moderator:
@@Yoh Asakura try this 

Code:
-	script	blockdual	-1,{OnPCLoadMapEvent:	query_sql "SELECT `name` FROM `char` INNER JOIN `login` ON `login`.`account_id` = `char`.`account_id` WHERE `char`.`online` = '1' AND `login`.`last_ip` IN (SELECT `last_ip` FROM `login` WHERE `login`.`account_id` = '"+getcharid(3)+"')",.@name$;	for(@i = 0; @i < getarraysize(.@name$) && getarraysize(.@name$) > 1; @i = @i+1){		if(getcharid(0) == getcharid(0,.@name$[@i])) continue;		if(checkvending(""+ .@name$[@i] +"") != 0) continue;		atcommand "@adjgmlvl 0 "+.@name$[@i];		atcommand "@kick "+.@name$[@i];	}	if (getarraysize(.@name$) > 1) {		mes "^FF0000[Guardian]^000000";		mes "Sorry, you can't use double account in this place.";		close;	}end;} // Mapflagpvp_n_6-5	mapflag	loadevent
 
Just to check...I would like to let my char at prontera with @at and then with another account be able to go to pvp arena without having my @at character kicked.

I'll try the script you've edited.

 
@@Mhalicot

It didin't work.

If I have a char in prontera and the other one goes to pvp_n_6-5 map, the prontera char will get kicked.

 
Back
Top