Jump to content
  • 0
Sign in to follow this  
Aegiskore

User Log-in Limit Except Prontera

Question

hi Guys,

 

Just want to know if its possible to limit account IP login in all maps except prontera?

 

Example:

If 4 accounts will login in different maps (except pront) the 5th account will be kick-out

 

or/and if 4 accounts will login in different maps and the 5th account will not be kick-out if he login in prontera

 

and vice-versa.

 

basically, I want the server to restrict IP log-in to 4 accounts only, except prontera which will be free of IP limit.

 

appreciate you help and inputs

Edited by Freezer

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

-    script    check_ip    -1,{OnPCLoginEvent:    if (strcharinfo(3) == "prontera") end;    query_sql "SELECT `last_ip` FROM `login` WHERE `account_id` = " + getcharid(3), .@last_ip$;    set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+ .@last_ip$ +"'",.@aid);    if (.@size < 4) end;    set .@self, getcharid(3);    for(.@i = 0; .@i < .@size; .@i++) {	    if (.@aid[.@i] == .@self)		    continue;	    if (attachrid(.@aid[.@i])) {		    set .@name$, strcharinfo(0);		    attachrid(.@self);		    message strcharinfo(0), "Too many accounts.";		    sleep2 5000;		    atcommand "@kick "+strcharinfo(0);		    end;	    }    }    end;}

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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