Twentysix26 / x26-Cogs

General purpose cogs for Red V3
GNU General Public License v3.0
41 stars 30 forks source link

[Feature request] Defender/Warden - The Ability to use compare condition with (custom)heat points. #47

Closed Skyridr closed 2 years ago

Skyridr commented 2 years ago

Cog

Describe the feature you'd like to see The ability to use (custom)heatpoints with the compare condition as per example below.


name: test
rank: 2
event: [on-message, on-message-edit]
priority: 1
if:
  - if-any:
    - message-matches-any: ["hello*"]
  - if-not:
    - category-matches-any: [123456789]
do:
  - add-custom-heatpoints: ["$test-$user_id", 50, 24h]
  - compare: [$test-$user_id, ">=", 100]
  - if-true:
      - send-message: [$channel_id, "hello $user_mention, your heatpoints is equally to 100 or above."]
  - if-false:
     - send-message: [$channel_id, "hello $user_mention, your heatpoints is below 100."]```
Twentysix26 commented 2 years ago

You can now do this in v1.12