Jump to content
  • 0

same ip on a instance map.


andrew0960

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   0
  • Joined:  09/21/16
  • Last Seen:  

hi i need some help to create a script that avoid multiple same ip on a instance map.

i tried the script below, but it doesnt work because its not reading the instance id..and im not sure how to do that.  (using @Secrets MVP Ladder)

-	script	abcde#2	-1,{

	OnPCLoadMapEvent:

		  

		   getmapxy(.@amap$,.@mapx,.@mapy,0);



		   if(.@amap$!="guild_vs2-2") end;  

			  

			query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIp$);

			query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIp$+"'", .@AccountId);

			set .@aidtemp,getcharid(3,strcharinfo(0));



			for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1)

			   {

				 if(attachrid(.@AccountId[.@i]))

					{

					  getmapxy(.@qmap$,.@qmapx,.@qmapy,0);

					  if (.@qmap$== .@amap$) set .@j,.@j+1;

					 }

					detachrid;

			   }

			attachrid .@aidtemp;

			if(.@j > $@MaxWimdows)

				  warp "SavePoint",0,0;	

	end;

	

	OnInit:

	

	set $@MaxWimdows,1;

	end;

	

	}

	

	//------Enable map OnPCLoadMapEvent-------------------

	guild_vs2-2	mapflag	loadevent

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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