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 - Irk89

Pages: [1] 2 3 4 5 6 ... 16
1
Modification Help / Re: Downloading an Image
« on: September 06, 2012, 02:50:03 PM »
Forgot to mention, this won't actually work because http://image.blockland.us/detail.php is returning a jpeg image...not a png image. You could delete all files named "loadingBG" in that folder and then save as loadingBG.jpg.

To make this even better, you should look at the Content-Type in the header and determine what extension to save the file as. See: http://www.webmaster-toolkit.com/mime-types.shtml

2
Modification Help / Re: Downloading an Image
« on: September 06, 2012, 02:25:36 PM »
Problem was that you were saving the response header into beginning of your image file. I solved this by saving the buffer once the header was done which clears the buffer and gets overwritten with the actual data.

Also, this code has no problem with chunked responses (HTTP 1.1), so changed that back.

Cheers!

Code: [Select]
package ServerPreview
{
function ConnectToServer(%a, %b, %c, %d)
{
echo("triggered");
%value = parent::ConnectToServer(%a, %b, %c, %d);
%ip = getSubStr(%a,0,strPos(%a,":"));
%port = getSubStr(%a,strPos(%a,":")+1,strLen(%a));
%address = strreplace(%ip,".","-") @ "_" @ %port;
new tcpObject(FileDownloader);
FileDownloader.downloadFile("image.blockland.us", "/detail.php?q=" @ %address, "base/client/ui/loadingBG.png");
echo("ended");
return %value;
}
};
activatePackage(ServerPreview);

function FileDownloader::DownloadFile(%this, %addr, %file, %saveto)
{
%this.addr = %addr;
%this.file = %file;
%this.saveTo = %saveto;
%this.connect(%addr @ ":80");
}

function FileDownloader::onConnected(%this)
{
%this.send("GET " @ %this.file @ " HTTP/1.1\r\nHost: "@ %this.addr @"\r\n\r\n");
}

function FileDownloader::onLine(%this, %line)
{
if(%line $= "" && %this.binSize)
{
%this.setBinarySize(%this.binSize);
// flush the header out of the buffer
%this.saveBufferToFile(%saveto);
}
if(getWord(%line,0) $= "Content-Length:")
%this.binSize = getWord(%line,1);

}

function FileDownloader::onBinChunk(%this)
{
cancel(%this.saveSched);
%this.saveSched = %this.schedule(1000, onSaveFinal, %this.saveto);
}

function FileDownloader::onSaveFinal(%this, %saveto)
{
%this.saveBufferToFile(%saveto);
echo("done loading");
schedule(500, 0, resetLoading);
}

function resetLoading()
{
canvas.popDialog(LoadingGui);
canvas.pushDialog(LoadingGui);
}


3
Off Topic / Re: Forumers You Miss
« on: August 28, 2012, 11:28:04 PM »

5
General Discussion / Re: Does anyone have this map?!?!?!
« on: September 22, 2011, 01:18:41 AM »
Well I never used minigames to make the game work, so it's all modification of the game itself. Bit of a hack really...

6
General Discussion / Re: Does anyone have this map?!?!?!
« on: September 21, 2011, 11:58:37 PM »
I haven't posted the newest version because badspot crap-oned the old version.  Fair enough as it requires a some configuring of your server settings to get the map running properly.

Also it's difficult to release this because I have a decent sized database now, and synchronization between multiple servers wouldn't be worth it.

7
Suggestions & Requests / Re: Blockland single player adventure story.
« on: September 21, 2011, 11:53:49 PM »
I would be willing to contribute to this project with the little amount of time I have.

8
Modification Help / Re: Multi-Stage Scripting Contest
« on: May 22, 2011, 07:19:20 PM »
Can I assume that the primary key for all databases will be a blockland ID?

9
Modification Help / Re: Multi-Stage Scripting Contest
« on: May 19, 2011, 12:42:48 PM »
I don't see the actual task yet.

Task 2 begins in a day.

Thanks for the heads up!

10
Maps / Caesar's Pool
« on: May 15, 2011, 01:36:46 AM »
Here's a map I made quite a while ago.  Old topic has an outdated link, but is too old to edit.

I designed it symmetrically so you can have team deathmatches or capture the flag games.  Features a pool with water, some roman buildings, and a nice scenery with high quality textures.









Download Link: http://cl.ly/10083G2K3Y3e2T2v2h3v

11
Modification Help / Re: Multi-Stage Scripting Contest
« on: May 14, 2011, 10:54:32 PM »
otto is replacing Legacy and Irk and I are battling it out to the death

OK, done.
EDIT: By the way, Irk has submitted his first task.

It shall be a quick death!  Is this a ladder or bracket tournament?

12
Games / Re: Game Image Dumps
« on: March 21, 2011, 02:50:09 AM »
The first night Blockland was released:

Blockland_00013 by Irk89, on Flickr


Blockland_00015 by Irk89, on Flickr

13
Add-Ons / Re: New Vehicle: Helicopter: Updated already!
« on: January 31, 2011, 11:56:31 PM »
This is how my first flight went: http://bit.ly/ebMLS2

14
General Discussion / Re: Forgotten Maps
« on: January 21, 2011, 07:36:34 PM »
irk89's ultimate challenge  :cookieMonster:

Being hosted right now though.

15
Off Topic / Re: Post real life pictures of yourself.
« on: August 31, 2009, 08:21:31 AM »
Quote
Irk! Where the hell did you go? Loose that life of yours and join us.
Yes, join us Irk, join us Irk, join us Irk!
I suppose, where's the cool people at now days?

Quote
So Irk, now that you're back, can you stay and revive Sims maps in AoM? I'm sick to forget of the other stuff being passed around.
Revive my aom map?  Does eso still host online gameplay? Wow... My original map is still up at http://aom.heavengames.com

I don't have a computer to play aom, but perhaps in January we'll get a game going?

Pages: [1] 2 3 4 5 6 ... 16