Jump to content
  • 0

Custom PVP with extra function


Pink Guy

Question


  • Group:  Members
  • Topic Count:  131
  • Topics Per Day:  0.03
  • Content Count:  371
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Can someone make me an extra script for a PVP script that @nukes/@kills a player if they don't kill anyone within 30 seconds? This is to prevent those "teaming" in PVP. Make the example pvp map to -> prontera. Thanks to whoever will help.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

This is a very basic script. Mostly just a template so you can follow it and improve your own scripting skills.

Annotations are included so you can follow along.

<map_name>,<x>,<y>,<z>%TAB%script%TAB%<npc_name>%TAB%<sprite_id>,{
	set @Okills,@Nkills; //Sets Old Kills to equal New kills. This is incase they warp out on their own or by other means. (You could set to 0. But there is no need.)
	warp "<map_name>",<x>,<y>; // Replace with coordinates of PvP room.
	end;
	OnTimer30000: // 30 second timer label triggered after 30seconds.
	if(@Okills == @Nkills){ atcommand "@die"; sleep2 1000; warp "Savepoint",0,0; end;}
	// Checks to see if Old kills == New kills, if they do, that means they haven't killed anyone in 30seconds.
	set @Okills,@Nkills;
	setnpctimer 0; //Reset Timer. (Could be done with just initnpctimer but it's here to makesure it resets.
	initnpctimer;
	end;
	OnPCKillEvent: //Gives player a +1 whenever they kill someone. Used during the check at 30seconds.
	set @Nkills,@Nkills + 1;
	end;
}
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2352
  • Joined:  10/28/11
  • Last Seen:  

try 

http://pastebin.com/raw.php?i=WQf1F3P9

 

@Lionhardt

i think the timer should be refreshed everytime they killed a player ...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

@Emistry - Good spot lol, i thought i had made it refresh timer lmao. Can be so forgetful when I'm tired.

At anyrate, you can use Emistry's script, it's far more refined than mine. (I'm still too rusty gotta get back into scripting shape lol).

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

should add a deltimer to avoid multiple instance

	warp "pvpmap",x,y;
+	deltimer strnpcinfo(0)+"::OnTimerCheck";
	addtimer 30000,strnpcinfo(0)+"::OnTimerCheck";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  131
  • Topics Per Day:  0.03
  • Content Count:  371
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Thanks a lot you guys. I'll test them later and I'll probably follow Lionhardt's template so even for just a bit, I can polish or enhance my scripting skills. Again, thank you for your help and fast replies.

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