So I'm in a game with a custom system and I have no idea how to make a macro/API script for attack rolls In this system when you roll maximum on a dice you double the lowest dice roll (Excluding 1 or another max roll), you can double a roll twice and if you roll a 1 you remove the lowest non-1 roll. The system only uses d6,d8,d10,d12 so if I roll 3d8 and get 2,3,8. it would be 15 instead of 13 or if I roll 1,3,7 it would be 8 total. if you roll both a 1 and 8 they cancel each other. so 1,4,8, it would still be only 13. another criteria is that 8 and 1 only affect each other when there is no other option so for example 2,8,8. 2 would be doubled then since 2 is already doubled then the 8 would be doubled. Same with 1 where if 1,1,3 is rolled the 3 is removed and since its only two 1s left then the roll total is 1.