Language…
15 users online:  AmperSam, dotCoockie, Golden Yoshi, JezJitzu, jirok1, Mario's GameBase,  MarioFanGamer, Maw, PMH, Rykon-V73, Serena, signature_steve, Sparkz314, timothy726, toady - Guests: 250 - Bots: 284
Users: 64,795 (2,377 active)
Latest user: mathew

Pop-Tart Cat rankset updated

Link Thread Closed
Now you get a randomly colored Pop-Tart Cat!
I approve of this message

All hail poptart cat
I'm surprised you like the pop-tart cat so much Kieran, since you allways say memes are stupid and stuff.

Also, I'm keeping the SMB3 rankset.

Edit: I just checked out of curiosity, my cat had an ugly brownish-green color
Pop-Tart Cat is taking over the world. Seriously.

Me gusta.
Aw man. Why is mine BROWN?!? I wanted grape. ;_;
I'm glad we have different flavors. We should seriously make a video about all the flavors.
This is pretty hilarious. Definitely a good use for the various recorded stats here, and a very cool way to customize the ranksets even more than before.

Sadly, my Pop-Tart Cat seems to have been exposed to the bubonic plague. Honestly though, what flavor of Pop-Tarts are colored black? I'd like to try one, if they have any. #w{=P}
Originally posted by Mr. Weegee
Sadly, my Pop-Tart Cat seems to have been exposed to the bubonic plague. Honestly though, what flavor of Pop-Tarts are colored black? I'd like to try one, if they have any. #w{=P}


On the Night Scheme, it almost looks like yours is transparent. I like it a lot, actually.

Also, are these colors set? IOW, are these the colors we're assigned to permanently (until it's changed manually by someone), or do they change every month or something?
This is pretty neat!

And, ooh, purple Pop-Tart Cat for me; I quite like that. :3
Layout by Mirann <3

I'm probably retired tbh
What's not to like?

Seriously, this purple is absolutely perfect; it matches layout, name, and avatar :3
Follow me on Hermitscape for random bits of game design talk and pixel art, or even request something for me to draw.
Latest Post: Wayra Devpost #2: "A Little New"
<Kieran> if anyone is interested in the source


Code
    <?php
    require_once 'cutepop.php';
     
    class Rankset_poptartcat extends Rankset {
            public static function getName() {
                    return 'Pop-Tart Cat v2.0';
            }
            public static function getRank(IRanksetUser $user) {
                    $file = self::getFileSystemPath() . '/cache/' . $user->getId() . '.gif';
                    if(!file_exists($file)) {
                            srand($user->getRegistrationTime());
                            $random = rand(0, 16777215);
                            srand();
                            $color = crc32($user->getId().'.'.$random);
                            $c1 = array($color >> 16 & 255, $color >> 8 & 255, $color & 255);
                            if(($c1[0] + $c1[1] + $c1[2]) < 384){
                                    $c2 = array(~$c1[0] & 255, ~$c1[1] & 255, ~$c1[2] & 255);
                            }
                            else {
                                    $r = $c1[0];
                                    $g = $c1[1];
                                    $b = $c1[2];
                                   
                                    $remove = floor(($r + $g + $b) / 2);
                                   
                                    if(($r < $g) && ($r < $b)) {
                                            if($r < $remove) {
                                                    if($g < $b) {
                                                            if($g < ($remove - $r)) {
                                                                    $g = 0;
                                                            }
                                                            else {
                                                                    $g -= $remove - $r;
                                                            }
                                                    }
                                                    else {
                                                            if($b < ($remove - $r)) {
                                                                    $b = 0;
                                                            }
                                                            else {
                                                                    $b -= $remove - $r;
                                                            }
                                                    }
                                                    $r = 0;
                                            }
                                            else {
                                                    $r -= $remove;
                                            }
                                    }
                                    elseif(($g < $r) && ($g < $b)) {
                                            if($g < $remove) {
                                                    if($r < $b) {
                                                            if($r < ($remove - $g)) {
                                                                    $r = 0;
                                                            }
                                                            else {
                                                                    $r -= $remove - $g;
                                                            }
                                                    }
                                                    else {
                                                            if($b < ($remove - $g)) {
                                                                    $b = 0;
                                                            }
                                                            else {
                                                                    $b -= $remove - $g;
                                                            }
                                                    }
                                                    $g = 0;
     
                                            }
                                            else {
                                                    $g -= $remove;
                                            }
                                    }
                                    elseif(($b < $r) && ($b < $g)) {
                                            if($b < $remove) {
                                                    if($r < $g) {
                                                            if($r < ($remove - $b)) {
                                                                    $r = 0;
                                                            }
                                                            else {
                                                                    $r -= $remove - $b;
                                                            }
                                                    }
                                                    else {
                                                            if($g < ($remove - $b)) {
                                                                    $g = 0;
                                                            }
                                                            else {
                                                                    $g -= $remove - $b;
                                                            }
                                                    }
                                                    $b = 0;
     
                                            }
                                            else {
                                                    $b -= $remove;
                                            }
                                    }
                                    $c2 = array($r, $g, $b);
                            }
                           
                            $gif = CutePop::fromFile(self::getFileSystemPath() . '/poptartcat.gif');
                            $gif->getColorTable()->replaceColor(1, $c1);
                            $gif->getColorTable()->replaceColor(10, $c2);
                            $gif->saveAs($file);
                    }
                   
                    return 'Pop-Tart Cat<br><img src="' . self::getUriPath() . '/cache/' . $user->getId() . '.gif">';
            }
    }
    ?>



EDIT: disabled layout
EDIT: fix
Why exactly are you posting it directly instead of linking it or just quoting the link that Kieran linked right after that?
Your layout has been removed.
Because that link expires in 20 hours.

Also, it was right before :P
It's dark purpleish, is it sick?
Or just grape?
woag.....

(previously superdragonyoshi1. sup yall.)
My cat is a Charger! zombie-coloured pop-tart. HELL YEAH!
TRS's must be stone flavored. :3

EDIT: Oh, sweet! Mine's orange with red sprinkles! #w{=9}
Jujubes!¡!¡!


Also, still alive, just lost in life stuff
last edited March 7th

It appears mine's just a bit darker than the original. Took me quite awhile to notice as i can barely see the difference. :P
watermelonwatermelonwatermelonwatermelon :D

Does the color change, or is it related to your name?
Will we get different Pop-Tart Cats when our stats change?
I think you do, unless Kieran has to manually do it.

Anyway orange!~
Link Thread Closed