Powered By Blogger

Tuesday, June 11, 2013

Terran is a joke.

I have been playing and streaming every night for 4 hours a night and everytime i play terran i just laugh and hang my head. I had to resort to Nydus worm play and roach ling all-ins. I'm Zerg! I should be able to play a macro game and win vs terran. Now the terrans are the macro kings and can literally just sit there and turtle until they have 3/3 and max army. It takes a lot more work on my end to defend and to kill the terran. There has been games where i have literally have just outplayed my opponent but in the end all they do is A-move into me and i can't stop it. What makes it even worse is the fact i can't even go attack them b/c of the threat of widow mines. I really need to analyze this match-up and get better at it. Luckily i have Doug, my long time friend and gamer who's about the same level as me in starcraft. So we can practice. But still. its a joke....

Wednesday, June 5, 2013

Twitch.tv php online offline stream code..

<?php
class streamer
{
public $streamID;
public $name;
public $race;
public $raceImage;
public $online;

public function __construct($nName, $nRace, $nStreamID) {
$this->name = $nName;
$this->race = $nRace;
$this->streamID = $nStreamID;
$this->race = strtolower($this->race);
switch($this->race) {
case "t":
$this->raceImage = "http://europe-elite.net/wp-content/uploads/2013/06/Ticon_small.png";
break;
case "p":
$this->raceImage = "http://europe-elite.net/wp-content/uploads/2013/06/Picon_small.png";
break;
case "z":
$this->raceImage = "http://europe-elite.net/wp-content/uploads/2013/06/Zicon_small.png";
break;
case "r":
$this->raceImage = "http://europe-elite.net/wp-content/uploads/2013/06/sRandomIcon.png";
break;
}

$id = $this->streamID;
$json_file = file_get_contents("http://api.justin.tv/api/stream/list.json?channel={$id}", 0, null, null);
$json_array = json_decode($json_file, true);
if ($json_array[0]['name'] == "live_user_{$id}") {
$this->online = true;
}
else {
$this->online = false;
}
}

// Sort function
static function cmp_obj($a, $b)
{
$al = strtolower($a->name);
$bl = strtolower($b->name);
if ($al == $bl) {
return 0;
}
return ($al > $bl) ? +1 : -1;
}
}

$streams = array(
new streamer("Myaura", "t", "myaurasc2"),
);

//usort($streams, cmp_obj);

echo "<ul>";

foreach($streams as $stream)
{
echo "<li>";
if ($stream->online)
{ ?>
<img src = "http://europe-elite.net/wp-content/uploads/2013/06/icon-online.png" />
<?php }
else
{ ?>
<img src = "http://europe-elite.net/wp-content/uploads/2013/06/icon-offline.png" />
<?php } ?>
<img src = "<?php echo $stream->raceImage; ?>" />
<?php
echo $stream->name;
echo "</li>";

}

echo "</ul>";