Limestone Posted April 11, 2012 Posted April 11, 2012 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 Quote
Brian Posted April 11, 2012 Posted April 11, 2012 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 } Quote
KeiKun Posted April 11, 2012 Posted April 11, 2012 impossible same IP can be but it sucks where user uses dynamic ip ( like computer shops ) Quote
Nameless2you Posted April 11, 2012 Posted April 11, 2012 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 Quote
Limestone Posted April 12, 2012 Author Posted April 12, 2012 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 Quote
Question
Limestone
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
5 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.