Skip to content

Commit

Permalink
Mute errors in chat
Browse files Browse the repository at this point in the history
Produces many errors for tokens that don't represent any character
  • Loading branch information
nesuprachy committed Sep 2, 2024
1 parent 856063b commit 0cbcfab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions DrD2StatusMarkers/DrD2StatusMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,31 @@ var DrD2StatusMarkers = DrD2StatusMarkers || (function() {
//log(`${marker}, ${color}, ${level}`);
switch (color) {
case 'RED':
sendChat('API', `!setattr --charid ${charId} --body_scarred|${level} --silent --nocreate`, null, {noarchive:true} );
sendChat('API', `!setattr --charid ${charId} --body_scarred|${level} --mute --nocreate`, null, {noarchive:true} );
break;
case 'BLU':
sendChat('API', `!setattr --charid ${charId} --spirit_scarred|${level} --silent --nocreate`, null, {noarchive:true} );
sendChat('API', `!setattr --charid ${charId} --spirit_scarred|${level} --mute --nocreate`, null, {noarchive:true} );
break;
case 'GRN':
sendChat('API', `!setattr --charid ${charId} --influence_scarred|${level} --silent --nocreate`, null, {noarchive:true} );
sendChat('API', `!setattr --charid ${charId} --influence_scarred|${level} --mute --nocreate`, null, {noarchive:true} );
break;
case 'VIO':
sendChat('API', `!setattr --charid ${charId} --danger|${level} --silent --nocreate`, null, {noarchive:true} );
sendChat('API', `!setattr --charid ${charId} --danger|${level} --mute --nocreate`, null, {noarchive:true} );
break;
case 'BLK':
sendChat('API', `!setattr --charid ${charId} --advantages|${level} --silent --nocreate`, null, {noarchive:true} );
sendChat('API', `!setattr --charid ${charId} --advantages|${level} --mute --nocreate`, null, {noarchive:true} );
break;
default:
break;
}
if(!(newVals.length)) {
sendChat('API', `!setattr --charid ${charId} --body_scarred|0 --spirit_scarred|0 --influence_scarred|0 --danger|0 --advantages|0 --silent --nocreate`, null, {noarchive:true} );
sendChat('API', `!setattr --charid ${charId} --body_scarred|0 --spirit_scarred|0 --influence_scarred|0 --danger|0 --advantages|0 --mute --nocreate`, null, {noarchive:true} );
}else {
if(!(newVals.some(str => str.includes('RED')))) {sendChat('API', `!setattr --charid ${charId} --body_scarred|0 --silent --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('BLU')))) {sendChat('API', `!setattr --charid ${charId} --spirit_scarred|0 --silent --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('GRN')))) {sendChat('API', `!setattr --charid ${charId} --influence_scarred|0 --silent --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('VIO')))) {sendChat('API', `!setattr --charid ${charId} --danger|0 --silent --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('BLK')))) {sendChat('API', `!setattr --charid ${charId} --advantages|0 --silent --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('RED')))) {sendChat('API', `!setattr --charid ${charId} --body_scarred|0 --mute --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('BLU')))) {sendChat('API', `!setattr --charid ${charId} --spirit_scarred|0 --mute --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('GRN')))) {sendChat('API', `!setattr --charid ${charId} --influence_scarred|0 --mute --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('VIO')))) {sendChat('API', `!setattr --charid ${charId} --danger|0 --mute --nocreate`, null, {noarchive:true} );}
if(!(newVals.some(str => str.includes('BLK')))) {sendChat('API', `!setattr --charid ${charId} --advantages|0 --mute --nocreate`, null, {noarchive:true} );}
}
}
},
Expand Down

0 comments on commit 0cbcfab

Please sign in to comment.