View previous topic :: View next topic |
Author |
Message |
respas How do I cheat? Reputation: 0
Joined: 10 Aug 2011 Posts: 6
|
Posted: Wed Jun 26, 2013 2:39 pm Post subject: its possible to freeze address value in script? |
|
|
Hello everyone,
i want to ask you how can i change address value if address is frozen? (manually)
maybe is possible somehow to make something like this:
unfreeze address
writeInteger(address,new-value)
freeze address again
may can anyone help me? i am new in lua coding..[/list]
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Jun 26, 2013 2:47 pm Post subject: |
|
|
If you change a frozen value in the addresslist, the new frozen value will be what you set it to, but it has to go through the addresslist to take effect (otherwise as you stated: unfreeze, writeInteger, freeze)
something like this:
Code: |
getAddressList().getMemoryRecordByDescription("Your record").Value=100
|
replace "Your record" with the recordname of the address in your list (and 100 with the new value.)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
respas How do I cheat? Reputation: 0
Joined: 10 Aug 2011 Posts: 6
|
Posted: Wed Jun 26, 2013 3:14 pm Post subject: |
|
|
Dark Byte wrote: | If you change a frozen value in the addresslist, the new frozen value will be what you set it to, but it has to go through the addresslist to take effect (otherwise as you stated: unfreeze, writeInteger, freeze)
something like this:
Code: |
getAddressList().getMemoryRecordByDescription("Your record").Value=100
|
replace "Your record" with the recordname of the address in your list (and 100 with the new value.) |
Sorry, i didnt understand.. you mean i have to write name in descripton to this address(address must be in the list), and this command will change value if address is freezed? sorry about my english, but i really need to get it working.. :/ maybe its not too hard to take screen shot with working example? thank you
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Jun 26, 2013 3:29 pm Post subject: |
|
|
Since you say the address is frozen, that means the address is in the list
So, use that address entry to set the value
Description: |
|
Filesize: |
19.82 KB |
Viewed: |
22771 Time(s) |
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
respas How do I cheat? Reputation: 0
Joined: 10 Aug 2011 Posts: 6
|
Posted: Wed Jun 26, 2013 3:32 pm Post subject: |
|
|
Thank you!
|
|
Back to top |
|
|
Loeffel How do I cheat? Reputation: 0
Joined: 24 Dec 2014 Posts: 6
|
Posted: Sat Dec 27, 2014 11:31 am Post subject: |
|
|
I can't access the addresslist at all.
I tried it in a function and also in the lua engine window directly. It always says, that the addresslist is nil
Command:
getAddresslist().getMemoryRecordByDescription("No description").Value=100
or
getAddresslist().getMemoryRecordByDescription("Health_selected_unit").Value=100
returns always:
getAddresslist().getMemoryRecordByDescription("No description").Value=100
Error:[string "getAddresslist().getMemoryRecordByDescripti..."]:1: attempt to call global 'getAddresslist' (a nil value)
Script Error
I can only set the value manually.
_________________
Yours
Loeffel |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Dec 27, 2014 12:16 pm Post subject: |
|
|
it's case sensitive (l isn't the same as L)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Loeffel How do I cheat? Reputation: 0
Joined: 24 Dec 2014 Posts: 6
|
Posted: Sat Dec 27, 2014 4:50 pm Post subject: |
|
|
Now it works, now I have just the problem left, that I can't connect the Lua-Function to a hotkey.
I tried different ways, but none works.
_________________
Yours
Loeffel |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Dec 27, 2014 5:14 pm Post subject: |
|
|
createHotkey(function, keys, ...)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Loeffel How do I cheat? Reputation: 0
Joined: 24 Dec 2014 Posts: 6
|
Posted: Sat Dec 27, 2014 5:45 pm Post subject: |
|
|
Yes, I checked the writing several times, but F12 isn't triggering the function. F12 isn't used in the game, if it would do a difference.
I would add the script to the other scripts, but not with this error.
_________________
Yours
Loeffel |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Dec 27, 2014 5:55 pm Post subject: |
|
|
do you give the proper virtual keycode for f12? (VK_F12 or 123)
e.g:
Code: |
createHotkey(functionname, VK_F12)
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Loeffel How do I cheat? Reputation: 0
Joined: 24 Dec 2014 Posts: 6
|
Posted: Sat Dec 27, 2014 8:13 pm Post subject: |
|
|
I used VK_F12
There was something left from another way.
Unfortunately, now my function heal is returning again. Nil Errors.
When I copy it to the Lua Script window and execute it there I got an Object error
This is the CT-File
[edit]Sorry uploaded the wrong Version.[/edit]
Description: |
|
Download |
Filename: |
BattleWorldsKronos +2_V1_2.CT |
Filesize: |
10 KB |
Downloaded: |
830 Time(s) |
_________________
Yours
Loeffel |
|
Back to top |
|
|
Loeffel How do I cheat? Reputation: 0
Joined: 24 Dec 2014 Posts: 6
|
Posted: Mon Dec 29, 2014 6:39 pm Post subject: |
|
|
I found it.
I wrote:
Code: | createHotkey(Heal(),VK_12) |
instead of:
Code: | createHotkey(Heal,VK_12) |
Now I only Need to find a way to Play a Sound when a cheat is activated/deactivated.
_________________
Yours
Loeffel |
|
Back to top |
|
|
|