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 


adding multiple address ?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
bachou
Expert Cheater
Reputation: 0

Joined: 02 Feb 2015
Posts: 136

PostPosted: Mon Nov 02, 2015 6:37 pm    Post subject: Reply with quote

i used the above script but why did the value jumped to 2580 + 1 not 2101 + 1 Question

and how to add an end point ? (Change value only from slot 471 to slot 1000)



value.JPG
 Description:
 Filesize:  60.68 KB
 Viewed:  4600 Time(s)

value.JPG




Last edited by bachou on Mon Nov 02, 2015 6:40 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Nov 02, 2015 6:40 pm    Post subject: Reply with quote

Oh, right. Forgot about that.
Code:
local al = getAddressList()
local change = false
local value = 1
for i = 0, al.Count - 1 do
  local mem = al.MemoryRecord[i]
  if mem.Description == "Slot 471" then
    change = true
  end
  if change then
    mem.Value = 2101 + value
    value = value + 1
  end
end
Back to top
View user's profile Send private message
bachou
Expert Cheater
Reputation: 0

Joined: 02 Feb 2015
Posts: 136

PostPosted: Mon Nov 02, 2015 6:41 pm    Post subject: Reply with quote

oh one more thing, how to add an end point ? (Change value only from slot 471 to slot 1000 for example )
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Nov 02, 2015 6:43 pm    Post subject: Reply with quote

Code:
local al = getAddressList()
local change = false
local value = 1
for i = 0, al.Count - 1 do
  local mem = al.MemoryRecord[i]
  if mem.Description == "Slot 471" then
    change = true
  elseif mem.Description == "Slot 1000" then
    change = false
  end
  if change then
    mem.Value = 2101 + value
    value = value + 1
  end
end
Back to top
View user's profile Send private message
bachou
Expert Cheater
Reputation: 0

Joined: 02 Feb 2015
Posts: 136

PostPosted: Mon Nov 02, 2015 6:51 pm    Post subject: Reply with quote

if i want to change the "mem.Description" into address but not "slot 471" (ex: 0000000A) how should i do that
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Nov 02, 2015 7:01 pm    Post subject: Reply with quote

The address changes. Why would you want that?
Back to top
View user's profile Send private message
bachou
Expert Cheater
Reputation: 0

Joined: 02 Feb 2015
Posts: 136

PostPosted: Mon Nov 02, 2015 7:23 pm    Post subject: Reply with quote

because there are multiple "slot 472" on my table, the script changes all these "slot 472" but their addresses are different

example change value from 0000000A to 0000000F, is this possible ? because the addresses are consecutive, since im not a total dumb i can edit the script everytime i use it if the address change
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Nov 02, 2015 7:39 pm    Post subject: Reply with quote

Code:
local addrStart = 0x0000000A
local addrEnd   = 0x0000000F
local addrSize  = 4

local value = 1
for addr=addrStart,addrEnd,addrSize do
  writeInteger(addr, readInteger(addr) + value)
  value = value + 1
end
Back to top
View user's profile Send private message
bachou
Expert Cheater
Reputation: 0

Joined: 02 Feb 2015
Posts: 136

PostPosted: Mon Nov 02, 2015 7:57 pm    Post subject: Reply with quote

thanks man Cool
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
G6NK
How do I cheat?
Reputation: 0

Joined: 20 May 2022
Posts: 2

PostPosted: Tue Jan 03, 2023 1:46 am    Post subject: Reply with quote

how do i make this script create an adress that is 2bytes?

Code:

   local rec = al.createMemoryRecord()
   rec.Description = string.format("HP of Unit ")
   rec.Address = "+1a"
   rec.OffsetCount = 0
   rec.Type = 2bytes
   rec.appendToEntry(base)


edit:

i figured it out

Code:

   rec.Type = 1



yay critical thinking

var.type = n

where n = 1 through 13 for different value types

also if you make the type -1 it just spams you with access violation windows... like alot until you force close the application which fortunately i had an ahk script handy for

_________________
-- yeet
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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