Help! Editing CIL instruction of a encrypted game

Francois284Modz

Awesome Active Platinian
Original poster
Jun 10, 2018
176
2,423
193
26
france
hey guys can someone help me on modding a game

i got this game but its encrypted but so far i succed
https://i.gyazo.com/fbbf563f3b681e0d956df9b502d05381.png

what i have to edit to make the line add enemy damage

Screenshot - 028e7ecab77bf5aaa97cbd3a7af02535 - Gyazo

what im lokking to do is this
C#:
private void DeductHealth(int ^]`]``[^`^^^`^^`]^^``]`, int ^]][[[^^`[]]]`]]`^`[][[, int ]``^^^]^`^`][^]^`^^[][], int ]`^]``][^`[`]^[`^`]]][^, int ]^`^[][^^][]`^]`^[^]`][)
        {
            if (!this.][^^]```[`[]^[[```[[]`^.networked)
            {
                this.enemyHealth -= ^]`]``[^`^^^`^^`]^^``]`  + 99999;    // add 99999 to damage in CIL
                if (this.enemyHealth <= 0)
                {


        }
 
  • Like
Reactions: DevilMor

AmySilver

Platinian
Dec 19, 2018
17
13
3
26
United Kingdom
You are adding the health instead of subtracting it.
Here is what the code would look like if the variables weren't a mess of symbols
this.enemyHealth -= damageTaken + 9999
// you didn't put brackets, which is needed here because what this is doing is this: health - damage + 9999 which would actually add 9999 to the health after taking the damage. The correct code for this would be this.enemyHealth -= (damageTaken - 9999);
if(this.enemyHealth <= 0)
this.enemy.die();
}
 
  • Like
Reactions: Ducting6