NTSL Scripts: Difference between revisions
Jump to navigation
Jump to search
m
Removed broken Selective Mute, renamed working Cleaner Selective Mute -> Selective Mute. Less Annoying Job Indicator works again. Thanks to Gun Hog for fixing the codes!
imported>Kosmos m (→Useful Malicious Scripts: Added Monty Python singing script.) |
imported>Kosmos m (Removed broken Selective Mute, renamed working Cleaner Selective Mute -> Selective Mute. Less Annoying Job Indicator works again. Thanks to Gun Hog for fixing the codes!) |
||
Line 31: | Line 31: | ||
Only shows abbreviations of job titles instead of full titles. | Only shows abbreviations of job titles instead of full titles. | ||
<pre> | <pre>def Initialize() { | ||
def Initialize() { | |||
$words = vector( | $words = vector( | ||
"Assistant", "Assnt", | "Assistant", "Assnt", | ||
Line 73: | Line 71: | ||
while($index <= length($words)) | while($index <= length($words)) | ||
{ | { | ||
$key = at($words, $index); | |||
$value = at($words, $index+1); | |||
mem($key,$value); | |||
$index += 2; | $index += 2; | ||
} | } | ||
Line 92: | Line 92: | ||
$source = $source + " (" + $foo + ")"; }</pre> | $source = $source + " (" + $foo + ")"; }</pre> | ||
=== | ===Selective Mute === | ||
Mute and unmute people merely by saying "/mute FULL NAME" the name has to be capitalized and spelled properly.<br> | Mute and unmute people merely by saying "/mute FULL NAME" the name has to be capitalized and spelled properly.<br> | ||
Authorizes by one or more sources, but could be configured for a password if you really wanted to.<br> | Authorizes by one or more sources, but could be configured for a password if you really wanted to.<br> | ||
Line 217: | Line 102: | ||
def implode($vector) | def implode($vector) | ||
{ | { | ||
$str = at($vector, 1); | |||
remove($vector, $str); | |||
if(length($vector) > 0) | |||
{ | |||
$str += " "; | |||
$str += implode($vector); | |||
} | |||
return $str; | |||
} | } | ||
//mute and unmute function | //mute and unmute function | ||
//use: type /mute or /unmute then the name of the person exactly as it is spelled | //use: type /mute or /unmute then the name of the person exactly as it is spelled | ||
//by perogi | //by perogi | ||
$exp = explode($content, " "); | |||
if($source == "YOUR NAME HERE") //only the name in this line can use script | 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 | //checks if source is muted | ||
Line 251: | Line 140: | ||
if($source == mem($source) || $source == "Unknown") | if($source == mem($source) || $source == "Unknown") | ||
{ | { | ||
$pass = 0; | |||
}</pre> | }</pre> | ||