dm94 / DmPlugin

DmPlugin Plugin for DarkBot
MIT License
40 stars 25 forks source link

Custom Event Condition trigger by target #202

Open Andrzejone opened 1 week ago

Andrzejone commented 1 week ago

Is there an existing issue for this?

Are you running the latest bot and plugin version?

Can anyone else reproduce the issue?

Describe the bug

CustomEvents module, condition string is not triggered as it should. equal(name(target()), string(\ Mindfire Behemoth //)) - should trigger (Ship Ability) if Target is only this NPC. But it spam Ability non stop. even all(has-relation(npc, target()), equal(name(target()), string(\\ Mindfire Behemoth //))) isn't changing it behaviour.

Ability is Citadel Plus Travel

Expected Behavior

It should trigger ability when condition is meet.

Steps To Reproduce

Set custom event in module. Start the bot Watch as it spam

Screenshots, Video, or other media

image

Bot Version

1.131.2

Plugin version

2.3.5

Anything else?

No response

dm94 commented 1 day ago

As these functions are very generic the behaviour bot detects that this ability is available and every time it checks it and the condition is valid it uses it. You can avoid the problem by setting a more concrete and limited condition.