How do I....?

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
Sigan
Expert Cheater
Expert Cheater
Posts: 113
Joined: Fri May 26, 2017 1:23 am
Reputation: 19

How do I....?

Post by Sigan » Fri Dec 20, 2019 7:26 am

I'm trying to make a script that changes my equipped weapon upon accessing a certain address. The question I have is, how would I create something like a drop-down list, or a specific, typed-in value, that will only be injected upon the script being called?

So, an axe is equipped, but upon refreshing the screen, I want it to equip a sword. I know the IDs for both, the sword and the axe, but changing either one at the specific pointer will cause a crash. Having it change upon refresh may not. I need to create a variable that I can change and the script can then call on it.

I know how to use globalalloc() to create a variable that can be called upon to access a pointer at an offset, so that the table can give access to a pointer for manipulation directly or for troubleshooting/testing. I know how to use label() to create a variable that can be turned on or off, like:

Code: Select all

[Enable]
...
label(infPoints)
...
  cmp [infPoints],1
  jne @f
  ...
@@:
...
infPoints:
  dd 0
...
registersymbol(infPoints)
[Disable]
unregistersymbol(infPoints)
Then, separately:

Code: Select all

[Enable]
infPoints:
  dd 1
[Disable]
  dd 0
Enabling infPoints on ticking the box will allow the script to not jump to the end, and will inject my script. Prior to that, just activating the initial script will do nothing. However, with a globalalloc() at the top, I can call on the pointer in a separate line as well.

I just wish I could write in a value, then have the script check that value when it's called upon. Something like:

Code: Select all

...
  cmp [chgWeap],1
  jne @f
  mov [eax],[var]
  chgWeap:
    dd 0
 @@:
 ...
I know how to move a value into a variable, I just did that last part for explanation of what I'm going for, in case I haven't been clear enough. Any help is appreciated. Thank you.

Sigan
Expert Cheater
Expert Cheater
Posts: 113
Joined: Fri May 26, 2017 1:23 am
Reputation: 19

Re: How do I....?

Post by Sigan » Fri Dec 20, 2019 9:18 pm

Am I asking this in the wrong place, or are the serious scripters just not responding to things like this? I mean, I kinda understand... I tend to write my tables, post them, then start a different table. Just hoping to get the attention of someone that really knows what they're doing, and what I'm trying to do.

If you don't know how to help me with how to write the code, could you point me to a forum or place where I can get that help? Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users