Jump to content
  • 0

Only triggers if 3 times killed.


Question

Posted (edited)

-	script	PVPKill1	-1,{
OnPCKillEvent:
getmapxy(.@map$,.@mapx,.@mapy,0);
if (.@map$ == "galaxy") {

	if (killedrid == getcharid(3) || killedrid == last_kill) {
		atcommand "@die";
		atcommand "@storeall";
		announce ""+strcharinfo(0)+" tried to Kill On Sight the same player!",bc_blue|bc_all;
		end;
	} else {
		set last_kill, killedrid;
		announce "Please do not kill the same player again after this. ALL your items will be in storage.",bc_blue|bc_self;
		dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
		dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
		dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
		dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
		end;
	}
}
}

Will only @die and @storeall if the player killed him/her 3 times at least.

Edited by Brian
[codebox]

2 answers to this question

Recommended Posts

Posted

Here you go:

-	script	anti_KOS	-1,{
OnPCKillEvent:
if (strcharinfo(3) == "galaxy") {
	// if they kill themself,     or if they kill the same player again
	if (killedrid == getcharid(3) || killedrid == last_kill) {
		set @kos_count, @kos_count +1;

		if (@kos_count >= 3) {
			atcommand "@die";
			atcommand "@storeall";
			announce strcharinfo(0)+" KOS'd the same player "+@kos_count+" times in a row!",bc_blue|bc_all;
		} else {
			announce strcharinfo(0)+" tried to Kill On Sight the same player!",bc_blue|bc_all;
			announce "Please do not kill the same player again after this. ALL your items will be in storage.",bc_blue|bc_self;
			dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
			dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
			dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
			dispbottom "Do not kill the same player after this one. ALL your items will be in storage.";
		}
	} else { // they killed a different player, so reset KOS count to 0
		set @kos_count, 0;
	}
	set last_kill, killedrid;
}
end;
}

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