LAST_IP and LAST_MAC LIMIT

MikZ

New member
Messages
461
Points
0
Good day Herc master scripter,

May Request and Seek support from you in this script that i wanted to implement in my server.

Currently im using the script below:

- script dualclientkicker2 -1,{
OnPCLoginEvent:
set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN "+
"(SELECT `account_id` FROM `login` WHERE `last_ip` = "+
"(SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a);
sleep2 1000;
if(.@len>.max)
atcommand "@kick "+strcharinfo(0);
end;

OnInit:
set .max, 2; //Max Connections.
}

My server has NON VIP and 2 kind VIPs (#VIP1 and #VIP2)

how will i implement this in the script:

 A. allow max last_ip for NON VIPs up to 2

 B. allow max last_ip for VIPs up to 4

    B.a: My concern my VIP is per account would it be possible to detect last_ip first of VIP upon login before allowing up to 4 ips?

 Cfor players playing in the cafe can this be possible to just like ipexception. i will add the ip of the cafe and will allow 5 last_ip depend in the number or players in the cafe. like will query sql. if ipcheck = cafeip = allow @input how many last ip.

 D. disallow players that doesn't have last_mac inside WOE Castles, for some are using bots inside the castles.

hoping for you kindness. thank you!

 
Last edited by a moderator:
Back
Top