Script by aluigi
Game: JX Online 3
For unpack you need QuickBMS Tool.
PHP Code:
comtype NRV2b
idstring PACK
get FILES long
get INFO_OFF long
get BASE_OFF long
goto INFO_OFF
for i = 0 < FILES
get CRC long
get OFFSET long
get SIZE long
get ZSIZE long
set doit long 0
if CRC == -360607879 # some files are invalid!
#elif CRC == 12345678 # put their crc/name here
else # for skipping them!
set doit long 1
endif
if doit != 0
if ZSIZE & 0x10000000
math ZSIZE &= 0x0fffffff
callfunction unpack_0x10000000
elif ZSIZE & 0x20000000
math ZSIZE &= 0x0fffffff
clog CRC OFFSET ZSIZE SIZE
elif ZSIZE & 0x40000000
print "Error: type 0x40000000 not supported"
cleanexit
elif ZSIZE & 0x80000000
print "Error: type 0x80000000 not supported"
cleanexit
else
log CRC OFFSET SIZE
endif
endif
next i
startfunction unpack_0x10000000
savepos TMP
goto OFFSET
get CHUNKS long
get CHUNKS_OFFSET long
math CHUNKS_OFFSET += OFFSET
goto CHUNKS_OFFSET
putvarchr MEMORY_FILE SIZE 0 # pre-allocate for speed
log MEMORY_FILE 0 0 # reset
append
for x = 0 < CHUNKS
get OFFSETX long
get SIZEX long
get ZSIZEX long
math OFFSETX += OFFSET
if ZSIZEX & 0x10000000
print "Error: type2 0x10000000 not supported"
cleanexit
elif ZSIZEX & 0x20000000
math ZSIZEX &= 0x0fffffff
clog MEMORY_FILE OFFSETX ZSIZEX SIZEX
elif ZSIZEX & 0x40000000
print "Error: type2 0x40000000 not supported"
cleanexit
elif ZSIZEX & 0x80000000
print "Error: type2 0x80000000 not supported"
cleanexit
else
log MEMORY_FILE OFFSETX SIZEX
endif
next x
append
log CRC 0 SIZE MEMORY_FILE
goto TMP
endfunction