RestedXP / RXPGuides

RXPGuides is a platform to write in-game leveling guides for WoW Classic
https://www.restedxp.com/
Other
111 stars 55 forks source link

Remove from target macro when mobs have been killed? #243

Closed nzifnab closed 3 months ago

nzifnab commented 3 months ago

Is it possible to make it so that when you have a kill quantity, and a .mob macro in the script, that the targets are removed from the macro when the kills/looting has been satisfied?

For instance, here:

.complete 170,1 --Kill Rockjaw Trogg (x6)
.complete 170,2 --Kill Burly Rockjaw Trogg (x6)
.mob Rockjaw Trogg
.mob Burly Rockjaw Trogg

If you have killed all 6 Burly Rockjaw Troggs, that target should be eliminated from the Active Targets list... Perhaps it would require a new syntax, like:

step
    #label RockjawToes
    #completewith next
    >>Collect |cRXP_LOOT_[Rockjaw Toes]|r
    .collect 4444,5 -- A made up id, but pretend those are 5x rockjaw toes.
step
    >>Kill |cRXP_ENEMY_Rockjaw Troggs|r and |cRXP_ENEMY_Burly Rockjaw Troggs|r
    .complete 170,1 
    .complete 170,2
    .mob Rockjaw Trogg << clearWith self,1 RockjawToes,1  -- Only clears if both obj 1 from this step AND obj 1 from toes step is complete
    .mob Burly Rockjaw Trogg << clearWith self,2 RockjawToes,1 -- Only clears if both obj 2 from this step AND obj 1 from toes step is complete

This syntax (or something like it) allows you to trigger the clearing of the mob/active target with the completion of objectives from this or other steps (format of: label,objectiveIndex, where self is obviously the current step).

Zarant commented 3 months ago

It is possible to have that yes, if you use the + character in front of the mob name for instance:

.complete 170,1 --Kill Rockjaw Trogg (x6)
.mob +Rockjaw Trogg
.complete 170,2 --Kill Burly Rockjaw Trogg (x6)
.mob +Burly Rockjaw Trogg

If you use that syntax the mobs will get removed from the target list, as long as the .mob command comes immediately after the objective you want to latch it to.