Jump to content

Autofix

Active Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Autofix

  1. I think this has made achievements what they are meant to be. You are achieving something, which has no really effect on anything else, apart from making you feel good, or bragging that you have them all.
  2. I love Australia's Internet </sarcasm>
  3. Starcraft 2, just to see what happens to the community.
  4. Try Unetbootin. Another USB boot tool and it was shown on Hak.5 episode 414. Makes any ISO bootable from USB.
  5. Crystal Caves Still one of my most favourite games. I actually happened to play it today, just for old times sake.
  6. Are the 2 computers right next to eachother? If so you could try using something like Synergy, so you can just copy and paste from one to the other with a network clipboard.
  7. I realised that just after I posted, but I obviously forgot to change it. Thanks for that though.
  8. Something like this in control.php? if (isset($_GET['action'])) { $action=$_GET['action']; if ( $action == 3 || $action == 7 || $action == 2 ){ $file=fopen("action.txt","w"); fwrite($file,$action); fclose($file); } }
  9. I just bought a msi wind and I'm about to install gentoo. I'm not really worried about compile time so I'll let you know how it goes.
  10. Autofix

    Plants vs Zombies

    I've already beaten the adventure and puzzle modes. It has taken up most of my free time the last few days :P.
  11. Autofix

    RTS anyone??

    AOE2 and C&C: Zero Hour. I know Starcraft is a good game, but I never really got into it.
  12. LOL. I like how he also had to draw an arrow, just incase you didn't know where the pot was.
  13. What exactly do you mean by that?
  14. Or imagemagick using -crop?
  15. I've been watching Hak.5 for a while I love Darren's php/apache segments. When I saw the roflbot I knew I had to do something with it so I decided to make the roflbot more tamagochi-like. I've bascially taken the roflbot code and but added another webpage to control it from, where you can feed, play and make it sleep. I've also used imagemagick and ffmpeg to create different videos for each of the actions depending on the time of day and the temperature. And comments will be greatly appreciated as I'm looking to actually add in the alarm part of this project so that the roflbot actually does something the same way the rss alarm clock did, but thought I would just get this out and see what people though. I've also attached the pictures that I used if you would like to try it out. My artistic skills may not be as good as Darren's, but at least I tried to use arrays :P. roflbot.php &lt;?php $loopcount=1; $currbg = array('blink'=&gt;'','dance'=&gt;'','eating'=&gt;'','fight'=&gt;'','hungry'=&gt;'','sleep'=&gt;'', 'angry'=&gt;'','tired'=&gt;'','walk'=&gt;''); $title = ''; $currsky =''; $prevbot = ''; $roflbotarray = array('angry','blink','dance','eating','fight','hungry','sleep','tired','walk'); $roflbotrand = array('blink','fight','walk'); $roflbot = $roflbotrand[0]; $hunger = 0; $energy = 100; $fun = 100; $videochoice = array ('angry'=&gt;5,'blink'=&gt;6,'dance'=&gt;7,'eating'=&gt;8,'fight'=&gt;9,'hungry'=&gt;10, 'sleep'=&gt;11,'tired'=&gt;12,'walk'=&gt;13); while ($title != "#roflbot *exit*") { //kill command //Parse rss feed $weather_feed = file_get_contents("http://weather.yahooapis.com/forecastrss?p=ASXX0075&amp;u=c"); $weather = simplexml_load_string($weather_feed); if(!$weather) die('weather failed'); $copyright = $weather-&gt;channel-&gt;copyright; $channel_yweather = $weather-&gt;channel-&gt;children("http://xml.weather.yahoo.com/ns/rss/1.0"); foreach($channel_yweather as $x =&gt; $channel_item) foreach($channel_item-&gt;attributes() as $k =&gt; $attr) $yw_channel[$x][$k] = $attr; $item_yweather = $weather-&gt;channel-&gt;item-&gt;children("http://xml.weather.yahoo.com/ns/rss/1.0"); foreach($item_yweather as $x =&gt; $yw_item) { foreach($yw_item-&gt;attributes() as $k =&gt; $attr) { if($k == 'day') $day = $attr; if($x == 'forecast') { $yw_forecast[$x][$day . ''][$k] = $attr; } else { $yw_forecast[$x][$k] = $attr; } } } //Get needed data $sunrise = date("Hi",strtotime($yw_channel['astronomy']['sunrise'])); $sunset = date("Hi",strtotime($yw_channel['astronomy']['sunset'])); $currtemp = $yw_forecast['condition']['temp']; $time = date("Hi"); //Set time of day if ( $time &lt; $sunrise || $time &gt; $sunset){ $sky = 'night'; }elseif( $time &lt; 1200){ $sky = 'morning'; }else{ $sky = 'afternoon'; } //Set background depending on temperature if ( $currtemp &lt; 10 ){ //Cold $bg = 'coldbg.gif'; }elseif ( $currtemp &lt; 20){ //Normal $bg = 'normalbg.gif'; }else { // Hot $bg = 'hotbg.gif'; } //no activity for 5 minutes if ($loopcount &gt;= 30) { echo "\nI've been idle too long. Doing something new. "; while ( $prevbot == $roflbot ){ $choice = array_rand($roflbotrand); $roflbot = $roflbotrand[$choice]; } echo "Randomly picked " . $roflbot . "\n"; } //Get action from control.php $file=fopen("action.txt","r"); $action = ''; $action = fgets($file); fclose($file); $file=fopen("action.txt","w"); fwrite($file,''); fclose($file); //Change roflbot if option chosen on control.php if ($action!= '') { echo "Action: ". $action . "\n"; $roflbot = $roflbotarray[$action]; if ($action==3) { $hunger=0; } elseif ($action==7) { $energy = 100; } elseif ($action==2) { $fun = 100; } } //Check hunger, energy and fun $mood = array('angry','hungry','tired'); if ( $hunger &gt; 100 &amp;&amp; $energy &lt; 0 &amp;&amp; $fun &lt; 0 ){ $roflbot = $mood[rand(0,2)]; } elseif ( $hunger &gt; 100 &amp;&amp; $fun &lt; 0 ){ $roflbot = $mood[rand(0,1)]; } elseif ( $fun &lt; 0 &amp;&amp; $energy &lt; 0) { $roflbot = $mood[rand(0,2)]; } elseif ( $hunger &gt; 100 &amp;&amp; $energy &lt; 0 ){ $roflbot = $mood[rand(1,2)]; } elseif($hunger &gt; 100) { $roflbot = 'hungry'; } elseif ($energy &lt; 0 ) { $roflbot = 'tired'; } elseif ( $fun &lt; 0 ) { $roflbot = 'angry'; } //Action chosen on control.php and not same roflbot if ( $prevbot != $roflbot ){ echo "Roflbot has changed\n"; $choice = $videochoice[$roflbot]; //Changing background if ( ($currbg[$roflbot] != $bg) || ($sky != $currsky) ){ echo "Changing video\n"; $d="images\\"; $num = 1; //Set background picture if($sky == 'morning'){ $skyimage = 'sun'; $skypos = 'NorthWest'; } elseif($sky == 'afternoon'){ $skyimage = 'sun'; $skypos = 'NorthEast'; }else{ $skyimage = 'moon'; $skypos = 'NorthWest'; } //Create new pictures while ( $num &lt;= 10 ){ exec('composite -gravity '.$skypos.' '.$d.''.$skyimage.'.gif '.$d.''.$bg.' '.$d.'image'.$num .'.gif'); exec('composite -gravity center '.$d.''.$roflbot.''.$num.'.gif '.$d.'image'.$num. '.gif '.$d.'image'.$num.'.gif'); $num = $num + 1; } //Create new video from pictures exec('ffmpeg -r 1 -y -i '. $d .'image%d.gif -r 25 videos\\'. $roflbot .'.avi'); $currbg[$roflbot] = $bg; $currsky = $sky; $prevbot = $roflbot; } //Play new video system('curl --connect-timeout 3 127.0.0.1:8080/old/ -d control=play -d item=' . $choice . ' -G &gt; output.txt'); $loopcount = 0; $prevbot = $roflbot; } echo " " . $loopcount; $loopcount=$loopcount+1; //Change stats $hunger = $hunger + 1; $energy = $energy - 1; $fun = $fun - 1; $file=fopen("stats.txt","w"); fwrite($file,$hunger."\n"); fwrite($file,$energy."\n"); fwrite($file,$fun); fclose($file); sleep ("10"); } // end while system("curl --connect-timeout 3 127.0.0.1:8080/old/ -d control=shutdown -G &gt; output.txt"); ?&gt; control.php &lt;html&gt; &lt;body&gt; &lt;?php if (isset($_GET['action'])) { $action=$_GET['action']; $file=fopen("action.txt","w"); fwrite($file,$action); fclose($file); } $file=fopen("stats.txt","r"); echo "Hunger: ". fgets($file) . "&lt;br/&gt;"; echo "Energy: ". fgets($file) . "&lt;br/&gt;"; echo "Fun: ". fgets($file) . "&lt;br/&gt;"; fclose($file); ?&gt; &lt;p&gt; &lt;a href="control.php?action=3"&gt;Feed&lt;/a&gt; &lt;a href="control.php?action=7"&gt;Sleep&lt;/a&gt; &lt;a href="control.php?action=2"&gt;Dance&lt;/a&gt;&lt;p/&gt; &lt;p&gt;&lt;a href="control.php"&gt;Refresh&lt;/a&gt;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; images.rar
  16. Autofix

    Melty Blood

    I've played a bit of MBAC using Mbcaster and my PS3 controller. I've mainly played Hisui, trying to her basic bnb down. I haven't played lately but I'm willing to play a few games.
  17. Autofix

    PSP HACKS!

    I don't know if you've seen this before but the PSP wificontroller is pretty good. It's a fun liitle hack for the PSP if you want a wireless controller but can't use bluetooth with a new gen console controller. I've got 3.90-M33, but ran it using the 3.40 version.
×
×
  • Create New...