Selective Mute Script

For feedback on the game code and design. Feedback on server rules and playstyle belong in Policy Discussion.
Post Reply
User avatar
Reimoo
Joined: Wed Apr 23, 2014 2:58 pm
Byond Username: Reimoo

Selective Mute Script

Post by Reimoo » #24704

I'm not sure if this subforum is the correct place to post this, so move it as needed.

Anyway, I can't seem to make the selective mute script as listed on the wiki work as an AI.

I make sure the script is on the common channel, I do everything the script says, input my name in YOUR NAME HERE, yadda yadda yadda

Then when I say the command over 145.9 out loud and "/mute JOHN DOE" shows in the log, I look completely retarded and any chance of concealing the fact that I am rogue is lost.

Am I just being retarded or what?

Code: Select all

//recursive implode function, takes a vector and
//combines each member into a string with a space to separate
//by perogi
def implode($vector)
{
   $str = at($vector, 1);
   remove($vector, $str);
   if(length($vector) > 0) 
   {
      $str += " ";
      $str += implode($vector);
   }
   return $str;
}
//mute and unmute function
//use: type /mute or /unmute then the name of the person exactly as it is spelled
//by perogi

$exp = explode($content, " ");

if($source == "YOUR NAME HERE") //only the name in this line can use script
{

   if(at($exp, 1) == "/mute")
   {
      remove($exp, "/mute");
      $name = implode($exp);
      $pass = 0;
      mem($name,$name);
   }
   
   if(at($exp,1) == "/unmute")
   {
      $pass = 0;
      remove($exp, "/unmute");
      $muteremove = implode($exp);
      mem($muteremove, 0);
   }
}
//checks if source is muted
//possible to get around mute by taking off ID and being unknown, hence why unknowns are all blocked
if($source == mem($source) || $source == "Unknown")
{
   $pass = 0;
}
User avatar
Remie Richards
Joined: Thu Apr 17, 2014 7:11 pm
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Selective Mute Script

Post by Remie Richards » #24707

Were there any scripts that modified the Source? such as the job indicators, if so it means the script didn't know it was actually you because "NotRogue" and "NotRogue (AI)" are not the same source.
If I remember my NTSL correctly.
私は完璧
User avatar
Reimoo
Joined: Wed Apr 23, 2014 2:58 pm
Byond Username: Reimoo

Re: Selective Mute Script

Post by Reimoo » #24708

Oh damn. That's probably it then. I usually use the job indicator script as well.
User avatar
Remie Richards
Joined: Thu Apr 17, 2014 7:11 pm
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Selective Mute Script

Post by Remie Richards » #24709

Reimoo wrote:Oh damn. That's probably it then. I usually use the job indicator script as well.
Don't feel too bad, I do it all the time!
私は完璧
Gun Hog
Joined: Sat Apr 19, 2014 5:19 am
Byond Username: Gun Hog

Re: Selective Mute Script

Post by Gun Hog » #24796

DO NOT USE A SCRIPT COMMAND WHILE YOU ARE ON THE COMMON CHANNEL AS AI. $pass = 0; only works on headsets, not intercoms or station bounced radios. You need a more advanced script, such as one that nulls the frequency, to do that. Instead, transmit your commands on another channel managed by tcoms so no one else can intercept it. Keep in mind that this script is easily defeated by your target speaking through an intercom or station bounced radio.
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: Selective Mute Script

Post by Miauw » #24800

all your scripts may be prone to breaking with the new saycode, keep that in mind.
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
Gun Hog
Joined: Sat Apr 19, 2014 5:19 am
Byond Username: Gun Hog

Re: Selective Mute Script

Post by Gun Hog » #24950

Miauw wrote:all your scripts may be prone to breaking with the new saycode, keep that in mind.
God dang it, Meow.
Post Reply

Who is online

Users browsing this forum: No registered users