It would kind of depend what you intended to then do with it. Here's a simple example that just does the lookup: on('ready',function(){
"use strict";
var lookup = [
[4,4,5,6,6,6,6,6,6,6],
[3,4,4,4,5,5,6,6,6,6],
[2,3,4,4,4,4,5,5,5,6],
[2,3,3,4,4,4,4,5,5,5],
[2,3,3,3,4,4,4,4,4,4],
[2,3,3,3,3,4,4,4,4,4],
[2,3,3,3,3,3,4,4,4,4],
[2,2,3,3,3,3,3,4,4,4],
[2,2,2,3,3,3,3,3,4,4],
[2,2,2,2,3,3,3,3,3,4]
] ;
on('chat:message',function(msg){
var args,cmds;
if('api' === msg.type && msg.content.match(/^!lookup\b/) && playerIsGM(msg.playerid) ){
args=msg.content.split(/\s+/);
if(args.length<3){
sendChat('','Lookup requires 2 parameters<br><code>!lookup @{attacker skill} @{defender skill}');
} else {
let attackerSkill = Math.min(10,Math.max(1,parseInt(args[1],10)||0)),
defenderSkill = Math.min(10,Math.max(1,parseInt(args[2],10)||0)),
minToSucceed = lookup[defenderSkill-1][attackerSkill-1];
sendChat('',`Attacker: <b>${attackerSkill}</b><br>Defender: <b>${defenderSkill}</b><br>Minimum to hit: <b>${minToSucceed}</b>`);
}
}
});
});