Jump to content
  • 0

Disabled Dual Client in a Certain map


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

sorry if im in a wrong section, but is this possible? disabling dual client in a certain map, like pvp maps? thank you for those who will help me :)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

If you only want to allow 1 char per IP in a certain map, you could do something like this:

prontera,155,188,0	script	TestNPC	910,{
if (callfunc("has_char_from_same_ip", "guild_vs2")) {
	mes "There is already a char from your IP on guild_vs2.";
} else {
	warp "guild_vs2",0,0;
}
close;
}


function	script	has_char_from_same_ip	{
set .@my_map$, getarg(0);
// get array of char names who are online from the same IP
query_sql "SELECT `char`.`name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id " + 
          "WHERE last_ip=(SELECT last_ip FROM login WHERE account_id="+playerattached()+") AND online AND `char`.account_id!=" + playerattached(), .@name$;
// check each char, and see if they are on the map
for (set .@i,0; .@i < getarraysize(.@name$); set .@i,.@i+1) {
	getmapxy .@map$, .@x, .@y, 0, .@name$[.@i];
	if (.@map$ == .@my_map$)
		return 1; // another char from this IP is already on map
}
return 0; // no other chars from this IP are on that map
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  967
  • Reputation:   53
  • Joined:  11/13/11
  • Last Seen:  

impossible

same IP can be but

it sucks where user uses dynamic ip ( like computer shops )

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

last_mac, but only available with harmony.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

harmony is even 1 step further they have a nice command that determines your current mac and checks the other map depending if you give one what mac id's are on there.. good for bg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

aw.. i have harmony.. i set my max dual client into 2.. the problem is i have a pvp points script.. so i want to stop abusing it ..

@brian: thanks for the script.. i will try this :)

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