Skip to main content

Kill Rewards

The Kill Rewards module allows players to get items or a kit when they kill a player. A kill reward can contain either individual items, kits or references to kits. The reward can optionally filter which players are eligible to receive the reward, or when/where the reward is active.

This module can, for example, be used to give upgrades to players by giving them gold ingots. Then, once they have collected enough ingots, they can craft armor, purchase items from a shop, or use the ingots as redeemables for a scorebox, etc.

Kill Rewards Element
ElementDescriptionValue/Children
<kill-rewards> </kill-rewards>Node containing all kill reward definitions.Kill Reward elements
Sub-elements
<kill-reward> </kill-reward>A single kill reward.Kill Reward Sub-elements
Kill Reward Attributes
AttributeDescriptionValue/Children
filterPropertyFilter who can claim this reward and when.Filter
kitPropertyThe kit to give players as the kill reward.Kit ID
actionPropertyRun the specified action as the kill reward.Action ID
victim-actionPropertyRun the specified action on the victim instead of the attacker.Action ID
Kill Reward Sub-elements
ElementDescriptionValue/Children
<item>Individual items given as a kill reward.Item
<filter>PropertyFilter who can claim this reward and when.Filter
<kit>PropertyThe kit to give players as the kill reward.Kit
<action>PropertyThe action to run as the kill reward.Action
<victim-action>PropertyThe action to run on the victim.Action

Examples

Kill rewards with filters

<kill-rewards>
<!-- Give two emeralds for all kills -->
<kill-reward>
<item amount="2" material="emerald"/>
</kill-reward>

<!-- Give a cactus to players on the red team for every third kill -->
<kill-reward>
<filter>
<all>
<team>red</team>
<kill-streak count="3"/>
</all>
</filter>
<item material="cactus"/>
</kill-reward>
</kill-rewards>

Kill rewards with kits

<kill-rewards>
<!-- Give the player an iron helmet, iron helmet, and Speed II effect -->
<kill-reward>
<kit force="true">
<item slot="0" material="iron sword"/>
<helmet material="iron helmet"/>
<effect amplifier="2">speed</effect>
</kit>
</kill-reward>

<!-- Give the "reward-kit" to the player for every 8th kill -->
<kill-reward>
<filter>
<kill-streak count="8" repeat="true"/>
</filter>
<kit id="reward-kit"/>
</kill-reward>
</kill-rewards>

Kill rewards with actions

<kill-rewards>
<!-- Runs "some-action" on the victim whenever they are killed by a member of red team -->
<kill-reward filter="red-team" victim-action="some-action"/>

<!-- Kits and actions defined as references -->
<kill-reward action="some-kit" /> <!-- Kits are a type of action, so they can be used as an action -->
<kill-reward action="some-action"/>

<!-- Inline defined actions -->
<kill-reward>
<action>
<set var="some_variable" value="1"/>
</action>
</kill-reward>
</kill-rewards>