ravetoon Posted September 23, 2018 Posted September 23, 2018 Want to limit 3ID to 1 IP with script? Quote
0 Emistry Posted September 24, 2018 Posted September 24, 2018 OnPCLoginEvent: query_sql("SELECT COUNT(`char_id`) FROM `char` WHERE `online` = 1 AND `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"')", .@count); if (.@count >= 3) { mes "Login count per IP exceed."; sleep2 3000; atcommand "@kick "+strcharinfo(0); } end; can try something like this. Quote
0 Hyroshima Posted September 24, 2018 Posted September 24, 2018 Please give me more information! Quote
0 Start_ Posted September 24, 2018 Posted September 24, 2018 (edited) https://drive.google.com/open?id=1wdfhD8HS0zFrXRfDgxslAtqQkgseywan - script king69 -1,{ OnPCLoginEvent: query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NG") > 0 && getd("$" + .@lip$ + "_NG2") > 0 && getd("$" + .@lip$ + "_NG3") > 0){ iAmOver9000 = 1; atcommand "@kick " + strcharinfo(0); end; } if ( getd("$" + .@lip$ + "_NG") <= 0){ setd "$" + .@lip$ + "_NG", 1; end; }else if ( getd("$" + .@lip$ + "_NG2") <= 0){ setd "$" + .@lip$ + "_NG2", 1; end; }else if ( getd("$" + .@lip$ + "_NG3") <= 0){ setd "$" + .@lip$ + "_NG3", 1; end; } end; OnPCLogoutEvent: if(iAmOver9000>0) end; query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NG3") > 0){ setd "$" + .@lip$ + "_NG3", 0; end; }else if ( getd("$" + .@lip$ + "_NG2") > 0){ setd "$" + .@lip$ + "_NG2", 0; end; }else if ( getd("$" + .@lip$ + "_NG") > 0){ setd "$" + .@lip$ + "_NG", 0; end; } end; } Edited September 24, 2018 by TARTs Quote
Question
ravetoon
Want to limit 3ID to 1 IP with script?
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.