Jump to content

Question

4 answers to this question

Recommended Posts

Posted

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
Posted

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.

Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...