Page 1 of 1

How to solve this?

Posted: Tue Oct 17, 2017 6:53 pm
by meymeygila
Example:

Code: Select all

globalalloc(pbase,4)
code:
  mov [pbase],rcx  <----- working and no error
  mov [rcx+00000BC0],eax
  jmp return
  
Problem i'm having now:

Code: Select all

globalalloc(hbase,4)
code:
  mov [hbase],????  <----- How to solve this? "mov [hbase],r10+rcx*4" gives me an error
  mov [r10+rcx*4+00002210],eax
  jmp return

Re: How to solve this?

Posted: Tue Oct 17, 2017 7:11 pm
by Bloodybone
You have to use another register for it I don't know what it was but one of it should work just try both:

1:

Code: Select all

globalalloc(hbase,4)
code:
  push  rbx // Push Register that's not used in the script already
  lea rbx,[r10+rcx*4+00002210]
  mov [hbase],rbx 
  pop rbx
  mov [r10+rcx*4+00002210],eax
  jmp return

2:

Code: Select all

globalalloc(hbase,4)
code:
  push  rbx // Push Register that's not used in the script already
  mov rbx,[r10+rcx*4+00002210]
  mov [hbase],rbx 
  pop rbx
  mov [r10+rcx*4+00002210],eax
  jmp return

Edit: I think you can also do it manualy like

Code: Select all

 globalalloc(hbase,4)
code:
  mov [hbase],r10 // r10 is the base, rcx*4+00002210 is the offset this way you have to manualy calculate rcx*4+00002210 and add hbase + the offset you calculated to the adress list
  mov [r10+rcx*4+00002210],eax
  jmp return
Edit2: It was the first one i tried you have to only add [hbase] to the adress list NO OFFSET if you use the first one because it gets automaticly calculated thats what lea does.

Re: How to solve this?

Posted: Tue Oct 17, 2017 7:43 pm
by meymeygila
Thank you!

Re: How to solve this?

Posted: Fri Oct 27, 2017 7:21 am
by meymeygila
Bloodybone wrote:
Tue Oct 17, 2017 7:11 pm
You have to use another register for it I don't know what it was but one of it should work just try both:
Got another problem:

Code: Select all

code:
  movaps [rcx+00000120],xmm0
  jmp return
How about that one? When i do it like this:

Code: Select all

code:
  mov [playerposxyz],rcx <---
  movaps [rcx+00000120],xmm0
  jmp return
and this too not working:

Code: Select all

code:
  push rax
  mov rax,playerposxyz
  mov [rax],rcx
  pop rax
  movaps [rcx+00000120],xmm0
  jmp return
it gave me different address / not working, the actual address was C0611CA0 but those scripts showed different and it keep changing the address after i tick it, but one of those changes showed the C0611CA0. How to make it stays with one address and show correct one?

Re: How to solve this?

Posted: Fri Oct 27, 2017 8:04 am
by Kalas
You need to compare, filter to show only your player.

Check what access this address and see If you have more then just your player value.

Re: How to solve this?

Posted: Fri Oct 27, 2017 8:26 am
by meymeygila
Kalas wrote:
Fri Oct 27, 2017 8:04 am
You need to compare, filter to show only your player.

Check what access this address and see If you have more then just your player value.
Thanks you! i was using what write instead of what access. There were bunch of addresses when i use what access so i test one by one and found it! :D

Problem solved, it now show the correct address.

One last question: Why most ct scripts cant be tick unless you interact in game? Like Health, your character must get hit by monster first before you can tick/activate the script. Is there a way to prevent this?

Re: How to solve this?

Posted: Fri Oct 27, 2017 8:39 am
by Kalas
Some need to be execute at least once, for example to get hit or lose stamina etc..