NTSL Scripts
-
- Joined: Tue Apr 22, 2014 2:59 pm
- Byond Username: Kingofkosmos
NTSL Scripts
A while back I saw a discussion about NTSL scripts and people were talking about how some of the wiki's scripts don't work anymore and such. I'd like to update them.
So someone said they would do a thread where they would go through which scripts work... but I've not seen the thread. Is it somewhere?
If no, maybe this could be the thread where everyone dumps their awesome scripts for helping out when being an AI / killing your target / goofing around / fucking up the round and other foolery.
So someone said they would do a thread where they would go through which scripts work... but I've not seen the thread. Is it somewhere?
If no, maybe this could be the thread where everyone dumps their awesome scripts for helping out when being an AI / killing your target / goofing around / fucking up the round and other foolery.
- Stickymayhem
- Joined: Mon Apr 28, 2014 6:13 pm
- Byond Username: Stickymayhem
Re: NTSL Scripts
I was part of this discussion. I wasn't going to post the thread until I'd had an oppurtunity to go through every known NTSL script on the wiki and the dump thread back on NTstation to see which still worked, along with the errors they gave back.
For now I can say that the advanced job script on the wiki doesn't work, and neither do the mutes. I'll keep working on it and post here when I'm done.
For now I can say that the advanced job script on the wiki doesn't work, and neither do the mutes. I'll keep working on it and post here when I'm done.
Boris wrote:Sticky is a jackass who has worms where his brain should be, but he also gets exactly what SS13 should be
-
- Joined: Tue Apr 22, 2014 2:59 pm
- Byond Username: Kingofkosmos
Re: NTSL Scripts
Thanks, they are removed. Maybe I'll try to learn how these things work and test them out as well.Stickymayhem wrote:For now I can say that the advanced job script on the wiki doesn't work, and neither do the mutes. I'll keep working on it and post here when I'm done.
-
- Rarely plays
- Joined: Mon Apr 21, 2014 12:26 pm
Re: NTSL Scripts
Did you atleast save an archived version? Some servers still use the old system as a secret...
I am located here, lurking in your posts, leaving piles of transparent wordings and being confused. Oh, I also try to map...
This, this is an example of what I leave for you.
Also, these days I mostly play Ursit McStation, mostly because I like roleplay.
This, this is an example of what I leave for you.
Also, these days I mostly play Ursit McStation, mostly because I like roleplay.
-
- Joined: Tue Apr 22, 2014 2:59 pm
- Byond Username: Kingofkosmos
Re: NTSL Scripts
They are always available through View History on the NTSL Scipts -page. But sure, I can make an additional archive.AseaHeru wrote:Did you atleast save an archived version? Some servers still use the old system as a secret...
-
- Joined: Sat Apr 19, 2014 5:19 am
- Byond Username: Gun Hog
Re: NTSL Scripts
The scripts do not work because of the 'function inside a parameter' error.
Example:
This would throw an error, as the replace() function is inside broadcast(). To fix it, simply set the output of the functions to a variable, then use it instead.
Example:
You do not need to simply purge the current scripts; Fix them instead!
Example:
Code: Select all
broadcast ( replace ( "I AM ROGUE", "ROGUE" , "HELP" ) );
Example:
Code: Select all
$holder = replace ( "AI ROGUE", "ROGUE", "HELP" );
broadcast ( $holder );
- Cavoglave
- Joined: Sun Apr 20, 2014 12:39 pm
- Byond Username: Cavoglave
Re: NTSL Scripts
I don't understand why that's considered an error.Gun Hog wrote:The scripts do not work because of the 'function inside a parameter' error.
Example:This would throw an error, as the replace() function is inside broadcast(). To fix it, simply set the output of the functions to a variable, then use it instead.Code: Select all
broadcast ( replace ( "I AM ROGUE", "ROGUE" , "HELP" ) );
Example:You do not need to simply purge the current scripts; Fix them instead!Code: Select all
$holder = replace ( "AI ROGUE", "ROGUE", "HELP" ); broadcast ( $holder );
Why was it ever changed? What purpose does preventing function calls in arguments serve aside from slowing down development?
What's next, recursive functions being erroneous?
-
- Joined: Sat Apr 19, 2014 5:19 am
- Byond Username: Gun Hog
Re: NTSL Scripts
It was done to reduce lag or some such thing. Anyway, that is how you get around it.
-
- Joined: Tue Apr 22, 2014 2:59 pm
- Byond Username: Kingofkosmos
Re: NTSL Scripts
Shit. I tried, but can't figure out a situation like this in the Less Annoying Job Indicator script... Could you help out (or anyone who understands the code)? I cannot into code. The only ones reported not working thus far are "Less Annoying Job Indicator", "Selective Mute" and "Cleaner Selective Mute" scripts.Gun Hog wrote:You do not need to simply purge the current scripts; Fix them instead!
-
- Joined: Sat Apr 19, 2014 5:19 am
- Byond Username: Gun Hog
Re: NTSL Scripts
I have repaired them for you. Here is the job one:
And here is the Cleaner Selective Mute one:
I am not touching the Selective Mute one, as that thing is a beast, and we have a mute script already.
Code: Select all
def Initialize() {
$words = vector(
"Assistant", "Assnt",
"Captain", "Capt",
"Head of Personnel", "HoP",
"Bartender", "Bar",
"Chef", "Chef",
"Botanist", "Hydro",
"Quartermaster", "QM",
"Cargo Technician", "Cargo",
"Shaft Miner", "Miner",
"Clown", "Clown",
"Mime", "Mime",
"Janitor", "Jan-r",
"Librarian", "Lib-n",
"Lawyer", "Law",
"Chaplain", "Chapl",
"Chief Engineer", "CE",
"Station Engineer", "Engi",
"Atmospheric Technician", "Atmos",
"Chief Medical Officer", "CMO",
"Medical Doctor", "MD",
"Chemist", "Chem",
"Geneticist", "G-tic",
"Virologist", "Viro",
"Research Director", "RD",
"Scientist", "Sci",
"Roboticist", "Robo",
"Head of Security", "HoS",
"Warden", "Ward",
"Detective", "D-tiv",
"Security Officer", "Sec",
"AI", "AI",
"Cyborg", "Borg",
"Personal AI", "pAI",
);
$index = 1;
while($index <= length($words))
{
$key = at($words, $index);
$value = at($words, $index+1);
mem($key,$value);
$index += 2;
}
}
if(mem("initialized") != 1)
{
Initialize();
mem("initialized", 1);
}
$foo = "";
if(mem($job)) { $foo = mem($job); }
else { $foo = substr($job, 1, 6); }
if (!find($source, "Unknown") && $job != "No id" && !find($source, " (as ")) {
$source = $source + " (" + $foo + ")"; }
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;
}
- paprika
- Rarely plays
- Joined: Fri Apr 18, 2014 10:20 pm
- Byond Username: Paprka
- Location: in down bad
Re: NTSL Scripts
I wonder if there's a way to put that job one in there by default. It really shouldn't not be in NTSL every round.
Oldman Robustin wrote:It's an established meme that coders don't play this game.
Who is online
Users browsing this forum: No registered users