 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Faxonation Cheater
Reputation: 0
Joined: 18 Oct 2014 Posts: 25
|
Posted: Mon Dec 07, 2015 1:07 pm Post subject: How to disable SharedMemoryBlock Script |
|
|
I need to know how to disable this script by checking and un checking it. I do not want to have to keep restarting the CE every time.
Code: |
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
{$lua}
shm=allocateSharedMemory("shared",4096)
t=createTimer()
t.OnTimer=function(sender)
--Nukenurplace in
writeInteger("[pcsx2-r3878.exe+003FFB74]+950", readInteger(shm+0))
writeInteger("[pcsx2-r3878.exe+003FFB74]+954", readInteger(shm+4))
writeInteger("[pcsx2-r3878.exe+003FFB74]+958", readInteger(shm+8))
writeInteger("[pcsx2-r3878.exe+003FFB74]+910", readInteger(shm+12))
writeInteger("[pcsx2-r3878.exe+003FFB74]+B64", readInteger(shm+16))
--Finalquestt OUT
writeInteger(shm+20, readInteger("[pcsx2-r3878.exe+0040003C]+370"))
writeInteger(shm+24, readInteger("[pcsx2-r3878.exe+0040003C]+374"))
writeInteger(shm+28, readInteger("[pcsx2-r3878.exe+0040003C]+378"))
writeInteger(shm+32, readInteger("[pcsx2-r3878.exe+0040003C]+330"))
writeInteger(shm+36, readInteger("[pcsx2-r3878.exe+0040239C]+728"))
writeInteger(shm+232, readInteger("[pcsx2-r3878.exe+003FEE70]+36C"))
writeInteger("[pcsx2-r3878.exe+0040003C]+584", readInteger(shm+240))
--Raam in
writeInteger("[pcsx2-r3878.exe+00400550]+F30", readInteger(shm+40))
writeInteger("[pcsx2-r3878.exe+00400550]+F34", readInteger(shm+44))
writeInteger("[pcsx2-r3878.exe+00400550]+F38", readInteger(shm+48))
writeInteger("[pcsx2-r3878.exe+00400550]+EF0", readInteger(shm+52))
writeInteger("[pcsx2-r3878.exe+00400554]+144", readInteger(shm+56))
--Corsten in/Angry Patron
writeInteger("[pcsx2-r3878.exe+003FFF34]+B50", readInteger(shm+60))
writeInteger("[pcsx2-r3878.exe+003FFF34]+B54", readInteger(shm+64))
writeInteger("[pcsx2-r3878.exe+003FFF34]+B58", readInteger(shm+68))
writeInteger("[pcsx2-r3878.exe+003FFF34]+B10", readInteger(shm+72))
writeInteger("[pcsx2-r3878.exe+003FFF34]+D64", readInteger(shm+76))
writeInteger("[pcsx2-r3878.exe+003FFF34]+D64", readInteger(shm+236))
--Grouping in
writeInteger("[pcsx2-r3878.exe+00402430]+864", readInteger(shm+80))
writeInteger("[pcsx2-r3878.exe+00402430]+93C", readInteger(shm+84))
--1
writeInteger("[pcsx2-r3878.exe+00402430]+876", readInteger(shm+88))
writeInteger("[pcsx2-r3878.exe+00402430]+86C", readInteger(shm+92))
writeInteger("[pcsx2-r3878.exe+00402430]+874", readInteger(shm+96))
writeInteger("[pcsx2-r3878.exe+00402430]+888", readInteger(shm+100))
writeInteger("[pcsx2-r3878.exe+00402430]+88C", readInteger(shm+104))
writeInteger("[pcsx2-r3878.exe+00402430]+890", readInteger(shm+108))
writeInteger("[pcsx2-r3878.exe+00402430]+894", readInteger(shm+112))
writeInteger("[pcsx2-r3878.exe+00402430]+898", readInteger(shm+116))
writeInteger("[pcsx2-r3878.exe+00402430]+89C", readInteger(shm+120))
--2
writeInteger("[pcsx2-r3878.exe+00402430]+8AA", readInteger(shm+124))
writeInteger("[pcsx2-r3878.exe+00402430]+8A0", readInteger(shm+128))
writeInteger("[pcsx2-r3878.exe+00402430]+8A8", readInteger(shm+132))
writeInteger("[pcsx2-r3878.exe+00402430]+8BC", readInteger(shm+136))
writeInteger("[pcsx2-r3878.exe+00402430]+8C0", readInteger(shm+140))
writeInteger("[pcsx2-r3878.exe+00402430]+8C4", readInteger(shm+144))
writeInteger("[pcsx2-r3878.exe+00402430]+8C8", readInteger(shm+148))
writeInteger("[pcsx2-r3878.exe+00402430]+8CC", readInteger(shm+152))
writeInteger("[pcsx2-r3878.exe+00402430]+8D0", readInteger(shm+156))
--3
writeInteger("[pcsx2-r3878.exe+00402430]+8DE", readInteger(shm+160))
writeInteger("[pcsx2-r3878.exe+00402430]+8D4", readInteger(shm+164))
writeInteger("[pcsx2-r3878.exe+00402430]+8DC", readInteger(shm+168))
writeInteger("[pcsx2-r3878.exe+00402430]+8F0", readInteger(shm+172))
writeInteger("[pcsx2-r3878.exe+00402430]+8F4", readInteger(shm+176))
writeInteger("[pcsx2-r3878.exe+00402430]+8F8", readInteger(shm+180))
writeInteger("[pcsx2-r3878.exe+00402430]+8FC", readInteger(shm+184))
writeInteger("[pcsx2-r3878.exe+00402430]+900", readInteger(shm+188))
writeInteger("[pcsx2-r3878.exe+00402430]+904", readInteger(shm+192))
--4
writeInteger("[pcsx2-r3878.exe+00402430]+912", readInteger(shm+196))
writeInteger("[pcsx2-r3878.exe+00402430]+908", readInteger(shm+200))
writeInteger("[pcsx2-r3878.exe+00402430]+910", readInteger(shm+204))
writeInteger("[pcsx2-r3878.exe+00402430]+924", readInteger(shm+208))
writeInteger("[pcsx2-r3878.exe+00402430]+928", readInteger(shm+212))
writeInteger("[pcsx2-r3878.exe+00402430]+92C", readInteger(shm+216))
writeInteger("[pcsx2-r3878.exe+00402430]+930", readInteger(shm+220))
writeInteger("[pcsx2-r3878.exe+00402430]+934", readInteger(shm+224))
writeInteger("[pcsx2-r3878.exe+00402430]+938", readInteger(shm+228))
end
t.Interval=01
t.Enabled=true
[DISABLE]
//code from here till the end of the code will be used to disable the cheat |
|
|
Back to top |
|
 |
panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Mon Dec 07, 2015 1:39 pm Post subject: |
|
|
Try this without using shared memory,
Code: | [ENABLE]
alloc(shared,4096)
registerSymbol(shared)
{$lua}
t=createTimer()
t.OnTimer=function(sender)
if readInteger('shared')~=nil and readInteger("[pcsx2-r3878.exe+003FFB74]+950")~=nil then -- read write memory
sender.Interval = 1 --- memory readable, run timer as fast as possible
local shm = getAddress('shared')
--start read write memory
--- no change this part, paste here ---
--end read write memory
else
sender.Interval = 1000
--- don't need to run timer too fast if target memory not readable
end
end
t.Interval=01
t.Enabled=true
{$asm}
[DISABLE]
dealloc(shared)
unregisterSymbol(shared)
{$lua}
if t ~=nil then -- delete previous timer
t.Destroy()
t=nil
end
|
ADDED:
oops, something in my understanding is not right... where the 'shm+' values other than Finalquestt OUT, 'shm+20'...'shm+232' come from?
_________________
- Retarded. |
|
Back to top |
|
 |
Faxonation Cheater
Reputation: 0
Joined: 18 Oct 2014 Posts: 25
|
Posted: Mon Dec 07, 2015 2:14 pm Post subject: |
|
|
they come from the other cheat engine that is attached to another PCSX2
the one 232 was added after I already wrote the script, it goes with finalquestts out values. I did not want to put it at the bottom.
this scripts lets me see the movements for all characters the same in both emulators.
|
|
Back to top |
|
 |
panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Mon Dec 07, 2015 2:33 pm Post subject: |
|
|
Faxonation wrote: | they come from the other cheat engine that is attached to another PCSX2
the one 232 was added after I already wrote the script, it goes with finalquestts out values. I did not want to put it at the bottom.
this scripts lets me see the movements for all characters the same in both emulators. |
I see, then shared memory is necessary I assume.
The idea is the same I guess, set some condition check to actvate/deactive the if-then-else block inside the timer.
Some thing like:
Code: |
[ENABLE]
{$lua}
if SharedAction==nil then --- setup
SharedAction = true
shm=allocateSharedMemory("shared",4096) -- should re-use if already allocated
t=createTimer()
t.OnTimer=function(sender)
if SharedAction == true then
-- start read write
---- paste writeInteger etc.
-- end read write
end -- SharedAction
end
t.Interval=01
t.Enabled=true
--- END setup
[DISABLE]
SharedAction = nil
t.Destroy()
t = nil
|
bye~
_________________
- Retarded. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|