Jump to content
  • 0

Warp that has Gepard ID Checker


Eross

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.10
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Hi ! recently i used Devil Square event ... But all my players are using duals to abuse rewards ... I just want to make a warp/portal that will restrict dual char to enter the area by checking its Gepard ID ... If no same ID the player will warp into reward area but if it has It will kick out the dual player ...Thankyou !

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  248
  • Reputation:   34
  • Joined:  11/19/11
  • Last Seen:  

53 minutes ago, erjsanmiguel said:

Hi ! recently i used Devil Square event ... But all my players are using duals to abuse rewards ... I just want to make a warp/portal that will restrict dual char to enter the area by checking its Gepard ID ... If no same ID the player will warp into reward area but if it has It will kick out the dual player ...Thankyou !

try this. credit to Tauro.

-	script	dl_map	-1,{
	end;

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	set .Gepard,1;
	end;
	
OnPCLoadMapEvent:
	if (.Gepard == 1) {
		getmapxy(.@map$,.@mapx,.@mapy,0);
		query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@UniqueId$);
		query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@UniqueId$+"'", .@CuentaId);
		set .@error,getcharid(3,strcharinfo(0));
		for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) {
			if(attachrid(.@CuentaId[.@i])) {
				if (.@CuentaId == 2000000) {
					set .@j,0;
				} else {
					getmapxy(.@map2$,.@mapx2,.@mapy2,0);
					if (.@map2$ == .@map$){
						set .@j,.@j+1;
					}
				}
			}	
		}
		detachrid;
	
	attachrid .@error;
	if(.@j > 1) {
		//dispbottom "Sorry, dual client is not allowed on this map.";
		announce "Sorry, dual client is not allowed on this map.", bc_self;
		warp "SavePoint",0,0;
	}

	end;
	} else {
		getmapxy(.@map$,.@mapx,.@mapy,0);
		query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@UltimaIp$);
		query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@UltimaIp$+"'", .@CuentaId);
		set .@error,getcharid(3,strcharinfo(0));
		for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) {
			if(attachrid(.@CuentaId[.@i])) {
//if .Gepard is 0 add id of accounts to which the system will not affect, brothers, couple, gms, etc ... .@CuentaId == accountId
				if (.@CuentaId == 2000001 || .@cuentaId == 2000156 || .@CuentaId == 2000249 || .@CuentaId == 2000002 || .@CuentaId == 2000031 || .@CuentaId == 2000050 || .@CuentaId == 2000021 || .@CuentaId == 2000073 || .@CuentaId == 2000029) {
					set .@j,0;
				} else {
					getmapxy(.@map2$,.@mapx2,.@mapy2,0);
					if (.@map2$ == .@map$){
						set .@j,.@j+1;
					}
				}
			}	
		}
		detachrid;
	
	attachrid .@error;
	if(.@j > 1) {
		//dispbottom "Sorry, dual client is not allowed on this map.";
		announce "Sorry, dual client is not allowed on this map.", bc_self;
		warp "SavePoint",0,0;
	}

	end;
	}
}

//Your map here
//loadevents
guild_vs3	mapflag	loadevent

 

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