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)
Cheat:
zephirot wrote: ↑Sat Jan 16, 2021 5:12 pmAlright, final table ready!
Because of some offsets for the player and ghost (difference release/beta), still have to separate the scripts.
Otherwise, most of them are working in both versions.
If you have problems, don't hesitate to give a feedback.
"Normally", shouldn't be necessary to update the table if no big changes like offsets or new things.
Note: Sometimes, Mono is not correctly activated, if you can't run a script, go in top menu "Mono" then "Activate mono features"
Beta has been updated to 0.25 and the table is still working, good news, seems it's working well!
- Just a little update to v5, I forgot to put the Setup Phase script back for the truck timer!
- Also added a script to turn on all lights from start.
Changes in beta 0.25.1 broke some scripts..
Updated to v6
V7.1 minor update (fixed Salt)
Many fixes in V8 because of Beta 0.25.8.1
Fixed - Fusebox will start ON on Professional
Fixed - Evidence controller
Fixed - Player Info
Fixed - Immortal
Fixed - Ghost info (new offsets)
Fixed - Show ghost
Fixed - FuseBox/Light info
Fixed - No flickering lights during hunting phase
Fixed - Setup Phase Info
Removed - Start map with all lights ON (code has changed, not possible to do the same for now...)
Edit: Offsets are a bit different in new beta version for the Player.
Coming in V8.1:
Fixed - Crosshair color
Fixed - Player Info
Fixed - Sanity
Fixed - Show Ghost
Have fun!
New beta update, new problems lol
Seems the SyncGrab method for the Glowstick is not there anymore, will have to find how to modify the light again...
In the meantime, will fix the salt, change an offset in player info and an other script not working.
Glowstick working again!
A bit different than before tho...
Have to activate the script before turning ON the glowstick to hook the light (because no more grab/ungrab)
While waiting to have better.. can use this way..
V9:
Fixed - Player Info (offset)
Fixed - Show Ghost
Fixed - Glowstick (can edit intensity and range)
Fixed - Salt
Fixed - Flickering lights
Small update in V9.1
- Fixed Immortal script in Player Info (No death)
- Fixed Infinite Salt
A lot of the options in the older one still work if you only use the section for the beta and the 1 for any version (ignoring the section for the stable release cheats) but some do not or are bugged.jigglypuff wrote: ↑Sat Mar 06, 2021 7:43 pmHey Zephirot, new update came for live server. can you help?
Users browsing this forum: AmazonBot, Aries