Jump to content
  • 0

ANTI DL IP


AngelaKiss

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.01
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

I would like to request a script that check the ip before to warp to a map of event and refuse to warp if theres a ip

 

really hope you can help me

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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


prontera,102,102,3 script IP_WARP 45,3,3,{

end;

OnTouch:

if( getcharip() == "127.0.0.1" )

warp "prontera",0,0;

end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.01
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

i want to add it to this script and make players unable to doble login 2 of the same ip in the map of pvp

 

prontera.gat,156,184,5 script Advanced PvP 414,{
//Configuracion
set @nombre$, "^00CCFF[Axel]^000000";//Nombre NPC
set @kill$, strcharinfo(0);
//Empiezo del NPC
mes @nombre$;
mes "HI ^0000FF"+strcharinfo(0)+"^000000.";
mes "Im here to take you to PvP";
mes "¿wich room  you want to go?";
next;
switch(select("Killer["+getmapusers("guild_vs2")+"]:Monster["+getmapusers("guild_vs3")+"]")){
case 1:
            warp "guild_vs2",0,0;
  end;
               
        case 2:
            warp "guild_vs3",0,0;
  close;
OnPCKillEvent:
announce "Player  "+strcharinfo(0)+" was killed by "+@kill$+".",bc_blue;
}
}
guild_vs2 mapflag pvp
guild_vs3 mapflag pvp
guild_vs2 mapflag pvp_noguild
guild_vs3 mapflag pvp_noguild
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  317
  • Reputation:   63
  • Joined:  11/13/11
  • Last Seen:  

This becomes a problem when you reach the 128 entry limit for arrays. Other than that, this should work.

-	script	dual_ip	-1,{
OnPCLoadMapEvent:
	getmapxy(.@amap$,.@mapx,.@mapy,0);
	
	if(.@amap$!="xmas") 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 > 1) {
			dispbottom "You may not dual client on this map.";
			warp "prontera",156,183;   
		}
	end;
}
   
   //------Enable map OnPCLoadMapEvent-------------------
xmas	mapflag	loadevent

Just replace xmas with the map of your choice.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.01
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

Thanks Conflicts it is working but now i would like to make that it checks the ip before it warps and it wont allow the dual client to go the map. That could be possible?

Edited by AngelZito
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...