Script by finale00
Game: HuoShi
For unpack you need QuickBMS Tool.
PHP Code:
#HuoShi PAK Unpacker
comtype LZO1X
get FOLDER_NAME filename
#you can pass arguments to the function
CallFunction Unpack 1 0 FOLDER_NAME
#the actual function. Implement the recursive calls appropriately.
StartFunction Unpack
###retrieve arguments like this###
set BASE_OFFSET Unpack_arg1
set FOLDER_NAME Unpack_arg2
print "%BASE_OFFSET% %FOLDER_NAME%"
#####################
idstring "PAKF3001"
get FSIZE long
get FILES long
for i = 0 < FILES do
getdstring NAME 32
get OFFSET long
get SIZE long
get IS_FOLDER long
get unk2 long
savepos BACK
if IS_FOLDER = 1
#set up the folder name
string NEW_FOLDER_NAME = Unpack_arg2
#you should be recursively calling the function here
#unpack BASE_OFFSET NEW_FOLDER_NAME
else
goto OFFSET
getdstring header 2
if header = "NZ"
get null short
get SIZE long
get ZSIZE long
math OFFSET += 12
clog NAME OFFSET ZSIZE SIZE
else
log NAME OFFSET SIZE
endif
endif
goto BACK
next i
EndFunction
HOW TO Use:
- Run QuickBMS
- Select script
- Select file for unpack
- Select dir to unpack
- Enjoy