You dont use CSS with sendChat - you have to use inline styles the way you have been doing. You shouldnt need the /direct statement at the start. In order to get the specific damage type for printout, you'll need to edit the way the script deals with inputs. At the moment the script accepts chat commands like !cr or !cr 87 You need to modify the code to accept another parameter, so you can do something like (not necessarily exactly this): !cr magique !cr 87 magique !cr magique 87 Then when you have that keyword, you need to modify the printout part (which is why I was looking at that section), so you replace the middle section '<b>Perforant: </b>' + smash . perforant + '<div style="padding-top:1rem;"></div>' +
'<b>Tranchant: </b>' + smash . tranchant + '<div style="padding-top:1rem;"></div>' +
'<b>Magique: </b>' + smash . magique + with an if statement that checks if a single damage type is declared, and if so, prints out just one of those. If not, it prints out all three in the standard way. It's not too hard to do those - I'll post the simplest code tweaks to achieve this as soon as I get time (probably wont be today).