View previous topic :: View next topic |
Author |
Message |
Slyker How do I cheat? Reputation: 0
Joined: 03 Oct 2013 Posts: 5
|
Posted: Thu Oct 03, 2013 3:37 pm Post subject: [Help for newbie] Set to random value |
|
|
Hi, i have some language barrier, and i think primitive explanation seems clearer to avoid misunderstanding
Need to create a trainer by CheatEngine. Address is static. Functional:
F1 - set value (ID) to default (as an example) "123456"
F2 - set value to RANDOM(!) integer value (better to define between 100000-900000) - and this is problem for me =)
Right now i use Increase/Decrease options (Lot of buttons: +1 -3 +5 -1 +2 etc) because GUI don't give me ability to use RANDOM value. I think need use a script.
Can someone show me example and explain how i can do this?
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Thu Oct 03, 2013 3:55 pm Post subject: |
|
|
Code: | writeInteger(0x000000, math.random(100000,900000)); |
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Thu Oct 03, 2013 3:56 pm Post subject: |
|
|
use a hotkey that sets the value to
Code: |
[math.random(100000, 900000)]
|
(include the brackets [] )
_________________
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 |
|
|
Slyker How do I cheat? Reputation: 0
Joined: 03 Oct 2013 Posts: 5
|
Posted: Thu Oct 03, 2013 4:19 pm Post subject: |
|
|
Thank you. Can someone give me working example file, (i want remake it) because i'm newbie - with pattern i can understand faster.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Thu Oct 03, 2013 4:35 pm Post subject: |
|
|
here's an example.
When you press f1 it will set the value to 123456, if you press f2 it will set the value to a random value between 100000 and 900000
Description: |
|
Download |
Filename: |
examplehk.CT |
Filesize: |
830 Bytes |
Downloaded: |
1137 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 |
|
|
Slyker How do I cheat? Reputation: 0
Joined: 03 Oct 2013 Posts: 5
|
Posted: Thu Oct 03, 2013 4:51 pm Post subject: |
|
|
Perfect. I'm very surprised by such quality support.
|
|
Back to top |
|
|
Slyker How do I cheat? Reputation: 0
Joined: 03 Oct 2013 Posts: 5
|
Posted: Thu Oct 10, 2013 11:31 am Post subject: |
|
|
Is it possible to use a random number from a txt file? How?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Oct 10, 2013 11:45 am Post subject: |
|
|
Random number from a .txt file ?
Explain.
_________________
|
|
Back to top |
|
|
Slyker How do I cheat? Reputation: 0
Joined: 03 Oct 2013 Posts: 5
|
Posted: Thu Oct 10, 2013 11:54 am Post subject: |
|
|
List of values:
123456
222222
333122
123123
...etc
in "values.txt"
As i asked above above, but with the difference that the value is taken randomly from the list.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Oct 10, 2013 12:05 pm Post subject: |
|
|
Again, you can use Lua:
Code: | for line in io.lines("my.txt") do
print(line)
end |
Of course, instead of print, you will use
Code: | writeInteger(address, tonumber(line) ) |
Edit:
Or if you want keypress for it:
Code: | tableWithValues = {}
for line in io.lines("my.txt") do
table.insert(tableWithValues,tonumber(line))
end
hk1 = createHotkey("writeValueFromList", keys, ...)
function writeValueFromList()
writeInteger(address, tableWithValues[math.random(1, #tableWithValues)] )
end |
_________________
|
|
Back to top |
|
|
|