Pink Guy Posted August 7, 2013 Posted August 7, 2013 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. Quote
GmOcean Posted August 7, 2013 Posted August 7, 2013 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; } Quote
Emistry Posted August 7, 2013 Posted August 7, 2013 try http://pastebin.com/raw.php?i=WQf1F3P9 @Lionhardt i think the timer should be refreshed everytime they killed a player ... Quote
GmOcean Posted August 7, 2013 Posted August 7, 2013 @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). Quote
Capuche Posted August 7, 2013 Posted August 7, 2013 should add a deltimer to avoid multiple instance warp "pvpmap",x,y; + deltimer strnpcinfo(0)+"::OnTimerCheck"; addtimer 30000,strnpcinfo(0)+"::OnTimerCheck"; Quote
Pink Guy Posted August 9, 2013 Author Posted August 9, 2013 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. Quote
Question
Pink Guy
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.
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.