axc450 / pbs

Battle Pet Combat Scripting
MIT License
24 stars 11 forks source link

Only the first line of instructions will be executed. #89

Closed logantsai closed 6 months ago

logantsai commented 6 months ago

Rematch: Rematch_5_1_4.zip Pet Battle Scripts: PetBattleScripts-v1.10.1.zip

When I click the test button multiple times, only the first line of instructions is executed.

Note: I only enable Rematch and Pet Battle Scripts addon, but the problem is the same. I copy some sample script from https://www.wow-petguide.com/ to double check. The problem is the same. How should I debug this?

Thanks

bloerwald commented 6 months ago

Scripts run from top to bottom every time you press the button. The first action that can be executed based on conditions and cooldowns will win and end the script. I would assume your first line can be executed unconditionally, so it is executed unconditionally.

Care to post the script you're using?

logantsai commented 6 months ago

螢幕擷取畫面 2024-04-07 082614 I use this two skill and only top one will be executed. No idea why the next one didn't be effective

bloerwald commented 6 months ago

Ability 1370 has no cooldown and you didn't give it a condition, so it will be always executed, as said.

I assume your script is supposed to keep 919 debuff active and otherwise spam 1370. To do that,

use(claw:919) [ !enemy.aura(claw debuff:918).exists ]
use(filler:1370)

or if you want to have the filler in the first and only first round as well,

use(filler:1370) [ round = 1 ]
use(claw:919) [ !enemy.aura(claw debuff:918).exists ]
use(filler:1370)
logantsai commented 6 months ago

Thank you for patiently explaining, I understand now, I have no more questions. I really appreciate your help.