What I am trying to do is pass an attribute and the results of a dice roll to the API script. This will allow a player to roll a 3D dice non-automatically (which my players love to do because it simulates throwing real dice on a table) and pass the resulting total to the API along with an attribute, then the API can use both numbers. Example chat command: !myscript @strMod /roll 1d20+5 Example script: on("chat:message", function(msg) { if(msg.type == "api" && msg.content.indexOf("!myscript") !== -1) { var slice = msg.content.split(" "); var strmod = parseInt(slice[1]); var rollresult = parseInt(slice[2]); The script is working fine but I do not know how to accomplish the chat command (to result in submitting "!myscript 4 19" or whatever, which works perfectly when i type it in manually) Thanks for any help received.