Jump to content
  • 0

Dual Client kick at same map


Vincent

Question


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Hi,

i am looking for a script where i can set the maps where dual client get kicked. I want to add this to WoE Maps so Player can play with dual client but if they want to enter WoE maps they get kicked.

Link to comment
Share on other sites

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   2
  • Joined:  02/15/14
  • Last Seen:  

When I use Old version 3, rAthena only. it appear this bug in putty, hopefully someone will be able to fix it.

 

[Warning]: script:getelementofarray: index out of range (-1)
[Debug]: Data: variable name='.tmp$' index=0
[Debug]: Source (NPC): dualclientkicker (invisible/not on a map)
 
following is my script...
 
-	script	dualclientkicker	-1,{
OnPCLoadMapEvent:
set .@charmap$, strcharinfo(3);
query_sql("SELECT FIND_IN_SET('"+.@charmap$+"', '"+.maps$+"');",.@q);
if(.@charmap$!=.tmp$[(.@q-1)]) end;
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);
if(.@len-1) {
for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d]));
if(.tmp$[(.@q-1)]==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) {
dispbottom "Dual accounts not allowed in HERE.";
warp "prontera",156,178;
}
}
}
end;
 
OnInit:
set .maps$ ,"bat_a01,bat_room,guild_vs3,prtg_cas05";
explode(.tmp$,.maps$,",") ;
set .lens , getarraysize(.tmp$);
for(set .a,0;.a<.lens;set .a,.a+1)
setmapflag .tmp$[.a], mf_loadevent;
} 
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   0
  • Joined:  06/08/14
  • Last Seen:  

what will happen to the players who played in the shop? they are all the same ip. does it mean that in the shop only 1 player can play? pls correct me if im worong.

thanks,

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

what will happen to the players who played in the shop? they are all the same ip. does it mean that in the shop only 1 player can play? pls correct me if im worong.

thanks,

 

If one of the shop maps are set then yes... I would just recommend not setting vending maps. :0 This is more for woe, pvp, or pve.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  11/22/13
  • Last Seen:  

 

what will happen to the players who played in the shop? they are all the same ip. does it mean that in the shop only 1 player can play? pls correct me if im worong.

thanks,

 

If one of the shop maps are set then yes... I would just recommend not setting vending maps. :0 This is more for woe, pvp, or pve.

 

@skorm, what he meant was "what will happen to the players who played in on computer/internet cafe? they are all having a one ip address. does it mean that one player in the same ip address can play since the computer or internet cafe / shop was using one ip address. 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

@skorm, what he meant was "what will happen to the players who played in on computer/internet cafe? they are all having a one ip address. does it mean that one player in the same ip address can play since the computer or internet cafe / shop was using one ip address. 

 

Yeah unless you're using harmony and mac address.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

On 7/26/2013 at 11:01 PM, Skorm said:

-	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_mac` = "+
		"(SELECT `last_mac` 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.
}

 

Use whatever script you want mine worked when I tested it. -.-

Hi @Skorm  Just wanted to ask if you could make this check for IP && Mac address cause sometimes in rare cases my players having the same Mac address but different IP.
I'm no good at SQL scripting so i was wondering if how can i make it check for both ip and mac before kicking the player. thanks

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   26
  • Joined:  12/24/14
  • Last Seen:  

On 4/17/2014 at 6:33 AM, fallen0519 said:
[Warning]: script:getelementofarray: index out of range (-1)
[Debug]: Data: variable name='.tmp$' index=0
[Debug]: Source (NPC): dualclientkicker (invisible/not on a map)

same problem

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