View previous topic :: View next topic |
Author |
Message |
liquidmetal17 How do I cheat? Reputation: 0
Joined: 14 Sep 2013 Posts: 2 Location: Pittsburgh, PA, USA
|
Posted: Sat Sep 14, 2013 1:31 pm Post subject: Very simple script |
|
|
Hello,
I have a very simple script that I'd like to use in a cheat table and I was hoping someone here would be willing to help. I have a fair amount of programming knowledge, but assembly is where I started to go cross-eyed and said "enough is enough." All I'm looking for is an autoassembler script that acts according to the following logic:
Code: | if(value of 21FFE941 == 0)
{
freeze value of 20416888 to 0
}
else
{
unfreeze 20416888
} |
A huge thank you to anyone who chooses to help me out here.
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sat Sep 14, 2013 2:32 pm Post subject: |
|
|
if you have entry of the address (20416888) in cheat engine you can use this
Code: | if (readInteger(0x21FFE941)==1) then
getAddressList().getMemoryRecordByDescription("Address To Change").Value = 0; -- Sets value to 0, make sure your address has the same description
-- Or you change the "Address To Change" to your address description
getAddressList().getMemoryRecordByDescription("Address To Change").Active = true;
end |
If you don't you can use this.
Code: | if (readInteger(0x21FFE941)==1) then
FreezeTimer = FreezeTimer or createTimer(nil,false);
FreezeTimer.Interval = 50; -- 100 Ms
FreezeTimer.onTimer = function () writeInteger(0x20416888,0) end; -- Writes Integer value to the address
FreezeTimer.Enabled = true;
FreezeTimer.onTimer(); -- Activates it, so effect will be instantly, and not 100ms later...
end |
_________________
|
|
Back to top |
|
|
liquidmetal17 How do I cheat? Reputation: 0
Joined: 14 Sep 2013 Posts: 2 Location: Pittsburgh, PA, USA
|
Posted: Sat Sep 14, 2013 9:08 pm Post subject: |
|
|
Thank you for responding, DaSpamer. When I tried to use that code, it gave me an "attempt to index a userdata value" error. I sort of got it to work by replacing the "getAddress..." part with "writeInteger", but it isn't providing the functionality that I'm after. Basically, I want the script to be constantly running and monitoring the value of 0x21FFE941. If the value is 0, I want to freeze the value of 0x2041688 to 0. If the value is 1, I want to unfreeze the value of 0x2041688 and let it do whatever it wants.
Thank you for your assistance.
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sat Sep 14, 2013 9:25 pm Post subject: |
|
|
Code: |
FreezeTimer = createTimer(nil,false);
FreezeTimer.Interval = 50; -- 50 Ms
FreezeTimer.onTimer = function ()
if (readInteger(0x21FFE941)==1) then
writeInteger(0x20416888,0);
end;
end;
FreezeTimer.Enabled = true;
FreezeTimer.onTimer();
-- To destroy the timer execute this code,and stop it, remove the -- before it.
-- FreezeTimer.destroy() |
_________________
|
|
Back to top |
|
|
|