This script should do what you need (the distance value can be found in the variable dist) : I've got no time to show a cleaner code, but it should do the job. call it with this macro : !range @{selected|token_id} @{target|token_id} Script : var RangeScript = RangeScript || {}; var OriginName; var DestName; var origintoken; var desttoken; on("chat:message", function (msg) { // Exit if not an api command if (msg.type != "api") return; // Get the API Chat Command msg.who = msg.who.replace(" (GM)", ""); msg.content = msg.content.replace("(GM) ", ""); var command = msg.content.split(" ", 1); if(command == "!range") { RangeScript.Process(msg); } }); RangeScript.Process = function(msg){ var Tag = msg.content.split(" "); OriginName = Tag[1]; DestName = Tag[2]; Range(OriginName,DestName,msg); }; function Range(OriginName, DestName, msg) { origintoken = findObjs({_type: "graphic", id: OriginName})[0]; //We know there is a token in the Campaign called "Guard A". desttoken = findObjs({_type: "graphic", id: DestName})[0]; //We know there is a token in the Campaign called "Guard A". var originleft=origintoken.get("left"); //left var origintop = origintoken.get("top"); //top var destleft=desttoken.get("left"); //left var desttop = desttoken.get("top"); //top var left = originleft - destleft; var top = origintop - desttop ; var dist = Math.sqrt((left*left)+(top*top)); dist = Math.floor(dist/70); }; Hope this helps: