I can check, usually beta have many updates and so it's not great to change all scripts each time..PorcelainCobra wrote: ↑Fri Jan 08, 2021 8:28 pmAre you able to update to it work with the Beta update from today?
But I will see!

I can check, usually beta have many updates and so it's not great to change all scripts each time..PorcelainCobra wrote: ↑Fri Jan 08, 2021 8:28 pmAre you able to update to it work with the Beta update from today?
It's a pleasure.PorcelainCobra wrote: ↑Fri Jan 08, 2021 9:47 pmMuch appreciated. Thanks for all your work on this table thus far.
Something I wanted to do long ago but it doesn't work.PorcelainCobra wrote: ↑Sat Jan 09, 2021 4:40 pmWorks great, any plans to add a stronger flashlight?
Code: Select all
Assembly-CSharp
PCFlashlight
static fields
fields
18 : headLight (type: UnityEngine.Light)
20 : pcPropGrab (type: PCPropGrab)
28 : player (type: Player)
30 : source (type: UnityEngine.AudioSource)
38 : view (type: PhotonView)
40 : isOn (type: System.Boolean)
48 : inventoryLight (type: UnityEngine.Light)
50 : isBlinking (type: System.Boolean)
54 : lightIntensity (type: System.Single)
58 : blinkTimer (type: System.Single)
methods
.ctor ():System.Void
Awake ():System.Void
EnableOrDisableLight (_active: bool; _isSwapping: bool):System.Void
EnableOrDisableLightNetworked (_active: bool; _isSwapping: bool):System.Void
GrabbedOrDroppedFlashlight (torch: Torch; grabbed: bool):System.Void
GrabbedOrDroppedFlashlightNetworked (_intensity: single; _range: single; _angle: single):System.Void
OnTorchUse (context: UnityEngine.InputSystem.InputAction/CallbackContext):System.Void
TurnBlinkOnOrOff (active: bool):System.Void
Update ():System.Void
Code: Select all
{$lua}
function getInsForJump(address,registername,destination,allocsize,SharedMemoryName)
address = getAddressSafe(address)
if not address then error('getInsForJump address nil') return end
if not allocsize then allocsize=4096 end
destination=getAddressSafe(destination)
if not destination then
if not SharedMemoryName then destination = allocateMemory(allocsize,address)
else destination = allocateSharedMemory(SharedMemoryName,allocsize) end
end
local size = (address+5-destination>0x7FFFFFFF) and 14 or 5
if registername then
unregisterSymbol(registername)
registerSymbol(registername,destination,true)
end
local opcodes = {}
local i = 0
while(i<size) do
local ext, opc=splitDisassembledString(disassemble(address+i))
opcodes[#opcodes+1] = opc
i=i+getInstructionSize(address+i)
end
local copy = table.concat(opcodes,'\r\n')
local readAsTable = true
local byt = readBytes(address,i,readAsTable)
for j=1,#byt do byt[j] = ('%02X'):format(byt[j]) end
local bytes = table.concat(byt, ' ')
return i,copy,bytes,size,destination
end
function enablescript(name,registername,addressname,script,disable)
local address=getAddress(addressname)
if disable then script=(script):format(address,registername,readBytes(registername,1))
else
local i,copy,bytes,size =getInsForJump(address,name)
script=(script):format(registername, registername, name, copy, registername, i, bytes, address)..string.rep('nop\n',i-size)..'returnhere:'
end
local success,erro=autoAssembleCheck(script)
if not success then print('\n'..erro..'\n')local scriptstr=createStringlist()scriptstr.Text=script for j=0,scriptstr.Count-1 do print(string.format('%u\t%s',j+1,scriptstr[j])) end
if not disable then deAlloc(name)unregisterSymbol(name)end error(name..' autoAssemble failed')end
autoAssemble(script)
if disable then deAlloc(name)unregisterSymbol(name)unregisterSymbol(registername)end
end
if syntaxcheck then return end
LaunchMonoDataCollector()
[ENABLE]
enablescript('GrabbedOrDroppedFlashlight_alloc','GrabbedOrDroppedFlashlight_save','PCFlashlight.GrabbedOrDroppedFlashlight',[[
label(newmem)
label(returnhere)
label(%s)
registersymbol(%s)
%s:
newmem:
test rdx,rdx
je short @f
mov rax,[rdx+18] //Light myLight
test rax,rax
je short @f
mov rax,[rax+10]
test rax,rax
je short @f
mov rax,[rax+50]
test rax,rax
je short @f
mov [rax+3C],(float)1 //intensity
mov [rax+40],(float)200 //range
mov [rax+4C],(float)170 //spotAngle
@@:
%s
jmp returnhere
%s:
db %X %s
%X:
jmp newmem
]])
[DISABLE]
enablescript('GrabbedOrDroppedFlashlight_alloc','GrabbedOrDroppedFlashlight_save','PCFlashlight.GrabbedOrDroppedFlashlight',[[
%X:
readmem(%s+1,%u)
]],true)
From looking around, I see that there is a trainer that does this. It states that you need to drop the flashlight and pick it back up for the effect to take place. Perhaps your code works, you just need to drop it and pick it back up?zephirot wrote: ↑Sun Jan 10, 2021 12:30 pmSomething I wanted to do long ago but it doesn't work.PorcelainCobra wrote: ↑Sat Jan 09, 2021 4:40 pmWorks great, any plans to add a stronger flashlight?
I know that intensity of the flashlight is 0.8, the strong one is 1.0
I know the range, the angle... where to look at in the code
But changing the values has absolutely no impact...![]()
Also tried to check the Photon part
So it seems that if we want a better light, only way is to use the Glowstick for now.
Code: Select all
Assembly-CSharp PCFlashlight static fields fields 18 : headLight (type: UnityEngine.Light) 20 : pcPropGrab (type: PCPropGrab) 28 : player (type: Player) 30 : source (type: UnityEngine.AudioSource) 38 : view (type: PhotonView) 40 : isOn (type: System.Boolean) 48 : inventoryLight (type: UnityEngine.Light) 50 : isBlinking (type: System.Boolean) 54 : lightIntensity (type: System.Single) 58 : blinkTimer (type: System.Single) methods .ctor ():System.Void Awake ():System.Void EnableOrDisableLight (_active: bool; _isSwapping: bool):System.Void EnableOrDisableLightNetworked (_active: bool; _isSwapping: bool):System.Void GrabbedOrDroppedFlashlight (torch: Torch; grabbed: bool):System.Void GrabbedOrDroppedFlashlightNetworked (_intensity: single; _range: single; _angle: single):System.Void OnTorchUse (context: UnityEngine.InputSystem.InputAction/CallbackContext):System.Void TurnBlinkOnOrOff (active: bool):System.Void Update ():System.Void
This Does work when injecting. You do need to drop the flashlight and pick it back up. Thanks!Cake-san wrote: ↑Sun Jan 10, 2021 5:06 pmDon't know if this will work for anyone though...
Ctrl+Alt+A to open AA window in CEImproved Flashlight (GrabbedOrReGrabbedFlashlight)
Code: Select all
{$lua} function getInsForJump(address,registername,destination,allocsize,SharedMemoryName) address = getAddressSafe(address) if not address then error('getInsForJump address nil') return end if not allocsize then allocsize=4096 end destination=getAddressSafe(destination) if not destination then if not SharedMemoryName then destination = allocateMemory(allocsize,address) else destination = allocateSharedMemory(SharedMemoryName,allocsize) end end local size = (address+5-destination>0x7FFFFFFF) and 14 or 5 if registername then unregisterSymbol(registername) registerSymbol(registername,destination,true) end local opcodes = {} local i = 0 while(i<size) do local ext, opc=splitDisassembledString(disassemble(address+i)) opcodes[#opcodes+1] = opc i=i+getInstructionSize(address+i) end local copy = table.concat(opcodes,'\r\n') local readAsTable = true local byt = readBytes(address,i,readAsTable) for j=1,#byt do byt[j] = ('%02X'):format(byt[j]) end local bytes = table.concat(byt, ' ') return i,copy,bytes,size,destination end function enablescript(name,registername,addressname,script,disable) local address=getAddress(addressname) if disable then script=(script):format(address,registername,readBytes(registername,1)) else local i,copy,bytes,size =getInsForJump(address,name) script=(script):format(registername, registername, name, copy, registername, i, bytes, address)..string.rep('nop\n',i-size)..'returnhere:' end local success,erro=autoAssembleCheck(script) if not success then print('\n'..erro..'\n')local scriptstr=createStringlist()scriptstr.Text=script for j=0,scriptstr.Count-1 do print(string.format('%u\t%s',j+1,scriptstr[j])) end if not disable then deAlloc(name)unregisterSymbol(name)end error(name..' autoAssemble failed')end autoAssemble(script) if disable then deAlloc(name)unregisterSymbol(name)unregisterSymbol(registername)end end if syntaxcheck then return end LaunchMonoDataCollector() [ENABLE] enablescript('GrabbedOrDroppedFlashlight_alloc','GrabbedOrDroppedFlashlight_save','PCFlashlight.GrabbedOrDroppedFlashlight',[[ label(newmem) label(returnhere) label(%s) registersymbol(%s) %s: newmem: test rdx,rdx je short @f mov rax,[rdx+18] //Light myLight test rax,rax je short @f mov rax,[rax+10] test rax,rax je short @f mov rax,[rax+50] test rax,rax je short @f mov [rax+3C],(float)1 //intensity mov [rax+40],(float)200 //range mov [rax+4C],(float)170 //spotAngle @@: %s jmp returnhere %s: db %X %s %X: jmp newmem ]]) [DISABLE] enablescript('GrabbedOrDroppedFlashlight_alloc','GrabbedOrDroppedFlashlight_save','PCFlashlight.GrabbedOrDroppedFlashlight',[[ %X: readmem(%s+1,%u) ]],true)
Oh very nice!Cake-san wrote: ↑Sun Jan 10, 2021 5:06 pmDon't know if this will work for anyone though...
Ctrl+Alt+A to open AA window in CEImproved Flashlight (GrabbedOrReGrabbedFlashlight)
Code: Select all
{$lua} function getInsForJump(address,registername,destination,allocsize,SharedMemoryName) address = getAddressSafe(address) if not address then error('getInsForJump address nil') return end if not allocsize then allocsize=4096 end destination=getAddressSafe(destination) if not destination then if not SharedMemoryName then destination = allocateMemory(allocsize,address) else destination = allocateSharedMemory(SharedMemoryName,allocsize) end end local size = (address+5-destination>0x7FFFFFFF) and 14 or 5 if registername then unregisterSymbol(registername) registerSymbol(registername,destination,true) end local opcodes = {} local i = 0 while(i<size) do local ext, opc=splitDisassembledString(disassemble(address+i)) opcodes[#opcodes+1] = opc i=i+getInstructionSize(address+i) end local copy = table.concat(opcodes,'\r\n') local readAsTable = true local byt = readBytes(address,i,readAsTable) for j=1,#byt do byt[j] = ('%02X'):format(byt[j]) end local bytes = table.concat(byt, ' ') return i,copy,bytes,size,destination end function enablescript(name,registername,addressname,script,disable) local address=getAddress(addressname) if disable then script=(script):format(address,registername,readBytes(registername,1)) else local i,copy,bytes,size =getInsForJump(address,name) script=(script):format(registername, registername, name, copy, registername, i, bytes, address)..string.rep('nop\n',i-size)..'returnhere:' end local success,erro=autoAssembleCheck(script) if not success then print('\n'..erro..'\n')local scriptstr=createStringlist()scriptstr.Text=script for j=0,scriptstr.Count-1 do print(string.format('%u\t%s',j+1,scriptstr[j])) end if not disable then deAlloc(name)unregisterSymbol(name)end error(name..' autoAssemble failed')end autoAssemble(script) if disable then deAlloc(name)unregisterSymbol(name)unregisterSymbol(registername)end end if syntaxcheck then return end LaunchMonoDataCollector() [ENABLE] enablescript('GrabbedOrDroppedFlashlight_alloc','GrabbedOrDroppedFlashlight_save','PCFlashlight.GrabbedOrDroppedFlashlight',[[ label(newmem) label(returnhere) label(%s) registersymbol(%s) %s: newmem: test rdx,rdx je short @f mov rax,[rdx+18] //Light myLight test rax,rax je short @f mov rax,[rax+10] test rax,rax je short @f mov rax,[rax+50] test rax,rax je short @f mov [rax+3C],(float)1 //intensity mov [rax+40],(float)200 //range mov [rax+4C],(float)170 //spotAngle @@: %s jmp returnhere %s: db %X %s %X: jmp newmem ]]) [DISABLE] enablescript('GrabbedOrDroppedFlashlight_alloc','GrabbedOrDroppedFlashlight_save','PCFlashlight.GrabbedOrDroppedFlashlight',[[ %X: readmem(%s+1,%u) ]],true)
Users browsing this forum: eewui5196, Google Adsense [Bot], x0304730