Re: Borderlands 3 [Engine:Unreal 4.20] - Console enabler, Dumper and more..
Posted: Thu Feb 03, 2022 10:56 pm
Hey there sunbeam! I appreciate all the work you have put into this table. I know you have moved on from this game but I wanted to ask a quick question. Im currently trying to repair the SpawnItems script in build #7 of your cheat engine table (I know its been unused for a while but i wanted to give a shot at getting it working again). How would I go about finding the new location for 'SpawnItems_Internal' or 'call Borderlands3.exe+BAF140' since the game has been updated so that I could call it like you did in the script? I dumped the games objects and found the location [00061601] 0000024C97A3B7D0 Function OakGame.OakDeveloperPerks.SpawnItems but am not sure if it is correct.
Script
If you feel like getting back to me I would appreciate that so much, but if not that is no problem.
Thanks,
G40sty
Script
Spoiler
[ENABLE]
alloc( UEThread, 0x1000, Borderlands3.exe )
registersymbol( UEThread )
CreateThread( UEThread )
label( UEThreadOff )
registersymbol( UEThreadOff )
label( UEThread_loop )
label( SpawnItem_do )
label( iAmount )
registersymbol( iAmount )
label( ppItemPoolArr )
registersymbol( ppItemPoolArr )
label( pItemPool )
registersymbol( pItemPool )
UEThread:
sub rsp,28
UEThread_loop:
mov rcx,A
call Sleep
cmp [UEThreadOff],1
jne short @f
add rsp,28
mov [UEThreadOff],2
ret
@@:
mov rcx,6E // VK_DECIMAL
call GetAsyncKeyState
test ax,ax
je short @f
call short SpawnItem_do
mov rcx,C8
call Sleep
@@:
jmp short UEThread_loop
align 10 CC
SpawnItem_do:
sub rsp,38
mov r8d,[iAmount] // item amount
lea rdx,[ppItemPoolArr] // pointer to pointer to ItemPoolArr
mov rcx,[DeveloperPerks] // UObject
call Borderlands3.exe+BAF140 // SpawnItems_Internal
add rsp,38
ret
align 10 CC
iAmount:
dd 1
align 10 CC
ppItemPoolArr:
dq pItemPool
dd 1 // dwArrSize (expand this to > 1 if you add more items in pItemPool
align 10 CC
pItemPool:
dq 0
dq 0
UEThreadOff:
dd 0
[DISABLE]
{$lua}
if( syntaxcheck == false ) then --actual execution
local starttime = getTickCount()
if readInteger( "UEThreadOff" ) == 0 then --could be 2 already
writeInteger( "UEThreadOff", 1 ) --tell the thread to kill itself
end
while( getTickCount() < starttime + 1000 ) and ( readInteger( "UEThreadOff" ) ~= 2 ) do --wait till it has finished
sleep( 20 )
end
if( getTickCount() > starttime + 1000 ) then --could happen when the window is shown
showMessage( 'Disabling the thread failed!' )
error( 'Thread disabling failed!' )
end
sleep( 1 )
end
{$asm}
unregistersymbol( pItemPool )
unregistersymbol( ppItemPoolArr )
unregistersymbol( iAmount )
unregistersymbol( UEThreadOff )
unregistersymbol( UEThread )
dealloc( UEThread )
alloc( UEThread, 0x1000, Borderlands3.exe )
registersymbol( UEThread )
CreateThread( UEThread )
label( UEThreadOff )
registersymbol( UEThreadOff )
label( UEThread_loop )
label( SpawnItem_do )
label( iAmount )
registersymbol( iAmount )
label( ppItemPoolArr )
registersymbol( ppItemPoolArr )
label( pItemPool )
registersymbol( pItemPool )
UEThread:
sub rsp,28
UEThread_loop:
mov rcx,A
call Sleep
cmp [UEThreadOff],1
jne short @f
add rsp,28
mov [UEThreadOff],2
ret
@@:
mov rcx,6E // VK_DECIMAL
call GetAsyncKeyState
test ax,ax
je short @f
call short SpawnItem_do
mov rcx,C8
call Sleep
@@:
jmp short UEThread_loop
align 10 CC
SpawnItem_do:
sub rsp,38
mov r8d,[iAmount] // item amount
lea rdx,[ppItemPoolArr] // pointer to pointer to ItemPoolArr
mov rcx,[DeveloperPerks] // UObject
call Borderlands3.exe+BAF140 // SpawnItems_Internal
add rsp,38
ret
align 10 CC
iAmount:
dd 1
align 10 CC
ppItemPoolArr:
dq pItemPool
dd 1 // dwArrSize (expand this to > 1 if you add more items in pItemPool
align 10 CC
pItemPool:
dq 0
dq 0
UEThreadOff:
dd 0
[DISABLE]
{$lua}
if( syntaxcheck == false ) then --actual execution
local starttime = getTickCount()
if readInteger( "UEThreadOff" ) == 0 then --could be 2 already
writeInteger( "UEThreadOff", 1 ) --tell the thread to kill itself
end
while( getTickCount() < starttime + 1000 ) and ( readInteger( "UEThreadOff" ) ~= 2 ) do --wait till it has finished
sleep( 20 )
end
if( getTickCount() > starttime + 1000 ) then --could happen when the window is shown
showMessage( 'Disabling the thread failed!' )
error( 'Thread disabling failed!' )
end
sleep( 1 )
end
{$asm}
unregistersymbol( pItemPool )
unregistersymbol( ppItemPoolArr )
unregistersymbol( iAmount )
unregistersymbol( UEThreadOff )
unregistersymbol( UEThread )
dealloc( UEThread )
Thanks,
G40sty