Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help to make Smart Hotkey

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
hackero123
How do I cheat?
Reputation: 0

Joined: 16 Jun 2015
Posts: 5

PostPosted: Wed Nov 25, 2015 2:26 am    Post subject: Help to make Smart Hotkey Reply with quote

Hello.

I Need help.. i want do to activate one address depending value of other address. It is possible?

for example:
i have 2 address:
(1) 0126763B - Description: "Address 1", Type: byte
(2) 01165AE8 - Description: "Address 2", Type: byte
On the game i'm in one house
when i'm in the room "Address 1" change value to 10
when i'm in the bathroom "Address 1" change value to 32
when i'm in the kitchen "Address 1" change value to 55
then the value of the "Address 2" is "1" always

i need know how can do it:
On the game when i'm in the bathroom, i need "Address 2" change your value to "2" but just when i'm in the bathroom
(when i'm in the kitchen or room, i dont want change value "Address 2")

Help me please. Thanks for help me :c
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4718

PostPosted: Wed Nov 25, 2015 9:33 am    Post subject: Reply with quote

Lua can do this pretty easily. Paste this into an AA script window and assign it to your cheat table:
Code:
{$lua}
[ENABLE]
local myBathroomHackF = function()
  local addy1 = 0x126763B
  local addy2 = 0x1165AE8

  if readBytes(addy1, 1, false) == 32 then
    writeBytes(addy2, 2)
  else
    writeBytes(addy2, 1)
  end
end

if myBathroomHackT and myBathroomHackT.destroy then myBathroomHackT.destroy() end
myBathroomHackT = createTimer(nil,true)
myBathroomHackT.Interval = 100
myBathroomHackT.OnTimer = myBathroomHackF

[DISABLE]
myBathroomHackT.destroy()
myBathroomHackT = nil

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
hackero123
How do I cheat?
Reputation: 0

Joined: 16 Jun 2015
Posts: 5

PostPosted: Thu Nov 26, 2015 11:45 am    Post subject: Reply with quote

Thanks it work fine

but i want apply it to codes "Array of bytes" and dont work

2 address:
(1) 0126763B - Description: "Address 1",
(2) 01165AE8 - Description: "Address 2",

when "Address 1" = "00" > "Address 2" = "00 00 00 00"
when "Address 1" = "01" > "Address 2" = "42 53 42 53"
in others moments "Address 2" have others values

i want that when "Address 2" = "42 53 42 53" change value to "00 00 00 00"
if "Address 2" have other value that dont change also

maybe it can be possible with just one address

Thanks Smile
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4718

PostPosted: Thu Nov 26, 2015 12:34 pm    Post subject: Reply with quote

hackero123 wrote:
i want that when "Address 2" = "42 53 42 53" change value to "00 00 00 00"
if "Address 2" have other value that dont change also

I don't know what you mean by this, but here's everything else:
Code:
{$lua}
[ENABLE]
local myBathroomHackF = function()
  local addy1 = 0x126763B
  local addy2 = 0x1165AE8

  if readBytes(addy1, 1, false) == 0 then
    writeBytes(addy2, 0, 0, 0, 0)
  elseif readBytes(addy1, 1, false) == 1 then
    writeBytes(addy2, 0x42, 0x53, 0x42, 0x53)
  end
end

if myBathroomHackT and myBathroomHackT.destroy then myBathroomHackT.destroy() end
myBathroomHackT = createTimer(nil,true)
myBathroomHackT.Interval = 100
myBathroomHackT.OnTimer = myBathroomHackF

[DISABLE]
myBathroomHackT.destroy()
myBathroomHackT = nil

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites