Hi there i need your help. I have edited aluigi's script to unpack files. But i need to unpack files to the folders specified by file_type with their original names specified by file_ID. Here is script. Thanks in advance!
idstring YBIG get DUMMY long get DUMMY long get DUMMY long get OFFSET long goto OFFSET get DUMMY short get DUMMY short get FILES long getdstring DUMMY 0x51 getdstring MAINFOLDER 0x4 #get MAINFOLDER long getdstring DUMMY 0x23
savepos TMP math BASE_OFF = FILES math BASE_OFF *= 10 math BASE_OFF += TMP math BASE_OFF x= 8
for i = 0 < FILES
get OFFSET long get file_ID long get file_type byte get bComplex byte
math OFFSET *= 8 math OFFSET += BASE_OFF savepos TMP goto OFFSET
if file_type < 126 get SIZE long savepos OFFSET log file_ID OFFSET SIZE endif
if file_type == 126 getdstring DUMMY 0xE get COMCHAR byte if COMCHAR == 0 goto OFFSET get SIZE long savepos OFFSET log file_ID OFFSET SIZE else goto OFFSET math OFFSET += 22 get ZSIZE long math ZSIZE -= 18 get DUMMY0 long get DUMMY1 long get DUMMY2 long get SIZE long get TEXCOUNT short clog file_ID OFFSET ZSIZE SIZE endif endif
if file_type > 126 goto OFFSET get SIZE long savepos OFFSET log file_ID OFFSET SIZE endif goto TMP next i
Hi aluigi, I have another question regarding string. I need to search specific strings and return long value before string. How to do that? Thanks! The long value should be SIZE. String name is "NodsNoHe"
Tried this but no luck...
For FindLoc OFFSET string "\x4E\x6F\x64\x73\x4E\x6F\x48\x65" 0 "" if OFFSET == "" savepos OFFSET goto OFFSET-4 Get SIZE long goto OFFSET log NAME OFFSET SIZE endif Next