!attack Chimera Bite 7 3d6+4 piercing ?{Advantage|No} ?{Disadvantage|No} !attack Chimera Gore 7 1d12+4 piercing ?{Advantage|No} ?{Disadvantage|No} !attack Chimera Rake 7 2d6+4 slashing ?{Advantage|No} ?{Disadvantage|No} if (msg.type == "api" && command == "!attack") { msg.content = msg.content.replace("!attack ", ""); msg.content = msg.content.trim(); if (n.length < 5) { sendChat("ERROR", "/w " + msg.who + " You must include the name of the attacker, the attack name, the attack bonus, the damage roll, and the damage type."); return; } // Define variables var Attacker = n[1]; var AttackName = n[2] var AttackBonus = n[3]; var DamageRoll = n[4]; var DamageType = n[5]; var Advantage = n[6].toLowerCase(); var Disadvantage = n[7].toLowerCase(); if (Advantage == "yes") { var AttackRoll = "{2d20KH1}"; } else if ( Disadvantage == "yes") { var AttackRoll = "{2d20KL1}"; } else { var AttackRoll = "1d20"; } sendChat("", "/emas " + Attacker + " makes an attack!"); sendChat("", "<b>Attack:</b> " + AttackName); sendChat("", "[[" + AttackRoll + "+" + AttackBonus + "]] to hit"); sendChat("", "[[" + DamageRoll + "]] " + DamageType + " damage"); }