Hello I found this API ( <a href="https://gist.github.com/stephenhudson/8392771" rel="nofollow">https://gist.github.com/stephenhudson/8392771</a> ) that is suppose to let you use second wind or heal another target in 4e through chat. However, when I try to use it, it crashes. Hoping someone can take a look at it and figure out if its a valid API script or if something is wrong. I'm excited to possibly getting it to work, but I don't know if its me or the script thats messing up. Script Below: on("chat:message", function(msg) { if(msg.type == "api" && msg.content.toLowerCase().indexOf('!heal') !== -1) { var slice = msg.content.split(" "); //Splits the message input based off spaces. slice[0] is !Attack. var healtarget = slice[1]; var healsource = slice[2]; var curPageID = findObjs({_type: "campaign"})[0].get("playerpageid"); var toke = findObjs({_type: "character", name: healtarget})[0]; var token = findObjs({_type: "graphic", _subtype: "token", _pageid: curPageID, name: healtarget}, {caseInsensitive: true})[0]; var surgevalue = findObjs({ _type: 'attribute', name: 'surgevalue', _characterid: toke.id })[0]; var currenthpvalue = findObjs({ _type: 'attribute', name: 'HP', _characterid: toke.id })[0]; var currenthp = parseInt(currenthpvalue.get("current")); var surgevalue = parseInt(surgevalue.get("current")); var healvalue = 0 if(healsource.indexOf('Valiant') >= 0) { healvalue = randomInteger(6) + surgevalue + 4; } if(healsource.indexOf('secondwind') >= 0) { healvalue = surgevalue; } var totalheal = parseInt(currenthp) + parseInt(healvalue); var surges = findObjs({ _type: 'attribute', name: 'surges', _characterid: toke.id })[0]; if(parseInt(surges.get("current"))>0){ currenthpvalue.set("current", totalheal); surges.set("current", parseInt(surges.get("current")) - 1); if(parseInt(currenthpvalue.get("current"))>parseInt(currenthpvalue.get("max"))){ currenthpvalue.set("current", currenthpvalue.get("max")); }; if(healsource.indexOf('Valiant') >= 0) { currentMsg = "/em is healed by Captain Valiant Wallamin for " + healvalue + " current hp is back up to " + currenthpvalue.get("current") + " and his surges are down to " + surges.get("current"); } if(healsource.indexOf('secondwind') >= 0) { currentMsg = "/em uses their second wind for " + healvalue + " current hp is back up to " + currenthpvalue.get("current") + " and surges are down to " + surges.get("current"); token.set('status_bolt-shield'); } } else { currentMsg = "is out of surges!"; }; sendChat(healtarget, currentMsg); }; });