Script by WRS
Game: Scarlet Legacy
For unpack you need QuickBMS Tool.
PHP Code:
# Scarlet Legacy PAK files
# script for QuickBMS
# WRS, xentax.com
idstring "PAK\0"
get ver byte
getdstring DUMMY 16
get headSize long
get cdOffset long
get cdSize long
get cdZSize long
get dataStart long
get dataSize long
get fileSize long
clog MEMORY_FILE cdOffset cdZSize cdSize
set base string ""
callfunction recursiveDir
cleanexit
startfunction recursiveDir
get subFils long MEMORY_FILE
get subDirs long MEMORY_FILE
get dirName string MEMORY_FILE
# quick fix for the initial dir
if dirName != "/"
string base += /
string base += dirName
endif
for subd = 0 < subDirs
callfunction recursiveDir
next subd
for subf = 0 < subFils
callfunction extractFile
next subf
endfunction
startfunction extractFile
get fileOffs long MEMORY_FILE
get fileSize long MEMORY_FILE
get fileName string MEMORY_FILE
math fileOffs += dataStart
set filePath string base
string filePath += /
string filePath += fileName
log filePath fileOffs fileSize
endfunction
HOW TO Use:
- Run QuickBMS
- Select script
- Select file for unpack
- Select dir to unpack
- Enjoy