Important information: this site is currently scheduled to go offline indefinitely by end of the year.

.wz archive

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
Lambda
beginner
Posts: 20
Joined: Sat Aug 19, 2006 10:42 am

Post by Lambda »

singga wrote:It is your code or the code after 2000 evil click?
All the code I posted is mine. As previously stated "The code is in the public domain and comes without warrenty."

I think the 2000 click thing was a joke.
terasonic wrote:Korean Maple's Data.wz file is split for them.

I dont use the tools.. :(
how can I use that?
If you follow the direction in Med's GeeWiz program about using a hex editor to find compressed blocks, you could use his program. On his, I think you would have to: rename one of the split files "data.wz" and then extract just the images from that file, rename it back, and go on to the next file.

You can do a similar process with mine. Except it'd probably be easiest to extend the program to take two arguments instead of just one (filename, and offset). If you are a programmer that's an easy modification.

The other alternative is to wait. After I finish up figuring out the rest of the global client data I'll probably move on to the other versions.

I'm through ~4500 data blocks out of the ~5500 data blocks in the global client.

[edit: misattributed a quote]
Meds
beginner
Posts: 36
Joined: Sun Feb 26, 2006 3:16 am
Contact:

Post by Meds »

Download maplox extractor.
Find zlib offsets for each .wz files, save them in a file. ie (charactermapdump, mobmapdump, etc)

Run maplox.exe all lol mobmapdump mob.wz

But in general maplox.exe all lol <zlib offset files> <file.wz> (without the <>)

You'll have to move each 0-XXXX folder into another folder since I didn't do a check for that kind of stuff.
singga
n00b
Posts: 19
Joined: Sat Aug 19, 2006 9:08 am

Post by singga »

Lambda wrote:
singga wrote:It is your code or the code after 2000 evil click?
All the code I posted is mine. As previously stated "The code is in the public domain and comes without warrenty."

I think the 2000 click thing was a joke.
terasonic wrote:Korean Maple's Data.wz file is split for them.

I dont use the tools.. :(
how can I use that?
If you follow the direction in Med's GeeWiz program about using a hex editor to find compressed blocks, you could use his program. On his, I think you would have to: rename one of the split files "data.wz" and then extract just the images from that file, rename it back, and go on to the next file.

You can do a similar process with mine. Except it'd probably be easiest to extend the program to take two arguments instead of just one (filename, and offset). If you are a programmer that's an easy modification.

The other alternative is to wait. After I finish up figuring out the rest of the global client data I'll probably move on to the other versions.

I'm through ~4500 data blocks out of the ~5500 data blocks in the global client.

[edit: misattributed a quote]
I have a serious question ask you :(
I use Chinese Windows
Do i need to change my Windows Language When using geeWiz?
And also
the geeWizGMS data file is that the newest?if not may you please give me the newest mapledump :roll:
You do not have the required permissions to view the files attached to this post.
singga
n00b
Posts: 19
Joined: Sat Aug 19, 2006 9:08 am

Post by singga »

Meds wrote:Download maplox extractor.
Find zlib offsets for each .wz files, save them in a file. ie (charactermapdump, mobmapdump, etc)

Run maplox.exe all lol mobmapdump mob.wz

But in general maplox.exe all lol <zlib offset files> <file.wz> (without the <>)

You'll have to move each 0-XXXX folder into another folder since I didn't do a check for that kind of stuff.
how can i Find zlib offsets?????
and i can't run the maplox extractor
why????? :cry: :cry:
Meds
beginner
Posts: 36
Joined: Sun Feb 26, 2006 3:16 am
Contact:

Post by Meds »

GeeWiz only works with one .WZ file and it's set to read only Data.wz.

Download http://heat.castleparadox.com/mslvl/maplox!.zip and extract it to a folder with your .wz files.

Download HexWorkshop: http://www.hexworkshop.com/
Download Vedit: http://vedit.com/index.html
...intall

With HexWorkshop, find and load your .wz file. Next push Ctrl+F, and find 40056 16bit unsigned. (Find all instances, little endian)

When it's done finding all the offsets, then right click on the addresses and select Copy All

Now, open Vedit. Save the file first, name it anything you want. Paste the addresses that you copied.

Now go up to the very first line of the file, highlight everything until the end of '2' (ie, ' 2 ') copy that. Now search and replace all ' 2 ' with nothing. Save the file into the same folder with maplox.exe.

Open a cmd, goto your dir, and type [i]maplox.exe all lol mapdump whatever.wz[/i]
Meds
beginner
Posts: 36
Joined: Sun Feb 26, 2006 3:16 am
Contact:

Post by Meds »

[quote="singga"]

how can i Find zlib offsets?????
and i can't run the maplox extractor
why????? :cry: :cry:[/quote]

GMS mapdump is for Global maple, not chinese...follow the instructions up top to make one for Chinese maple.
singga
n00b
Posts: 19
Joined: Sat Aug 19, 2006 9:08 am

Post by singga »

Meds wrote:GeeWiz only works with one .WZ file and it's set to read only Data.wz.

Download http://heat.castleparadox.com/mslvl/maplox!.zip and extract it to a folder with your .wz files.

Download HexWorkshop: http://www.hexworkshop.com/
Download Vedit: http://vedit.com/index.html
...intall

With HexWorkshop, find and load your .wz file. Next push Ctrl+F, and find 40056 16bit unsigned. (Find all instances, little endian)

When it's done finding all the offsets, then right click on the addresses and select Copy All

Now, open Vedit. Save the file first, name it anything you want. Paste the addresses that you copied.

Now go up to the very first line of the file, highlight everything until the end of '2' (ie, ' 2 ') copy that. Now search and replace all ' 2 ' with nothing. Save the file into the same folder with maplox.exe.

Open a cmd, goto your dir, and type maplox.exe all lol mapdump whatever.wz
I can't do the last step.
Look my step is right or wrong(i am MS DOS ass bump :( :cry: )
I do all hexworkshop and vedit...
I click "run"
tape"CMD" in run
then CMD is open!(ye~it will be open XD )
i tape dir
then i tape <i>maplox.exe all lol mapdump whatever.wz</i>
then it say that
it is not correct commond
:cry: :cry:
is there any taping mistake when DOS???
Meds
beginner
Posts: 36
Joined: Sun Feb 26, 2006 3:16 am
Contact:

Post by Meds »

Lambda, I've since removed the GPL license from the .zip.
But here's my jerry-rigged code I've managed to build from what Valvwen posted:

Code: Select all

import os
import struct
import array
import sys
import zlib
###############
###############
###############
###############

def wtf(off, left, type, readbyte):
    sizeoff = int(off)-left
    try:
        dwz.seek(sizeoff)
        return struct.unpack(type, dwz.read(readbyte))[0]
    except:
        struct.error
        print "error"
##########################################################
def mextract(addy, wut):
	size = wtf(addy, 5, 'l', 4) 
	width13 = wtf(addy, 13, 'B', 1) 
	width20 = wtf(addy, 20, 'l', 4) 
	width16 = wtf(addy, 16, 'l', 4) 
	width17 = wtf(addy, 17, 'B', 1)
	width = ""

	if width13 == 0 or width13 <= 0:
		if width20 <= 0:
			width = width16
		else:
			if width20 >= 1048576:
				width = width17
			else:
				width = width20
	else:
		width = width13

	if size <= 0 or size > 2485760:
		pass
	else:
		dwz.seek(int(addy))
		compressed = dwz.read(size)

		sizeComp = len(compressed)
		compOff = 0
		obj = zlib.decompressobj()
		buf = ""
		try:
			while compOff < sizeComp:
				  d = obj.decompress(compressed[compOff])
				  if len(obj.unused_data) > 0:
					 break
				  buf += d
				  compOff += 1
		except zlib.error, details:
			pass
#############################################################################
		insize = len(buf)
		width = width
		height = insize / width / 2
					
		if( wut == 0 and (height != 0 and height < 9000) ):
			OUT = '%d'%int(addy)+'.bmp'

			fout = file(OUT,'wb')
			fout.write('BM')
			bmfh = struct.pack( 'LLL', insize*2 + 14 + 40, 0, 14+40 )
			fout.write(bmfh)
			bmih = struct.pack('LLLHHLLLLLL',
				40,
				width,
				height,
				1,
				32,
				0, 0, 0, 0, 0, 0 )
			fout.write(bmih)
			rgba = array.array('B')
			wFile = array.array('H')
			wFile.fromstring(buf)

			for y in range(height,0,-1):
				for pix in wFile[width * (y-1) : width * y]:
					a = ((pix >> 12) & 0xf) * 0x11
					r = ((pix >>  8) & 0xf) * 0x11
					g = ((pix >>  4) & 0xf) * 0x11
					b = ((pix >>  0) & 0xf) * 0x11
					rgba.extend( [b,g,r,a] )
			rgba.tofile(fout)

##############all##################
def mextractall():
	df = 0
	dr = 0
	os.mkdir("%d"%dr)
	os.chdir("%d"%dr)
	makeafile()
	while 1:
		addy = zloc.readline()
		if not addy:
			break
		mextract(addy, 0)
		if (df == 1000):
			os.chdir("..")
			dr = dr+df
			os.mkdir("%d"%dr)
			os.chdir("%d"%dr)
			makeafile()
			df = 0
		print float((float(zloc.tell())/float(zlocsize))*100)
		df += 1
##############Main################
if len(sys.argv) < 5:
	print 'Meds'
	print 'Usage maplox.py all lol zliboffsetFile zlibArchivethinger'
else:
	if sys.argv[2] != 'lol':
		print 'you need to lol'
	else:
		zloc = open(sys.argv[3], "rb")
		zloc.seek(0,2)
		zlocsize = zloc.tell()
		zloc.seek(0)
		dwz = open(sys.argv[4], "rb")
		dwz.seek(0, 2)
		dwzsize = dwz.tell()
		width = ""
		height= ""
		addy = sys.argv[1] ##test offset
		
		if( addy == 'all' ):
			mextractall()
The addresses for the widths were varying, and were found through trial and error. I had no idea how to view the extracted zlib chunks, and the only way I could view them were chucking it through Iceburg's program running in ARGB mode--that's why it's in bitmap format. Other than that, basic.
themoviefund
advanced
Posts: 61
Joined: Sun Jun 04, 2006 3:27 am

Post by themoviefund »

Lol that was the code I got from the-evil-2000-click-web-site-that-I-cheated-through-with-JavaScript! Grr... Did it for no reason...
Lambda
beginner
Posts: 20
Joined: Sat Aug 19, 2006 10:42 am

Post by Lambda »

Meds wrote:Lambda, I've since removed the GPL license from the .zip.
But here's my jerry-rigged code I've managed to build from what Valvwen posted.
Thanks.

I'll post the block format tomorrow morning. I was able to successfully parse through all of the inner files earlier today. Each block has a block specific format and each of those have to be parsed, but if you don't know the format, they can still be skipped over (what I'm currently doing).

The walk/run/swim blocks I can get through, as well as the info blocks that have all of the icons used for the items. I'll wait until that code is a little cleaner before posting it.
singga
n00b
Posts: 19
Joined: Sat Aug 19, 2006 9:08 am

Post by singga »

themoviefund wrote:Lol that was the code I got from the-evil-2000-click-web-site-that-I-cheated-through-with-JavaScript! Grr... Did it for no reason...
can you teach me how to make the Java Script? :(
geeWiz seems that don't work in my computer :cry:
themoviefund
advanced
Posts: 61
Joined: Sun Jun 04, 2006 3:27 am

Post by themoviefund »

Why do you want to click? First, the web site is down already. Next, Meds put the code right here on the forums! But if you really want to know, I will attach an example... Hold on.

View the source of :
[broken link]
[broken link]
Last edited by themoviefund on Mon Oct 16, 2006 5:36 am, edited 1 time in total.
Meds
beginner
Posts: 36
Joined: Sun Feb 26, 2006 3:16 am
Contact:

Post by Meds »

themoviefund wrote: Why do you want to click? First, the web site is down already. Next, Meds put the code right here on the forums! But if you really want to know, I will attach an example... Hold on.

View the source of :
http://www.themfund.com/grrr/frame1.html
http://www.themfund.com/grrr/something.html
You're a dirty little...I love you. That surely is thinking for yourself! Nicely done.
themoviefund
advanced
Posts: 61
Joined: Sun Jun 04, 2006 3:27 am

Post by themoviefund »

Meds wrote:
themoviefund wrote: Why do you want to click? First, the web site is down already. Next, Meds put the code right here on the forums! But if you really want to know, I will attach an example... Hold on.

View the source of :
http://www.themfund.com/grrr/frame1.html
http://www.themfund.com/grrr/something.html
You're a dirty little...I love you.
... I feel complimented and insulted at the same time. Since you already put the code... I'll just show the "other guy" the code, because he apparently didn't read your post.

Code: Select all

# Zlib Extracter and Raw Pixel Converter
# Copyright (C) 2006 Meds

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

# This was intended for educational use only. I will not be held responsible for any damages you may receive when you use this. This code must not be redistributed without this note and the above note.



import os
import struct
import array
import sys
import zlib
##########################################################
def wtf(off, left, type, readbyte):
    sizeoff = int(off)-left
    try:
        dwz.seek(sizeoff)
        return struct.unpack(type, dwz.read(readbyte))[0]
    except:
        struct.error
        print "error"
##########################################################
def mextract(addy, wut):
	size = wtf(addy, 5, 'l', 4) 
	width13 = wtf(addy, 13, 'B', 1) 
	width20 = wtf(addy, 20, 'l', 4) 
	width16 = wtf(addy, 16, 'l', 4) 
	width17 = wtf(addy, 17, 'B', 1)
	width = ""

	if width13 == 0 or width13 <= 0:
		if width20 <= 0:
			width = width16
		else:
			if width20 >= 1048576:
				width = width17
			else:
				width = width20
	else:
		width = width13

	if size <= 0 or size > 2485760:
		pass
	else:
		dwz.seek(int(addy))
		compressed = dwz.read(size)

		sizeComp = len(compressed)
		compOff = 0
		obj = zlib.decompressobj()
		buf = ""
		try:
			while compOff < sizeComp:
				  d = obj.decompress(compressed[compOff])
				  if len(obj.unused_data) > 0:
					 break
				  buf += d
				  compOff += 1
		except zlib.error, details:
			pass
#############################################################################
		insize = len(buf)
		width = width
		height = insize / width / 2
					
		if( wut == 0 and (height != 0 and height < 9000) ):
			OUT = '%d'%int(addy)+'.bmp'

			fout = file(OUT,'wb')
			fout.write('BM')
			bmfh = struct.pack( 'LLL', insize*2 + 14 + 40, 0, 14+40 )
			fout.write(bmfh)
			bmih = struct.pack('LLLHHLLLLLL',
				40,
				width,
				height,
				1,
				32,
				0, 0, 0, 0, 0, 0 )
			fout.write(bmih)
			rgba = array.array('B')
			wFile = array.array('H')
			wFile.fromstring(buf)

			for y in range(height,0,-1):
				for pix in wFile[width * (y-1) : width * y]:
					a = ((pix >> 12) & 0xf) * 0x11
					r = ((pix >>  8) & 0xf) * 0x11
					g = ((pix >>  4) & 0xf) * 0x11
					b = ((pix >>  0) & 0xf) * 0x11
					rgba.extend( [b,g,r,a] )
			rgba.tofile(fout)
		else:
			print 'hi'

##############all##################
def mextractall():
	df = 0
	dr = 0
	os.mkdir("%d"%dr)
	os.chdir("%d"%dr)
	while 1:
		addy = zloc.readline()
		if not addy:
			break
		mextract(addy, 0)
		if (df == 1000):
			os.chdir("..")
			dr = dr+df
			os.mkdir("%d"%dr)
			os.chdir("%d"%dr)
			df = 0
		print float((float(zloc.tell())/float(zlocsize))*100)
		df += 1
##############Main################
#if len(sys.argv) < 3:
print 'Maple Extract by Meds'
#else:
#	if sys.argv[2] != 'lol':
#		print 'Maple Extract by Meds, you need to lol'
#	else:
zloc = open("zliboffsets", "rb")
zloc.seek(0,2)
zlocsize = zloc.tell()
zloc.seek(0)
dwz = open("Data.wz", "rb")
dwz.seek(0, 2)
dwzsize = dwz.tell()
width = ""
height= ""
#		addy = sys.argv[1] ##test offset
		
#		if( addy == 'all' ):
mextractall()
I edited *some* code.
Meds
beginner
Posts: 36
Joined: Sun Feb 26, 2006 3:16 am
Contact:

Post by Meds »

Awe, but you need to lol~ Come on!
Post Reply