The only "readme" I found only had this (and a few things like settings and stuff):
[codebox] For AddFile, AddWavFile, CompactMpq, DelFile, RenFile, FileExists, FileSize, GetFile, GetFileEx, GetFileInfo, GetMpqInfo, and ListFiles, there are versions of them which use an mpq handle instead of a filename. The names of the functions are mAddFile, mAddWavFile, mCompactMpq, mDelFile, mRenFile, sFileExists, sFileSize, sGetFile, sGetFileEx, sGetFileInfo, sGetMpqInfo, and sListFiles. Functions with names starting with "m" need a handle from mOpenMpq. Functions with names starting with "s" need a handle from sOpenMpq. The handles returned by these two functions are interchangable.
mOpenMpq(mpq filename)
Opens or creates an mpq archive and returns a handle to the mpq.
mCloseMpq(mpq handle)
Closes an archive opened by mOpenMpq.
sOpenMpq(mpq filename)
Opens an mpq archive and returns a handle to the mpq.
sCloseMpq(mpq handle)
Closes an archive opened by sOpenMpq.
AboutBox()
Displays the Mpq Control About Box.
AddFile(mpq, file, mpqpath, compress)
Adds a file to an mpq archive. Use 1 for compress to compress the file, 0 for uncompressed.
AddWavFile(mpq, file, mpqpath, quality)
Adds a file to an mpq archive with compression for audio files. Use 0 with quality for
medium quality, 2 for high, and 1 for low.
CompactMpq(mpq)
Removes wasted space in an mpq archive.
DelFile(mpq, file)
Deletes a file from an mpq archive.
FileExists(mpq, file)
Returns true if file exists in mpq.
FileSize(mpq, file)
Returns the size of file.
GetFile(mpq, file, path, usempqpath)
Reads a file from the mpq and saves its contents to a file. Use false for usempqpath to
extract the file to path. Use true to extract with the extra path from the file.
GetFileEx(mpq, file, start, length)
Reads a file from the mpq and returns its contents. Use 0 for start and -1 for length to read
the entire file.
GetFileInfo(mpq, file, infotype)
Gets information about a file in the mpq.
One of these values should be used for infotype:
(4, 8, and 9 are only used when directly accessing lmpqapi)
· 4 Is MPQHANDLE a file or an MPQ?
· 5 Size of MPQ or uncompressed file
· 6 Size of compressed file
· 7 File flags (compressed, etc.)
· 8 Handle of MPQ that file is in
· 9 Position of file pointer in files
Return values for flags:
(These are all in hexadecimal)
· 0x80000000 Exists
· 0x40000000 Unknown
· 0x00020000 ModCryptKey
· 0x00010000 Encrypted
· 0x00000200 Compressed
· 0x00000100 Compressed2
· 0x00000001 Replace existing (This probably isn't ever used)
GetMpqInfo(mpq, infotype)
Gets information about the mpq.
One of these values should be used for infotype:
(4 is only used when directly accessing lmpqapi)
1 Block size in MPQ
2 Hash table size in MPQ
3 Number of files in MPQ
4 Is MPQHANDLE a file or an MPQ?
5 Size of MPQ or uncompressed file
GetTitle()
Returns the title message.
HideTitle()
This prevents Mpq Control from returning the title message to the GotMessage event. This
was kept for compatibility with previous versions.
LastError()
Returns the code of the last error.
Error codes:
(hexadecimal)
· 0x85000001 Unspecified error
· 0x85000002 Can't find StarEdit.exe
· 0x85000003 Bad version of StarEdit.exe. Need SC/BW 1.07
· 0x85000004 StarEdit.exe is running. Must be closed
ListFiles(mpq, filelist)
Returns a list of files in mpq from (listfile). You can specify an external list with filelist. You may use multiple list files by separating them with a new line character.
MpqInitialize()
Initializes lmpqapi.dll and returns true if it is successful. Returns true every subsequent time
it is called after a successful initialization.
RenFile(mpq, oldfilename, newfilename)
Changes the name of a file in the mpq.
SetDefaultMaxFiles(maxfiles)
Same as the DefaultMaxFiles property. This was kept for compatibility with previous versions.
SetLocale(newlocaleid)
Setting this will cause the Mpq Control to read files with the language code specified.
ShowTitle()
This causes Mpq Control to return the title message to the GotMessage event before the
other messages. This is the default. This was kept for compatibility with previous versions.[/codebox]
And thanks for the help. (I was even thinking about PMing you instead of making a topic, since you seem to know everything about it)
ADDITION:
I get an error..
QUOTE
Scripting runtime error '424'
Object required: 'mpq'.