View previous topic :: View next topic |
Author |
Message |
mrBump How do I cheat? Reputation: 0
Joined: 02 Aug 2022 Posts: 5
|
Posted: Tue Aug 02, 2022 5:08 am Post subject: Auto Assemble use value from {$lua} |
|
|
Hello! How can I use the variable I got from {$lua} in {$asm}? I have tried but it doesn't work. The variable I want to use is IsAbilityPermittedAddr.
Code: | [ENABLE]
{$lua}
IsAbilityPermittedAddr = getAddress("CastAbility_RL:IsAbilityPermitted")
{$asm}
CastAbility_RL:IsAbilityPermitted + 977:
jmp IsAbilityPermittedAddr + b72
nop
[DISABLE]
CastAbility_RL:IsAbilityPermitted + 977:
jng IsAbilityPermittedAddr + b72 |
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1055 Location: 0x90
|
Posted: Tue Aug 02, 2022 5:45 am Post subject: |
|
|
You must register a symbol:
Code: |
[ENABLE]
{$lua}
registerSymbol('IsAbilityPermittedAddr', getAddress("CastAbility_RL:IsAbilityPermitted"), true)
{$asm}
CastAbility_RL:IsAbilityPermitted+977:
jmp IsAbilityPermittedAddr+b72
nop
[DISABLE]
CastAbility_RL:IsAbilityPermitted+977:
jng IsAbilityPermittedAddr+b72
unregistersymbol(IsAbilityPermittedAddr)
|
My apologies.
Last edited by LeFiXER on Tue Aug 02, 2022 7:07 am; edited 2 times in total |
|
Back to top |
|
|
mrBump How do I cheat? Reputation: 0
Joined: 02 Aug 2022 Posts: 5
|
Posted: Tue Aug 02, 2022 6:14 am Post subject: |
|
|
Thank you for your answer. I have tried your code but CE shows a warning. It still can't recognise IsAbilityPermittedAddr.
Code: | Not all code is injectable.
(Error in line 7 (jmp IsAbilityPermittedAddr + b72): This instruction can't be compiled)
Are you sure you want to edit it to this?
|
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1055 Location: 0x90
|
Posted: Tue Aug 02, 2022 7:06 am Post subject: |
|
|
My apologies, just tested, I forgot that you had to pass an address parameter to the registerSymbol function in Lua.
Try it now. |
|
Back to top |
|
|
mrBump How do I cheat? Reputation: 0
Joined: 02 Aug 2022 Posts: 5
|
Posted: Tue Aug 02, 2022 7:47 am Post subject: |
|
|
LeFiXER wrote: |
My apologies, just tested, I forgot that you had to pass an address parameter to the registerSymbol function in Lua.
Try it now. |
Thank you! Everything works perfectly |
|
Back to top |
|
|
|