Jump to content
  • 0

Only triggers if 3 times killed.


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

-	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]
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Thank you so much :D

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