Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

run two array in one .bms

Featured Replies

  • Author
  • Localization

Shokoniraya, posted Wed Nov 07, 2018 5:59 am (40168)


i need to know how can i run two array in one script, both (for i) and (for w)

i mean, when array one is over (i), then go to 0x0-OFFSET and run another array (w)

like this:
Code:
get TAFS_CHECKER extension
if TAFS_CHECKER == "emd"


for i
findloc FINDER_GET binary "\x00\x32\x33\x54"
goto FINDER_GET
getdstring DUMMY_EMD 60
get SIZE long
findloc DDS_HEADER binary "\x44\x44\x53\x20"
goto DDS_HEADER
savepos OFFSET
log "" OFFSET SIZE
next i


goto 0


for w
findloc TYAPE2 binary "\x66\x72\x6D\x6A"
goto TYAPE2
get DUMMY long
get SAIZE long
savepos OAFFSET
log "" OAFFSET SAIZE
next w


cleanexit
else
endif
endFunction
  • Author
  • Localization

aluigi, posted Wed Nov 07, 2018 1:44 pm (40173)


findloc automatically terminates the execution if it doesn't find the next pattern but it supports an option to avoid that:
Code:
get TAFS_CHECKER extension
if TAFS_CHECKER == "emd"


for
findloc FINDER_GET binary "\x00\x32\x33\x54" 0 ""
if FINDER_GET == ""
    break
endif
goto FINDER_GET
getdstring DUMMY_EMD 60
get SIZE long
findloc DDS_HEADER binary "\x44\x44\x53\x20"
goto DDS_HEADER
savepos OFFSET
log "" OFFSET SIZE
next


goto 0


for
findloc TYAPE2 binary "\x66\x72\x6D\x6A" 0 ""
if TYAPE2 == ""
    break
endif
goto TYAPE2
get DUMMY long
get SAIZE long
savepos OAFFSET
log "" OAFFSET SAIZE
next


cleanexit
else
endif
endFunction
  • Author
  • Localization

Shokoniraya, posted Mon Jan 21, 2019 7:39 pm (42607)


Aluigi. is there any way to run two diffrent array in one bms?
i saw so many problem in QuickBMS but why must be like that? dont left this great program behind
Code:
for j = 1
get OFFSET long
get SIZE long
log "" OFFSET SIZE
next j

for i = 1
get ID longlong
get HASH long
get OFFSET long
get SIZE long
get ZSIZE long
get DUMMY long
clog HASH OFFSET SIZE ZSIZE
next i
  • Author
  • Localization

aluigi, posted Mon Jan 21, 2019 10:36 pm (42619)


There are no arrays in that script, what you mean?
Tell me exactly what you want to do in the script and how you want to use 2 arrays.
  • Author
  • Localization

Shokoniraya, posted Tue Jan 22, 2019 5:53 am (42627)


aluigi wrote:
There are no arrays in that script, what you mean?
Tell me exactly what you want to do in the script and how you want to use 2 arrays.


just for j can run. but for i never run!
  • Author
  • Localization

Shokoniraya, posted Tue Jan 22, 2019 6:40 am (42629)


in zip file i packed a bms and a azh file.
but file do not have any files long and need to count headers and but next array cant run
also offset files need to be x64 and game cant read any offset but x64 and cant load files.
two problem for now. i have same problem in many files

real_file.zip

  • Author
  • Localization

aluigi, posted Tue Jan 22, 2019 11:15 pm (42668)


'j' is in an endless loop and therefore you will never enter in the 'i' cycle.

Regarding the azh file you correctly found that the offset requires to be multiplied by 64, very good.
I suggest something like the following script:
Code:
for
    get OFFSET long
    if OFFSET == 0
        break
    endif
    get SIZE long
    math OFFSET * 64
    log "" OFFSET SIZE
next
  • Author
  • Localization

Shokoniraya, posted Wed Jan 23, 2019 6:18 am (42675)


i need multiplied OFFSET in reimport2 too. but how?
and i need to count headers too. file does not have any FILES long to do
  • Author
  • Localization

aluigi, posted Wed Jan 23, 2019 10:34 am (42685)


reimport2 does the job automatically and it works perfectly with that file.

There is no FILES field in that file and so you don't know how many files exist in the archive.
The only way is checking if the OFFSET field is zero which means there are no other files.
  • Author
  • Localization

Shokoniraya, posted Thu Jan 24, 2019 4:48 am (42710)


look at this one, edited script,
there is two folder My Editing and Your QuickBMS
in Your QuickBMS folder i used your bms and game will crash because its totaly wrong and game cant read offset in any address and must be x64

in My Editing folder i change offset numbers in header and file postion and game can read normally

Test.zip

  • Author
  • Localization

GHOST DEAD, posted Thu Feb 07, 2019 8:52 am (43244)


Shokoniraya wrote:
look at this one, edited script,
there is two folder My Editing and Your QuickBMS
in Your QuickBMS folder i used your bms and game will crash because its totaly wrong and game cant read offset in any address and must be x64

in My Editing folder i change offset numbers in header and file postion and game can read normally


add your extra cycle for a specified file, not for a total command! your skill was wrong!
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.