• What are you working on? V3
    2,001 replies, posted
caught red handed [editline]04:06AM[/editline] alt of blynx perhaps?
[QUOTE=efeX;17689013]alt of blynx perhaps?[/QUOTE] i actually have no real clue but "pissflaps" is the name of a poster on another forum where i have posted my website so idk edit: and did have the avatar of that same poster, but i'm still not quite sure
Some more progress on the armory parser: [img]http://www.marlamin.nl/armory/char/preview.png[/img] (Yes I know thats ugly and the background isnt transparent but bleh) The portrait is taken from the WoW forums. http://forums.wow-europe.com/images/portraits/$level_dir/$char_gender_id-$char_race_id-$char_class_id.gif For example [url]http://forums.wow-europe.com/images/portraits/wow-80/0-1-1.gif[/url] Gender 0 (Male), Race 1 (Human), Class 1 (Warrior) So it's dynamic and based on your levels, I know it's pretty bad overall at the moment but I think I can make something nice of it with some more time. Also haven't done caching yet because I am lazy.
[QUOTE=gngbng;17689071]i actually have no real clue but "pissflaps" is the name of a poster on another forum where i have posted my website so idk edit: and did have the avatar of that same poster, but i'm still not quite sure[/QUOTE] He is just some gimmick.
Window control ITT [img]http://img524.imageshack.us/img524/8026/gwenwindow.png[/img]
[QUOTE=garry;17690146]Window control ITT [img]http://img524.imageshack.us/img524/8026/gwenwindow.png[/img][/QUOTE] Really nice.
[QUOTE=garry;17690146]Window control ITT [b]LARGE IMAGE GOES HERE[/b][/QUOTE] Garry, why have you selected arseholes?! I was looking forward to fannies, and now you've just gone and let me down. I'm very disappointed in you. :v: In other news, it looks really good and can't wait to see what else you add to it.
[QUOTE=mechanarchy;17690383]Garry, why have you selected arseholes?! I was looking forward to fannies, and now you've just gone and let me down. I'm very disappointed in you. :v: In other news, it looks really good and can't wait to see what else you add to it.[/QUOTE] Screw fannies man, I want to see that Japanese thing.
In windows, is it naughty to do SetCursor( LoadCursor( NULL, ...
[QUOTE=garry;17690575]In windows, is it naughty to do SetCursor( LoadCursor( NULL, ...[/QUOTE] It's like dividing by zero but it isn't. :|
[QUOTE=garry;17690575]In windows, is it naughty to do SetCursor( LoadCursor( NULL, ...[/QUOTE] I guess it'd depend how often you're doing it. As with everything, if you're using it more than once store it in a variable.
[QUOTE=Catdaemon;17691057]I guess it'd depend how often you're doing it. As with everything, if you're using it more than once store it in a variable.[/QUOTE] I'm pretty sure it's bad due to the temporary pointer is 'lost' and the cursor is never deleted, meaning it leaks memory. /me prepares to snip
[QUOTE=Marlamin;17689446]Some more progress on the armory parser: [img]http://www.marlamin.nl/armory/char/preview.png[/img] (Yes I know thats ugly and the background isnt transparent but bleh) The portrait is taken from the WoW forums. http://forums.wow-europe.com/images/portraits/$level_dir/$char_gender_id-$char_race_id-$char_class_id.gif For example [url]http://forums.wow-europe.com/images/portraits/wow-80/0-1-1.gif[/url] Gender 0 (Male), Race 1 (Human), Class 1 (Warrior) So it's dynamic and based on your levels, I know it's pretty bad overall at the moment but I think I can make something nice of it with some more time. Also haven't done caching yet because I am lazy.[/QUOTE] How are you getting the XML for this? I'm trying to read it using fopen etc, however i just get the HTML etc. Looking at the source in the browser gives me pure XML... Weird.
[QUOTE=Druchii;17691952]How are you getting the XML for this? I'm trying to read it using fopen etc, however i just get the HTML etc. Looking at the source in the browser gives me pure XML... Weird.[/QUOTE] The armory checks if you are using a browser that supports XSLT stylesheets, if it cant find it (like when using fopen) it just outputs HTML. The trick is to use [url=http://www.php.net/manual/en/ref.curl.php]CURL[/url] with a useragent like the following: [code] $useragent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040206 Firefox/1.0.1"; [/code] With that it just outputs pure xml.
[QUOTE=Marlamin;17692058]The armory checks if you are using a browser that supports XSLT stylesheets, if it cant find it (like when using fopen) it just outputs HTML. The trick is to use [url=http://www.php.net/manual/en/ref.curl.php]CURL[/url] with a useragent like the following: [code] $useragent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040206 Firefox/1.0.1"; [/code] With that it just outputs pure xml.[/QUOTE] That was a lot simpler than i was expecting :P Thanks :) [editline]05:09PM[/editline] Success: [url]http://scottsserver.gotdns.com/parsetest2.php[/url]
[QUOTE=garry;17690575]In windows, is it naughty to do SetCursor( LoadCursor( NULL, ...[/QUOTE] No. Cursors are resources, and Windows takes care of the caching.
Totally ripping off someone elses code though... Doesn't feel like i earned it... [code]function getPage($url, $referer, $timeout, $header){ if(!isset($timeout)) $timeout=30; $curl = curl_init(); if(strstr($referer,"://")){ curl_setopt ($curl, CURLOPT_REFERER, $referer); } curl_setopt ($curl, CURLOPT_URL, $url); curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt ($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040206 Firefox/1.0.1"); curl_setopt ($curl, CURLOPT_HEADER, (int)$header); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0); $html = curl_exec ($curl); curl_close ($curl); return $html; }[/code]
[QUOTE=PvtCupcakes;17690411]Screw fannies man, I want to see that Japanese thing.[/QUOTE] It's Chinese.
[QUOTE=Druchii;17692697]Totally ripping off someone elses code though... Doesn't feel like i earned it... [code]function getPage($url, $referer, $timeout, $header){ if(!isset($timeout)) $timeout=30; $curl = curl_init(); if(strstr($referer,"://")){ curl_setopt ($curl, CURLOPT_REFERER, $referer); } curl_setopt ($curl, CURLOPT_URL, $url); curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt ($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040206 Firefox/1.0.1"); curl_setopt ($curl, CURLOPT_HEADER, (int)$header); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0); $html = curl_exec ($curl); curl_close ($curl); return $html; }[/code][/QUOTE] Atleast you are using functions. Back when I made my parsers code I just threw it in somewhere at the start.
Took me an age to work out how to use googlecode projects, its all sweet though now :D It's not dumb, they gave me the link to the trunk: [url]https://googleprojects/blh/blh/trunk/[/url] rougelike I thought the " rougelike" was part of the URL.
Best function name ever void Base::OnChildTouched( Base* pChild )
i must admit that's pretty good :v:
[QUOTE=garry;17693902]Best function name ever void Base::OnChildTouched( Base* pChild )[/QUOTE] OnChildTouched, ParentDoesntCare if you are talking about window movement :D
Eurgh, this won't play ball.. I've a feeling it's because i'm dumb. [code]function start_tag($parser, $name, $attribs) { //Set tag to start at when parsing global $current; $current = $name; if (is_array($attribs)) { while(list($key,$val) = each($attribs)) { $makeastring .= $key."=".$val; } $string = $makeastring; } }[/code] It just returns the last element in the $string in the format $key=$val :( Example: [img]http://scottsserver.gotdns.com/secret/wow/image.php[/img]
Your while loop can be shortened to this (if you wish) [code]foreach($attribs as $key => $val) {[/code] And you don't appear to be returning $string, that could be something
Why not just do [php] foreach($attribs as $key => $val) { } [/php] Much more readable IMO.
Procedural "terrain" (just heightmapped coherent noise) [IMG]http://www.cubeupload.com/files/641400train.png[/IMG]
:ninja: Bleh, damn this active thread.
[QUOTE=Vampired;17695476]Your while loop can be shortened to this (if you wish) [code]foreach($attribs as $key => $val) {[/code] And you don't appear to be returning $string, that could be something[/QUOTE] Thanks :) And you Ortzinator. I figured in my stupidity i forgot to check that $name == "CHARACTER" and only then go through attributes... Fixed and working code: [code]function start_tag($parser, $name, $attribs) { //Set tag to start at when parsing global $current; $current = $name; if ($name == "CHARACTER"){ global $string; if (is_array($attribs)) { while(list($key,$val) = each($attribs)) { $makeastring .= $key."=".$val; } $string = $makeastring; } } }[/code] Ugly (but working) example: [img]http://scottsserver.gotdns.com/secret/wow/image.php[/img]
[QUOTE=Druchii;17695650]Thanks :) And you Ortzinator. I figured in my stupidity i forgot to check that $name == "CHARACTER" and only then go through attributes... Fixed and working code: [code]function start_tag($parser, $name, $attribs) { //Set tag to start at when parsing global $current; $current = $name; if ($name == "CHARACTER"){ global $string; if (is_array($attribs)) { while(list($key,$val) = each($attribs)) { $makeastring .= $key."=".$val; } $string = $makeastring; } } }[/code] Ugly (but working) example: [img]http://scottsserver.gotdns.com/secret/wow/image.php[/img][/QUOTE] What are you trying to do? Looks way to complicated for me. :v:
Sorry, you need to Log In to post a reply to this thread.