Jump to content
  • 0

LAST_IP LIMIT


kitty14

Question


  • Group:  Members
  • Topic Count:  103
  • Topics Per Day:  0.03
  • Content Count:  323
  • Reputation:   4
  • Joined:  12/09/13
  • Last Seen:  

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.
}"

1. 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?

 

C. for 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!

Edited by kitty14
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   3
  • Joined:  02/14/14
  • Last Seen:  

interesting, work for everyone ? can use it in my server?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

more of less the same idea you could use this and modify to your own need.

https://pastebin.com/JnYju1Jv

 

 

anyway for your own topic

you should elaborate how your server check for VIP status.

 

beside you can just apply disable dual client to limit the max entry for last mac

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  103
  • Topics Per Day:  0.03
  • Content Count:  323
  • Reputation:   4
  • Joined:  12/09/13
  • Last Seen:  

more of less the same idea you could use this and modify to your own need.

https://pastebin.com/JnYju1Jv

 

 

anyway for your own topic

you should elaborate how your server check for VIP status.

 

beside you can just apply disable dual client to limit the max entry for last mac

Nice! thanks!

Well for My VIPs im using this:

 

if((#VIPSERVICE == 1 && #VIP_Lasttime + .VIP_Cooldown > gettimetick(2) && #VIP_Lasttime < gettimetick(2))
	|| (#FREEVIPSERVICE == 1 && #VIP_Lasttime + .FREE_VIP_Cooldown > gettimetick(2) && #VIP_Lasttime < gettimetick(2))) {

I wonder if can also use sql_queries in VIP registration. so that i can check whose accounts are VIPs. been googling it but cant seems to find any. would appreciate it if you can give me, scripts too if you have VIPs scripts that equeries sql. /heh

if i disable dual client this script that i want to implement will make no sense. cuz i wanted VIPs to login with 4 char, and 2 for non VIPs.

and if no last_mac ip inside castle will be kicked out.

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...