Jump to content
  • 0
dakai

restrict multi login in woe same ip address

Question

Hi guys, some months ago I seen somewhere in the forum a script that limits the amount of logins per ip address in woe, I was looking for it, but just only have found one that limit the users in other maps.

 

Have someone that script and can share it? thanks in advance.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
// http://rathena.org/board/topic/58835-done-request-ip-check/page__view__findpost__p__80798/*To add more maps:1. add it to this string :	set .maps$, "bat_room,anothermap,etc";2. and add the 'loadevent' mapflag on that map :	<map name>	mapflag	loadevent*/// Checking I P when entering a Map and kick if dual .. example map bat_room-	script	Only1perIP	-1,{OnPCLoadMapEvent:	set .maps$, "bat_room,anothermap,etc";	set .@my_map$, strcharinfo(3);	// check if they are on a "1-per-IP" map	if (compare(","+.maps$+"," , ","+.@my_map$+",")) {		// look for other online players from the same IP		query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id " + 		          "WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") " + 		          "AND `char`.online=1 AND login.account_id!="+getcharid(3), .@account_id;		for (set .@i,0; .@i<getarraysize(.@account_id); set .@i,.@i+1) {			// check if other online players are on the same map			getmapxy .@map$,.@x,.@y, 0, rid2name(.@account_id[.@i]);			if (.@map$ == .@my_map$) {				// kick the new player arriving to map				set .@name$, strcharinfo(0);				announce "Sorry, only 1 char per IP can be on this map at a time.", bc_self;				sleep 1000;				atcommand "@kick " + .@name$;			}		}	}	end;}bat_room	mapflag	loadevent

here what i have in my script collection, link can be found on top of script and i think it can be more optimized for your own need

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.