View previous topic :: View next topic |
Author |
Message |
benja14 How do I cheat? Reputation: 0
Joined: 22 Jun 2015 Posts: 5
|
Posted: Fri Nov 20, 2015 1:00 am Post subject: Why my scripts isnt working :( ? |
|
|
This should change Address2 value to "x-value" if Addres1 is > than "target",
if it doesn't change to "x-value2".
Also i want to add a Loop (if someone wants to help me)
Code: | function Main()
local cross = readInteger'Address1'
local attack = readInteger'Address2'
target = 1766523135
if ( cross > target) then
writeInteger(attack, 128)
else
writeInteger(attack, 0)
end
end |
Thanks for the help!
|
|
Back to top |
|
|
Daijobu Master Cheater Reputation: 13
Joined: 05 Feb 2013 Posts: 301 Location: the Netherlands
|
Posted: Fri Nov 20, 2015 1:50 am Post subject: |
|
|
Loop, pseudo:
Code: | if condition == 1 then
if ( cross > target ) then
writeInteger( attack, 128 )
else
writeInteger( attack, 0 )
end
else
exitmyloop / break /whatever
end
-or-
while (condition == 1) do
if ( cross > target ) then
writeInteger( attack, 128 )
else
writeInteger( attack, 0 )
end
end |
Just set condition to be toggle-able by you.
Example:
Code: |
{$asm}
alloc( conditionvar, 4 )
registersymbol( conditionvar )
{$lua}
condition = getAddress( "conditionvar" )
|
I've not utilized lua in cheatengine myself so just going by logic here. If I'm mistaken I'll likely be promptly corrected.
_________________
|
|
Back to top |
|
|
benja14 How do I cheat? Reputation: 0
Joined: 22 Jun 2015 Posts: 5
|
Posted: Fri Nov 20, 2015 12:58 pm Post subject: |
|
|
Still doesnt work :v
If u got an idea to make it work with other way im open to hear
it doesnt need to be in lua
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Nov 20, 2015 4:20 pm Post subject: |
|
|
Did you register "Address1" and "Address2" properly?
Is "Address2" a pointer to some address? Cause that's how you're using it.
Are you actually executing "Main()" someplace?
What does "isn't working" mean?
Are there errors?
Is the address being set to the wrong value?
Does nothing change at all?
|
|
Back to top |
|
|
benja14 How do I cheat? Reputation: 0
Joined: 22 Jun 2015 Posts: 5
|
Posted: Fri Nov 20, 2015 8:13 pm Post subject: |
|
|
Im sorry for too many question..
My complete scripts is what i write before.
If i dont use pointer in the address it will not work?
Im new in this stuff..
I write some code in C++ and i succesfully compile it but still doesnt change the address value..
|
|
Back to top |
|
|
|