Wow, this works very well! Exactly what I wanted. You can see my example here:
https://diablo.run/johnnydazz/IfanBenMezd17205,
corresponding to this thread:
https://forums.d2jsp.org/topic.php?t=83135333&f=161
Instructions on setting this up are at:
https://diablo.run/setup