I try to make a macro that can switch itself when changing the slot. i found something familliar with feral but it work only with normal talent and not with honor talent
But for my hunter i seek a macro that switch for example between spider sting and hi-explosive trap.
I found in the web in wowhead macro for honor talent in Legion but since the change in BFA i couldn’t find a example.
The [talent:2/2] expression in the example you provide, is what’s called a “macro conditional”.
There are many different macro conditionals (mostly unrelated to your specific goal), and most of them have been in the game for a long time.
Full list (unknown if up-to-date): https://wow.gamepedia.com/Macro_conditionals
The problem is, when Blizzard introduced pvp talents and eventually added a [pvptalent] conditional to the game, they (as far as i know) didn’t update it to keep up with the changes they made to the honortalent/pvptalent system over the last couple expansions. Eventually (i think around BfA-launch) they just ditched the conditional altogether.
I can’t think of any reason that they would have actively decided against having such a conditional, it’s (in my opinion) most likely it just slipped through the cracks and they forgot about it, or postponed it until later™.
You can try something clunky like this as work-around:
#showtooltip
/cast Hi-Explosive Trap
/cast Spider Sting
/run local G=GetSpellInfo SetMacroSpell(GetRunningMacro(), G"Hi-Explosive Trap" or G"Spider Sting")