Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Adjusting Aura/Tint Health to use only one aura REQUEST

I'm not sure how much of an ask this is but would anyone be willing to help me adjust this amazing script to only use one aura instead of both of them so that I may use the other aura for other things?&nbsp; I love the script so much but wish I still had access to an aura for other features. Thank you in advance! /* global log state on getObj _ findObjs playerIsGM sendChat ---CLOUD9 ERROR CLEARING--- */ // By: DXWarlock //Script: Aura/Tint HealthColor //Roll20 Thread: <a href="https://app.roll20.net/forum/post/2139713/script-" rel="nofollow">https://app.roll20.net/forum/post/2139713/script-</a>... //Roll20 Contact: <a href="https://app.roll20.net/forum/post/2139713/script-" rel="nofollow">https://app.roll20.net/forum/post/2139713/script-</a>... var HealthColors = HealthColors || (function() { &nbsp; &nbsp; 'use strict'; &nbsp; &nbsp; var version = '0.9.2', &nbsp; &nbsp; &nbsp; &nbsp; lastUpdate = 1444174668, &nbsp; &nbsp; &nbsp; &nbsp; schemaVersion = '0.9.2', &nbsp; &nbsp; &nbsp; &nbsp; /* &nbsp; &nbsp; &nbsp; &nbsp; TOKEN CHANGE &nbsp; &nbsp; &nbsp; &nbsp; */ &nbsp; &nbsp; &nbsp; &nbsp; handleToken = function(obj) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var bar = state.auraBar; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var tint = state.auraTint; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var onPerc = state.auraPerc; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ColorOn = state.auraColorOn; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var dead = state.auraDead; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var markerColor = ""; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(obj.get("represents") !== "") { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(ColorOn !== true) return; //Check Toggle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Check bars &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(obj.get(bar + "_max") === "" &amp;&amp; obj.get(bar + "_value") === "") return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var maxValue = parseInt(obj.get(bar + "_max"), 10); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var curValue = parseInt(obj.get(bar + "_value"), 10); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(isNaN(maxValue) &amp;&amp; isNaN(curValue)) return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Calc percentage &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var percReal = Math.round((curValue / maxValue) * 100); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var perc = Math.round((curValue / maxValue) * 120); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Set dead &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(curValue &lt;= 0 &amp;&amp; dead === true) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj.set("status_dead", true); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(state.auraDeadFX !== "None") PlayDeath(state.auraDeadFX); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if(dead === true) obj.set("status_dead", false); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Monster or Player &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var oCharacter = getObj('character', obj.get("_represents")); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var type = (oCharacter.get("controlledby") === "" || oCharacter.get("controlledby") === "all") ? 'Monster' : 'Player'; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //SET PLAYER AURA------------ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(type == 'Player') { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(state.PCAura === false) return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(percReal &gt; onPerc) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetAuraNone(obj); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; markerColor = newColor(perc); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var cBy = oCharacter.get('controlledby'); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(tint === true) obj.set({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'tint_color': markerColor, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(cBy.split(',').length == 1) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var player = getObj('player', cBy); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var pColor = player.get('color'); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pcSet(obj, state.AuraSize, markerColor, pColor); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; npcSet(obj, state.AuraSize, markerColor); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //SET NPC AURA------------ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(type == 'Monster') { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(state.NPCAura === false) return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(percReal &gt; onPerc) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetAuraNone(obj); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; markerColor = newColor(perc); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(tint === true) obj.set({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'tint_color': markerColor, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; npcSet(obj, state.AuraSize, markerColor); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; /* &nbsp; &nbsp; &nbsp; &nbsp; CHAT MESSAGE &nbsp; &nbsp; &nbsp; &nbsp; */ &nbsp; &nbsp; &nbsp; &nbsp; handleInput = function(msg) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var msgFormula = msg.content.split(/\s+/); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var command = msgFormula[0].toUpperCase(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(msg.type == "api" &amp;&amp; command.indexOf("!AURA") !== -1) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!playerIsGM(msg.playerid)) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendChat('HealthColors', "/w " + msg.who + " you must be a GM to use this command!"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var option = msgFormula[1]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(option === undefined) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch(msgFormula[1].toUpperCase()) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "ON": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.auraColorOn = !state.auraColorOn; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "BAR": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.auraBar = "bar" + msgFormula[2]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "TINT": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.auraTint = !state.auraTint; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "PERC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.auraPerc = parseInt(msgFormula[2], 10); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "PC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.PCAura = !state.PCAura; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "NPC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.NPCAura = !state.NPCAura; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "GMNPC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.GM_NPCNames = !state.GM_NPCNames; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "GMPC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.GM_PCNames = !state.GM_PCNames; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "PCNPC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.NPCNames = !state.NPCNames; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "PCPC": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.PCNames = !state.PCNames; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "DEAD": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.auraDead = !state.auraDead; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "DEADFX": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.auraDeadFX = msgFormula[2]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "SIZE": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.AuraSize = parseFloat(msgFormula[2]); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aurahelp(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; /* &nbsp; &nbsp; &nbsp; &nbsp; MY FUNCTIONS &nbsp; &nbsp; &nbsp; &nbsp; */ &nbsp; &nbsp; &nbsp; &nbsp; PlayDeath = function(trackname) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var track = findObjs({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type: 'jukeboxtrack', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title: trackname &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })[0]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(track) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; track.set('playing', false); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; track.set('softstop', false); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; track.set('volume', 100); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; track.set('playing', true); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log("No track found"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; pcSet = function(obj, sizeSet, markerColor, pColor) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj.set({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'aura1_radius': sizeSet, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'aura1_color': markerColor, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showplayers_aura1': true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showname': state.GM_PCNames, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showplayers_name': state.PCNames &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; npcSet = function(obj, sizeSet, markerColor) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj.set({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'aura1_radius': sizeSet, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'aura1_color': markerColor, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showplayers_aura1': true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showplayers_aura2': true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showname': state.GM_NPCNames, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'showplayers_name': state.NPCNames &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; aurahelp = function() { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var img = "<a href="http://worldcitizenfinancial.com/wp-content/uploads/2014/07/Light-Blue-Gradient-Texture-11-1024x576.jpg" rel="nofollow">http://worldcitizenfinancial.com/wp-content/uploads/2014/07/Light-Blue-Gradient-Texture-11-1024x576.jpg</a>"; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var tshadow = "-1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000 , 2px 2px #222;"; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var style = 'style="text-align:center; width: 35px; border: 1px solid black; margin: 1px; background-color: #6FAEC7;border-radius: 4px;&nbsp; box-shadow: 1px 1px 1px #707070;'; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var off = "#A84D4D"; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var FX = state.auraDeadFX.substring(0, 4); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendChat('HealthColors', "/w GM &lt;b&gt;&lt;br&gt;" + '&lt;div style="border-radius: 8px 8px 8px 8px; padding: 5px; text-shadow: ' + tshadow + '; box-shadow: 3px 3px 1px #707070; background-image: url(' + img + '); color:#FFF; border:2px solid black; text-align:right; vertical-align:middle;"&gt;' + '&lt;u&gt;Version: ' + state.HealthColors.version + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;/u&gt;&lt;br&gt;Is On: &lt;a ' + style + 'background-color:' + (state.auraColorOn !== true ? off : "") + ';" href="!aura on"&gt;' + (state.auraColorOn !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Bar: &lt;a ' + style + '" href="!aura bar ?{BarNumber?|1}"&gt;' + state.auraBar + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Use Tint: &lt;a ' + style + 'background-color:' + (state.auraTint !== true ? off : "") + ';" href="!aura tint"&gt;' + (state.auraTint !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Percentage: &lt;a ' + style + '" href="!aura perc ?{Percent?|100}"&gt;' + state.auraPerc + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Show on PC: &lt;a ' + style + 'background-color:' + (state.PCAura !== true ? off : "") + ';" href="!aura pc"&gt;' + (state.PCAura !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Show on NPC: &lt;a ' + style + 'background-color:' + (state.NPCAura !== true ? off : "") + ';" href="!aura npc"&gt;' + (state.NPCAura !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Show Dead: &lt;a ' + style + 'background-color:' + (state.auraDead !== true ? off : "") + ';" href="!aura dead"&gt;' + (state.auraDead !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'DeathFX: &lt;a ' + style + '" href="!aura deadfx ?{Sound Name?|None}"&gt;' + FX + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;hr&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'GM Sees NPC Names: &lt;a ' + style + 'background-color:' + (state.GM_NPCNames !== true ? off : "") + ';" href="!aura gmnpc"&gt;' + (state.GM_NPCNames !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'GM Sees PC Names: &lt;a ' + style + 'background-color:' + (state.GM_PCNames !== true ? off : "") + ';" href="!aura gmpc"&gt;' + (state.GM_PCNames !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;hr&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'PC Sees NPC Names: &lt;a ' + style + 'background-color:' + (state.NPCNames !== true ? off : "") + ';" href="!aura pcnpc"&gt;' + (state.NPCNames !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'PC Sees PC Names: &lt;a ' + style + 'background-color:' + (state.PCNames !== true ? off : "") + ';" href="!aura pcpc"&gt;' + (state.PCNames !== true ? "No" : "Yes") + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;hr&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Aura Size: &lt;a ' + style + '" href="!aura size ?{Size?|0.7}"&gt;' + state.AuraSize + '&lt;/a&gt;&lt;br&gt;' + //-- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;/div&gt;'); &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; SetAuraNone = function(obj) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var tint = state.auraTint; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(tint === true) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj.set({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'tint_color': "transparent", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj.set({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'aura1_color': "", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; newColor = function(ratio) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var color = hsl2rgb(ratio, 100, 50); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var hex = rgbToHex(color.r, color.g, color.b); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return(hex); &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; rgbToHex = function(r, g, b) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return "#" + ((1 &lt;&lt; 24) + (r &lt;&lt; 16) + (g &lt;&lt; 8) + b).toString(16).slice(1); &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; hsl2rgb = function(h, s, l) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var r, g, b, m, c, x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!isFinite(h)) h = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!isFinite(s)) s = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!isFinite(l)) l = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; h /= 60; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(h &lt; 0) h = 6 - (-h % 6); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; h %= 6; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = Math.max(0, Math.min(1, s / 100)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; l = Math.max(0, Math.min(1, l / 100)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c = (1 - Math.abs((2 * l) - 1)) * s; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x = c * (1 - Math.abs((h % 2) - 1)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(h &lt; 1) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = c; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if(h &lt; 2) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = c; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if(h &lt; 3) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = c; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if(h &lt; 4) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = c; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if(h &lt; 5) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = c; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = c; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = x; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m = l - c / 2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = Math.round((r + m) * 255); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g = Math.round((g + m) * 255); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b = Math.round((b + m) * 255); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r: r, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g: g, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b: b &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; checkInstall = function() { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log('&lt;HealthColors v' + version + ' Ready&gt; [' + (new Date(lastUpdate * 1000)) + ']'); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!_.has(state, 'HealthColors') || state.HealthColors.version !== schemaVersion) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log('&nbsp; &gt; Updating Schema to v' + schemaVersion + ' &lt;'); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.HealthColors = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version: schemaVersion &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.auraColorOn) state.auraColorOn = true; //global on or off &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.auraBar) state.auraBar = "bar1"; //bar to use &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.PCAura) state.PCAura = true; //show players Health? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.NPCAura) state.NPCAura = true; //show NPC Health? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.auraTint) state.auraTint = false; //use tint instead? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.auraPerc) state.auraPerc = 100; //precent to start showing &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.auraDead) state.auraDead = true; //show dead X status &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.auraDeadFX) state.auraDeadFX = 'None'; //Sound FX Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.GM_NPCNames) state.GM_NPCNames = true; //show GM NPC names? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.NPCNames) state.NPCNames = true; //show players NPC Names? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.GM_PCNames) state.GM_PCNames = true; //show GM PC names? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.PCNames) state.PCNames = true; //show players PC Names? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!state.AuraSize) state.AuraSize = 0.7; //set aura size? &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; registerEventHandlers = function() { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; on('chat:message', handleInput); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; on("change:token", handleToken); &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; /*------------- &nbsp; &nbsp; &nbsp; &nbsp; RETURN OUTSIDE FUNCTIONS &nbsp; &nbsp; &nbsp; &nbsp; -----------*/ &nbsp; &nbsp; return { &nbsp; &nbsp; &nbsp; &nbsp; CheckInstall: checkInstall, &nbsp; &nbsp; &nbsp; &nbsp; RegisterEventHandlers: registerEventHandlers, &nbsp; &nbsp; &nbsp; &nbsp; AdjustToken: handleToken &nbsp; &nbsp; }; }()); //On Ready on('ready', function() { &nbsp; &nbsp; 'use strict'; &nbsp; &nbsp; HealthColors.CheckInstall(); &nbsp; &nbsp; HealthColors.RegisterEventHandlers(); }); // VERSION INFO &nbsp; &nbsp; var AlterBars_Version = 1.1; // FUNCTION DECLARATION &nbsp; &nbsp; var AlterScript = AlterScript || {}; on("chat:message", function (msg) { &nbsp; &nbsp; // Exit if not an api command... &nbsp; &nbsp; if (msg.type != "api") return; &nbsp; &nbsp;&nbsp; // Get the api command... var command = msg.content.split(" ", 1)[0]; if (command === "!alter") AlterScript.Process(msg); }); AlterScript.Process = function(msg, who) { // USER CONFIG // BAR CONFIGURATION - These are used to identify which bar to adjust. You can // also use any lowercase letters as well such as 'h' for hit points/health. var Bar1Key = "1"; var Bar2Key = "2"; var Bar3Key = "3"; // BAR NAMES - These names are used if ANNOUNCE_CHANGE is set to true. The // format of the annoucement is: Name gained/lost # BarName. var BarNames = ["hit points", "hit points", "hit points"]; // PREVENT OVERMAX - Set this variable to true to prevent the current value of // the bar from being greater than its max value. If there is no max value set, // it will not stop the current bar value from increasing. var PREVENT_OVERMAX = true; // ANNOUNCE CHANGE IN CHAT - Set to true to send a message to the chat window // showing which token gained or lost points and how much. var ANNOUNCE_CHANGE = true; // SEND TO GM - Set to true to send the results to the GM. This will also trigger // if a hidden change is sent. var ALERT_GM = false; // STOP AT ZERO - Prevents the current value of the bar from dropping below zero. var STOP_AT_ZERO = true; // END USER CONFIG // Get and/or create variables... var n = msg.content.split(" "); var who = msg.who; var Target = getObj("graphic", n[1]); var Bar = 0; Bar = (n[2].toLowerCase().toString() == Bar1Key) ? 1 : 0; Bar = (n[2].toLowerCase().toString() == Bar2Key) ? 2 : Bar; Bar = (n[2].toLowerCase().toString() == Bar3Key) ? 3 : Bar; if (Bar === 0) { sendChat("ERROR", "/w " + who.replace(" (GM)", "") + " That is not a valid bar."); return; } var AlterValue = n[3]; var CurrentValue = parseInt(Target.get("bar" + Bar + "_value")); var MaxValue = parseInt(Target.get("bar" + Bar + "_max")); var NoAnnounce = n[4]; // Check for a + or - sign... var Operand1 = AlterValue.charAt(0); var Operand2 = AlterValue.charAt(1); if (Operand2 === "+" || Operand2 === "-") AlterValue = AlterValue.substring(2); else if (Operand1 === "+" || Operand1 === "-") AlterValue = AlterValue.substring(1); // Save the value for the tooltip... var Expression = AlterValue; // Define CSS... var AddStyle = "display: inline-block; text-align: center; min-width: 1.75em; font-size: 1em; font-weight: bold; color:#040; background-color: #8C8; border: 1px solid #040; padding: -1px 2px; border-radius: 3px;"; var MinusStyle = "display: inline-block; text-align: center; min-width: 1.75em; font-size: 1em; font-weight: bold; color:#600; background-color: #FAA; border: 1px solid #600; padding: -1px 2px; border-radius: 3px;"; // Main process... sendChat("", "/r " + AlterValue, function(outs) { AlterValue = parseInt(JSON.parse(outs[0].content).total); var Tooltip = "Rolling " + Expression + " = " + AlterValue + "' class='a inlinerollresult showtip tipsy-n'"; if (Operand1 != "-") { // Add to bar... if (PREVENT_OVERMAX) AlterValue = (AlterValue + CurrentValue &gt; MaxValue) ? MaxValue - CurrentValue : AlterValue; if (ANNOUNCE_CHANGE &amp;&amp; NoAnnounce == undefined) sendChat("DiceBot", Target.get("name") + " gained &lt;span title='" + Tooltip + "' style='" + AddStyle + "'&gt;" + AlterValue + "&lt;/span&gt; " + BarNames[Bar-1] + "."); if (ALERT_GM || NoAnnounce != undefined) sendChat(who, "/w GM " + Target.get("name") + " gained &lt;span title='" + Tooltip + "' style='" + AddStyle + "'&gt;" + AlterValue + "&lt;/span&gt; " + BarNames[Bar-1] + "."); Target.set("bar" + Bar + "_value", CurrentValue += AlterValue); } else { // Subtract from bar... if (STOP_AT_ZERO &amp;&amp; (CurrentValue - AlterValue &lt; 0)) AlterValue = CurrentValue; if (ANNOUNCE_CHANGE &amp;&amp; NoAnnounce == undefined) sendChat("DiceBot", Target.get("name") + " lost &lt;span title='" + Tooltip + "' style='" + MinusStyle + "'&gt;" + AlterValue + "&lt;/span&gt; " + BarNames[Bar-1] + "."); if (ALERT_GM || NoAnnounce != undefined) sendChat(who, "/w GM " + Target.get("name") + " lost &lt;span title='" + Tooltip + "' style='" + MinusStyle + "'&gt;" + AlterValue + "&lt;/span&gt; " + BarNames[Bar-1] + "."); Target.set("bar" + Bar + "_value", CurrentValue -= AlterValue); } &nbsp; &nbsp; &nbsp; &nbsp; if('undefined' !== typeof HealthColors &amp;&amp; HealthColors.AdjustToken){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HealthColors.AdjustToken(Target); &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;&nbsp; });
<a href="https://app.roll20.net/forum/post/7351438/script-aura-slash-tint-healthcolor-freeing-up-aura-2" rel="nofollow">https://app.roll20.net/forum/post/7351438/script-aura-slash-tint-healthcolor-freeing-up-aura-2</a>
Thank you Jarren!
1718236795
David M.
Pro
API Scripter
I'll put this here in case you are a user of Scriptcards or SmartAoE:&nbsp; this version frees up aura2 and also will register token bar changes made by either of those scripts without having to manually trigger a change:graphic event.