-
Notifications
You must be signed in to change notification settings - Fork 0
Game based death counter
Pascal Pohl edited this page Jul 22, 2019
·
1 revision
This set of commands allows you to have death counters based on the game you're playing, instead of a global one.
This command will only display the current death counter, so that "normal" users can request the current death counter without raising it.
{% if /game != "" %}
/me
{% if $deathcounter[/game] > 0 %}
died
{% if $deathcounter[/game] = 1 %}
just once
{% else %}
{% print $deathcounter[/game] %} times
{% endif %}
{% else %}
never died so far
{% endif %}
in {% print /game %}. riPepperonis
{% else %}
/me did not select a game yet.
{% endif %}
This command raises the death counter by one and triggers the output command after that.
{% if /game != "" %}
{% add 1 > $deathcounter[/game] %}
{% endif %}
!rip
This command is for resetting the death counter to zero or setting the counter to a specific number, depending on how the command is executed.
!rip=
will simply reset the counter to zero.
!rip= 5
will set the counter to 5.
{% if /game != "" %}
{% if %1 != "" %}
{% set %1 > $deathcounter[/game] %}
{% else %}
{% set 0 > $deathcounter[/game] %}
{% endif %}
{% endif %}
!rip