View previous topic :: View next topic |
Author |
Message |
bachou Expert Cheater
Reputation: 0
Joined: 02 Feb 2015 Posts: 136
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Nov 02, 2015 6:40 pm Post subject: |
|
|
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 |
|
 |
bachou Expert Cheater
Reputation: 0
Joined: 02 Feb 2015 Posts: 136
|
Posted: Mon Nov 02, 2015 6:41 pm Post subject: |
|
|
oh one more thing, how to add an end point ? (Change value only from slot 471 to slot 1000 for example )
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Nov 02, 2015 6:43 pm Post subject: |
|
|
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 |
|
 |
bachou Expert Cheater
Reputation: 0
Joined: 02 Feb 2015 Posts: 136
|
Posted: Mon Nov 02, 2015 6:51 pm Post subject: |
|
|
if i want to change the "mem.Description" into address but not "slot 471" (ex: 0000000A) how should i do that
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Nov 02, 2015 7:01 pm Post subject: |
|
|
The address changes. Why would you want that?
|
|
Back to top |
|
 |
bachou Expert Cheater
Reputation: 0
Joined: 02 Feb 2015 Posts: 136
|
Posted: Mon Nov 02, 2015 7:23 pm Post subject: |
|
|
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 |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Nov 02, 2015 7:39 pm Post subject: |
|
|
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 |
|
 |
bachou Expert Cheater
Reputation: 0
Joined: 02 Feb 2015 Posts: 136
|
Posted: Mon Nov 02, 2015 7:57 pm Post subject: |
|
|
thanks man
|
|
Back to top |
|
 |
G6NK How do I cheat?
Reputation: 0
Joined: 20 May 2022 Posts: 2
|
Posted: Tue Jan 03, 2023 1:46 am Post subject: |
|
|
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
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 |
|
 |
|