Jump to content
  • 0

Anti-abuse scripts help


pajodex

Question


  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

Hi,

I checked the available PVP Ladders, but I didn't really get what I imagined to have.

Anyways, to cut the chase, here is how my ideal anti-abuse should work:

Player A  = killer
Player B = killed
if A kills B more than 5 times, a penalty of 5 kills deduction will be given to player A and player B will be given an addition of 10 deaths.
Player A and B will be tagged as abuser.

And only way to lift it up is to pay a fine of 100k zeny to a Pvp warper (I can do this part my self)

Thank you in advance who ever are willing to help me /sob

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   58
  • Joined:  11/24/16
  • Last Seen:  

here the simple one that im still working on

-	script	PVP_System	-1,{

OnPCDieEvent:
	.@charName$ = strcharinfo(0);
	.@charLoc$ = strcharinfo(3);
	if ( callfunc ( "F_CheckPVP" , .@charLoc$ , .gmLvl ) == 0 )
		end;

	newKillerName$ = rid2name ( killedrid );
	if ( newKillerName$ == oldKillerName$ )
		Feed++;
	
	if ( Feed == .abuse ) {
		atcommand "@kick "+strcharinfo(0);
		dispbottom "You're been tagged as abuser!";
		dispbottom "You will keep been kicked until the gm reset abuse record";
		Kill = Kill - .penalty;
		end;
	}
	
	if ( Feed > 0 )
		announce strcharinfo(0) + " just feed " + newKillerName$ +" for " + Feed + " times.",bc_blue|bc_all;
	
	dispbottom newKillerName$ + " just kill you";
	oldKillerName$ = newKillerName$;
	Die++;
	end;
	
OnPCKillEvent:
	.@charName$ = strcharinfo(0);
	.@charLoc$ = strcharinfo(3);
	if ( callfunc ( "F_CheckPVP" , @charLoc$ , .gmLvl ) == 1 )
		end;

	newVictimName$ = rid2name ( killedrid );
	if ( newVictimName$ == oldVictimName$ )
		Abuse++;

	if ( Abuse == .abuse ) {
		atcommand "@kick "+strcharinfo(0);
		dispbottom "You're been tagged as abuser!";
		dispbottom "You will keep been kicked until the gm reset abuse record";
		Kill = Kill - .penalty;
		end;
	}
	
	if ( Abuse > 0 )
		dispbottom "You have kill " + newKillerName$ + " for " + Abuse + " times.";

	announce strcharinfo(0) + " just kill " + newVictimName$ + " at " + .@charLoc$ + "",bc_blue|bc_all;
	oldVictimName$ = newVictimName$;
	Kill++;
	end;
	
OnReset:
	Abuse = 0;
	debugmes "Abuse " + Abuse;
	end;
	
OnInit:
	.penalty = 5;		// deduct 5 kill
	.abuse = 5;			// tag abuse if 5 time for same name
	.gmLvl = 6;
	bindatcmd ( "resetpvp" , strnpcinfo(3) + "::OnReset" );
	end;
}

function	script	F_CheckPVP	{
	/*return 1 if block*/
	setarray .pvpMap$[0],"ALL"; // change to map name if you want specific map like , "prontera" , "geffen";
	.pvpMapSize = getarraysize ( .pvpMap$ );
	// don't detect die if not in pvp maps
	if ( .pvpMap$[0] != "ALL" ) {
		for ( .@i = 0; .@i < .pvpMapSize; .@i++ ) {
			if ( getarg(0) != .pvpMap$[.@i] ) {
				return 1;
			}
		}
	}
	
	if ( .pvpMap$[0] == "ALL" )
		return 0;
	
	// dont record if GM die
	if ( getgroupid() >= getarg(1) )
		return 1;
		
	return 0;
}

still need to working on how to reset the abuse, but because this is sample, i think you can do it by yourself, adjust it as you want

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

12 minutes ago, Hurtsky said:

here the simple one that im still working on


-	script	PVP_System	-1,{

OnPCDieEvent:
	.@charName$ = strcharinfo(0);
	.@charLoc$ = strcharinfo(3);
	if ( callfunc ( "F_CheckPVP" , .@charLoc$ , .gmLvl ) == 0 )
		end;

	newKillerName$ = rid2name ( killedrid );
	if ( newKillerName$ == oldKillerName$ )
		Feed++;
	
	if ( Feed == .abuse ) {
		atcommand "@kick "+strcharinfo(0);
		dispbottom "You're been tagged as abuser!";
		dispbottom "You will keep been kicked until the gm reset abuse record";
		Kill = Kill - .penalty;
		end;
	}
	
	if ( Feed > 0 )
		announce strcharinfo(0) + " just feed " + newKillerName$ +" for " + Feed + " times.",bc_blue|bc_all;
	
	dispbottom newKillerName$ + " just kill you";
	oldKillerName$ = newKillerName$;
	Die++;
	end;
	
OnPCKillEvent:
	.@charName$ = strcharinfo(0);
	.@charLoc$ = strcharinfo(3);
	if ( callfunc ( "F_CheckPVP" , @charLoc$ , .gmLvl ) == 1 )
		end;

	newVictimName$ = rid2name ( killedrid );
	if ( newVictimName$ == oldVictimName$ )
		Abuse++;

	if ( Abuse == .abuse ) {
		atcommand "@kick "+strcharinfo(0);
		dispbottom "You're been tagged as abuser!";
		dispbottom "You will keep been kicked until the gm reset abuse record";
		Kill = Kill - .penalty;
		end;
	}
	
	if ( Abuse > 0 )
		dispbottom "You have kill " + newKillerName$ + " for " + Abuse + " times.";

	announce strcharinfo(0) + " just kill " + newVictimName$ + " at " + .@charLoc$ + "",bc_blue|bc_all;
	oldVictimName$ = newVictimName$;
	Kill++;
	end;
	
OnReset:
	Abuse = 0;
	debugmes "Abuse " + Abuse;
	end;
	
OnInit:
	.penalty = 5;		// deduct 5 kill
	.abuse = 5;			// tag abuse if 5 time for same name
	.gmLvl = 6;
	bindatcmd ( "resetpvp" , strnpcinfo(3) + "::OnReset" );
	end;
}

function	script	F_CheckPVP	{
	/*return 1 if block*/
	setarray .pvpMap$[0],"ALL"; // change to map name if you want specific map like , "prontera" , "geffen";
	.pvpMapSize = getarraysize ( .pvpMap$ );
	// don't detect die if not in pvp maps
	if ( .pvpMap$[0] != "ALL" ) {
		for ( .@i = 0; .@i < .pvpMapSize; .@i++ ) {
			if ( getarg(0) != .pvpMap$[.@i] ) {
				return 1;
			}
		}
	}
	
	if ( .pvpMap$[0] == "ALL" )
		return 0;
	
	// dont record if GM die
	if ( getgroupid() >= getarg(1) )
		return 1;
		
	return 0;
}

still need to working on how to reset the abuse, but because this is sample, i think you can do it by yourself, adjust it as you want

Alright, thanks! I will work on this!

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