Jump to content

[RE-IMAGINED] PK / Skull System v.2


Guest

Recommended Posts

Note that this was inspired by my previous attempt at making a PK / Skull system a while ago, but it is outdated and needs renewal. So here it is!

Rules:

 

Credit appreciated, but not mandatory.

 

Note: Because of the way main attacks are handled in Intersect, when hitting a player there is a random chance of either hitting the player or hitting the NPC, giving the attacker a slight chance, based on their attack, to evade the Player Killer event.

 

Instructions:

 

1) Make an NPC with no sprite and no name. Give it 1 HP and make it non-aggressive. If you want exp for attacking players, add some exp.

2) Locate the map which you would like to have the PK protection on. You can have multiple maps. Keep these maps in mind.

3) Create two common events. Name the first one "PK Manager" and the second one "PK Spawner".

4) In the "PK Spawner" common event, make it an autorun event. Place a conditional branch - if map is [the map you want to have the PK system on]. Then, put a "spawn NPC on player" command and set the NPC to the NPC you made on step 1. Set the location of the NPC spawned to directly on top of the player. Next INSIDE the conditional branch, add a wait of 200 milliseconds (the best ratio between not lagging behind the player and actually recognising the NPC is there when someone attacks a player). Now, all you need to do is add a "despawn NPC's command".

5) In the "PK Manager" common event, make it an event with no trigger. In this event, you can do whatever you want to the player that has attacked another player! You can add text, take away sparrows or even items. Technically, you could even REWARD the player. Please note that you will not be able to spawn any NPC's in this map as the "PK Spawner" event will remove them almost instantaneously, so I'd recommend teleporting another map first to spawn NPC's.

6) Lastly, go to the NPC you made in step 1 and set the common event "on player kill" to the common event "PK Manager". If you want the whole party to be punished, set it to "on party kill".

 

==>If you want multiple maps, just copy all the code in "PK Spawner", paste it below and change the map for every other map you wish to add.

 

Optional - Make Player Killers be allowed to be killed without punishment forever, for [x] milliseconds or until they are killed:

 

1) Create a player switch called "NO PK Protection"?

2) Somewhere in the "PK Manager" common event, set the player switch "NO PK Protection" to true.

3) In the "PK Spawner" common event, at the start of the common event (use right click > insert on the first command)and put a label. Then, place a conditional branch - if player switch "NO PK Protection" is true. Inside this conditional branch, put "wait 500 to 1000 ms" (to avoid lag) and then place "go to label: x" (x is the name of the label you put at the start.)

4) Create a new common event called "PK Protection Adder". Set its trigger to autorun and place a conditional branch - player switch "NO PK Protection" is true. In it, put "wait 60,000 ms" (or however long you want it to be) and then put set player switch "NO PK Protection" to false. The benefit of this is even if they logout and log back in, it will still remember they have no PK protection and start counting down the timer again, so they have to wait out this timer while online.

 

Enjoy! :p

Link to comment
Share on other sites

18 minutes ago, Kibbelz said:

@Dashplant don't tell bunny I added PVP Kill and PVP Death common event triggers :P

 

Well umm.. My way has its benefits. With my way, you can set whether there should be a PvP kill/death event for you, if you have already killed another player! Haha take that *Kibbz adds PvP kill/death event conditions* aw dang

Link to comment
Share on other sites

33 minutes ago, Khaikaa said:

You know there are "on map" conditions on b6, right?

 

... There are "on map" conditions for B5 too?

Link to comment
Share on other sites

Just now, Andical said:

Thank you mate, you are awesome. Will try it later I hope it works :P

I am developing the game of my dreams and this is going to fit perfect.

 

No problem! However, as Kibbz said, in B6 there will be on player kill events. Maybe you want to wait till then, or perhaps you want to use this system as a way to make it more "customisable". Whatever you do, enjoy, and good luck!

Link to comment
Share on other sites

Just now, Andical said:

my game will have a really large map... what do you recommend me for this? this version or B6?

 

 

Well, one problem is that with this system you cannot spawn NPC's on the map, so I'd wait for B6.

 

However, while you wait, you could use this as a replacement.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...