Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - $trinick

Pages: 1 ... 56 57 58 59 60 [61] 62 63 64 65 66 ... 368
901
Off Topic / Re: SAME-love MARRIAGE NOW LEGAL NATIONWIDE
« on: June 26, 2015, 03:52:38 PM »
you could always call up the queen of england and find out

props

902
Off Topic / Re: SAME-love MARRIAGE NOW LEGAL NATIONWIDE
« on: June 26, 2015, 03:49:52 PM »
to quote patrice o'neal:

"pusillanimous individual ages like cars, not like houses"

Pretty sure that after 2,500 years it doesn't matter what the starting object was, it's got no value no more.

903
Off Topic / Re: Most efficient way of transferring files?
« on: June 26, 2015, 03:47:41 PM »
Floppy disk.

904
Off Topic / Re: SAME-love MARRIAGE NOW LEGAL NATIONWIDE
« on: June 26, 2015, 03:44:49 PM »
Homoloveuality in humans existed and was observed in history even before the aqueduct was invented.

About the same time your mother was in her prime 20s.

Jesus christ, can you imagine how disgusting a 2,500 year old pusillanimous individual would be?

905
Off Topic / Re: SAME-love MARRIAGE NOW LEGAL NATIONWIDE
« on: June 26, 2015, 03:28:25 PM »
It's always been pretty ridiculous to me that this has even been an issue. It is and always has been a matter of personal Liberty. While I'm all for religious rights, it is a basic tenant of Liberty that no person's Liberty shall impede the Liberty of another human. A church should be perfectly able to refuse to marry a gay couple, as then their liberties would be impeding your religious liberties, but in the eyes of Justice and the Law, that same gay couple should have the same liberty to marry as any other couple.

906
Off Topic / Re: Post real life pictures of yourself.
« on: June 26, 2015, 03:27:04 AM »
I like it the way it is. Neonfallout doesn't agree, but who cares about her opinion anyway.

908
Modification Help / Re: I need some ideas here
« on: June 25, 2015, 08:24:58 AM »
Ignore our messages. Darksaber's was meant to discourage you from doing what you're trying to do, and mine was in direct response to his lack of humility.

Code: [Select]
function greetingDB(%client) {
    if(%isObject(%client)) {
        announce(%client // I have absolutely no idea how to use announce properly
       
    }

This is what you have. There's a couple of issues with this code, but that's alright.

The first issue you have is on the second line. The % symbol tells Torque you're talking about a variable, something that holds a value. isObject is a function, not a variable, so there's no need for the % before it.

Announce is also a function, so you're right on point with not putting a % before it. Announce is actually pretty easy to use as far as functions go. The function takes one input, in programming we call inputs parameters or arguments. There's no difference, the words are used interchangeably. The only parameter it takes is the message to send to everyone. So you use the function like so: announce("Hello World!");. The semicolon is put on the end of lines that tell Torque to do something.

Finally, you're missing a closing bracket at the end. Every opening bracket needs a closing bracket. So if I just tidy up and correct your code, this is what it should look like:

Code: [Select]
function greetingDB(%client) {
    if(isObject(%client)) {
        announce(%client);
    }
}

This code is fine as far as Torque is concerned. It just probably doesn't do what you want it to do. When this function is run, it just shows everyone the object ID number of the client you provided, assuming it exists.

You could change this to say "A player has joined!" pretty easily: just replace announce(%client); with %announce("A player has joined!");. Not hard stuff.

However, you want this code to run when a player joins. That's a little more complex. You have to make it run when a player joins. This post explains how to inject your code into a function that already exists. You should read it, but I'll show you how you do it when a player joins.

Code: [Select]
package whenAPlayerJoins {
    function GameConnection::AutoAdminCheck(%client) { // this function is called when a player is checked to see if they have auto admin, which happens when they join. Convenient.
         greetingDB(%client); // You'll want to run your function here.
         parent::AutoAdminCheck(%client); // This makes sure that the function does what it's supposed to after your code is run.
    }
};
activatePackage(whenAPlayerJoins);

909
Modification Help / Re: I need some ideas here
« on: June 25, 2015, 08:04:48 AM »
Or I can simplify the forget out of that for you.

Code: [Select]
function swearFilter(%string) {
    %tsvWords=strReplace("forget,fvck,Riddler,bitch,kunt,stuff,niger,niglet,richard,rooster,cunt,dic,dik,fuc,fvc,fvk,cvnt,fuk,research,love,secks,star fish,damn,pusy,bastard,carrot,slut,creep,suckmy,snake,vagina,jiz,wtf,handicap,rape,interject,redskin,wetback,cracker,chollo,downsyndrome,autism,cigarette,cigaretteot,kike,", "\t"); // This would be faster if you tab separated the values to begin with, but I'm too lazy.

    %wordCnt = getFieldCount(%tsvWords);

    while(%x++) {
        for(%i = 0; %i < %wordCnt; %i++) {
            if((%pos = striPos(%string, %word = getField(%tsvWords, %i))) > -1) {
                %wordLength = strLen(%word);
                for(%y = 0; %y < %wordLength; %y++) { %repl = %repl @ "*"; }
                %string = getSubStr(%string, 0, %pos) @ %repl @ getSubStr(%string, %start = %pos+%wordLength, strLen(%string)-%start-1);
                %repl = "";
        }

        if(%x >= 2) break;

        %strLen = strLen(%string);
        for(%i = 1; %i < %strLen; %i++) {
            if(getSubStr(%string, %i, 1) == getSubStr(%string, %i-1, 1)) {
                %string = getSubStr(%string, 0, %i) @ getSubStr(%string, %i+1, %strLen - %i);
                %strLen--;
            }
        }
    }
    return %string;
}

You can add in whatever /\/ -> N kind of stuff you want, but that seems petty to me. Both yours and mine will catch "titillating". Mine will swap it to "***illating" which seems more acceptable than blocking the message entirely. When it comes down to it, you can write your code to be as all-inclusive as you possibly can, but at the end of the day, other people are going to think of more permutations than you can. If I was employed to write a swear filter, I would implement a simple neural networking algorithm so that over time it would pick up on nuances.

910
Drama / Re: Racerboy: No means no. / PSA.
« on: June 25, 2015, 03:38:57 AM »
PSA: Don't loving use code tags for quotes.

PSA2: Don't loving center text unless it's for stylistic formatting.

911
General Discussion / Re: Badspot has joined my server before?
« on: June 25, 2015, 03:21:12 AM »
Here's an actual breakdown of what badspot does:

He has keys other than 0 that he plays on when he feels like checking out what's going on. Imagine how difficult it would be to play anything as Badspot. In speed kart, everyone would follow you / run into you, in TDMs everyone would swarm you, etc. Rarely does he do anything but play on his own server on this key.

However, he will sometimes join servers on key 0. Usually this will happen around the time an update has been released. This is for him to make sure that everything is running smoothly with the new update. Outside of these short time zones, reports of seeing him are few and far between. Badspot is a human being though and doesn't operate on an exact algorithm; if he feels like joining a server on key 0 he will. Only a handful of times have I seen him do this and then hang around to stay. Why? Who knows. Probably because he's just checking out the server then leaving. Maybe he launched the wrong copy of Blockland and meant to play on one of his alts. This is where you can let your imagination run loose.

912
Off Topic / Re: Post real life pictures of yourself.
« on: June 24, 2015, 11:45:01 PM »
You're the lightest one there

I'm pretty much the whitest person in the world, anyway.

914
Well let's see. Using the moulding on the wall as scale, we can guess that the bags are about 2 mouldings tall. They actually look like the same exact mouldings at my house, so I can tell you they're just about 4 inches tall. That makes each bag 8 inches tall, and what appears to be a banana and a half wide. Bananas are usually about 8 inches wide[src] so that makes them a foot wide. Ironically, they also appear to be about as wide as the banana laying on it. The banana is about 5 inches wide[src] so let's say the bags are 12x5x8. That means they have a volume of 480 cubic inches per bag.

I'm having a difficult time finding a figure on how dense the average nug of weed is. If one of you would like to shave a large nug down to one cubic inch and weigh it for me, that would quickly solve this problem. However, for the time being, I'm going to pull a number out of my ass and say that a cubic inch of (unground) weed is about 2 grams. There's gonna be a lot of air in there, so let's say only 2/3 of the bag volume is occupied by that marijuana. That puts us at 640g per bag, or 22 and a half ounces.

I count 11 bags per row and 2 rows, so 22 bags plus the 9 on top. That's 31 bags at 640g per bag; just under 20,000g. That's about 44 pounds.

The math is crude, but my best estimate is that you've got about 50 pounds of weed there, or as Wolfram Alpha helpfully points out, about 1.8 gold bars.

For fun, let's do a price comparison. 50 pounds of pure gold sells for about $755,000. That looks like mids weed, and let's use New York City as the area we're offloading this at. So 50 pounds at $261.27/oz[src] is about $210,000. Alternately, if that entire 'couch' were made of solid gold, it would be worth 5.7 million dollars.



Much more accurate estimate: those are gallon bags. Filled at 2/3 marijuana at a density of 2g/ci that's 308g (11oz) per bag, roughly half of my original estimate. 31 bags * 308g per bag = just under 10,000g or 22 pounds. That's $377,000 in gold or $92,000 in weed. It was still fun trying to calculate it using floor mouldings and bananas though.

Actually, they were much more likely 2 gallon bags, which puts my estimate almost right exactly on point. forget yeah bananas and floor mouldings.

915
Off Topic / Re: Post real life pictures of yourself.
« on: June 24, 2015, 04:48:23 PM »

Pages: 1 ... 56 57 58 59 60 [61] 62 63 64 65 66 ... 368