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

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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