Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


need help Modifying .dll using script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Nytonyx
How do I cheat?
Reputation: 0

Joined: 27 Jan 2020
Posts: 1

PostPosted: Mon Jan 27, 2020 10:03 am    Post subject: need help Modifying .dll using script Reply with quote

Hello! This is my first post on the Forums, although I've been around for a bit.
Hopefully this is in the right place, and if there is a format (of which I could not find for General Gamehacking),
I apologize for being in the incorrect format.

I've run into a bit of a speed-bump.
Basically I need to figure out how I can write this:

Code:

this.w_gen.room_data[z, l, m].room_activated_time = 0f;
this.w_gen.room_data[z, l, m].I_was_There = true;


into this using Cheat Engines' Auto-Assembler. :


(THIS INFO COMES FROM Assembly_cSharp.dll)
Code:

        private void repaint(int z)
   {
      if (z != this.last_z)
      {
         this.last_z = z;
         this.clr_index = new byte[this.rooms.GetLength(0), this.rooms.GetLength(1)];
         for (int i = 0; i < this.rooms.GetLength(0); i++)
         {
            for (int j = 0; j < this.rooms.GetLength(1); j++)
            {
               this.rooms[i, j].enabled = true;
            }
         }
         if (WorldGen_v3.IsCoopMode)
         {
            for (int k = 0; k < this.icons_floors_cont.Length; k++)
            {
               this.icons_floors_cont[k].gameObject.SetActive(k == this.last_z);
            }
         }
      }
      if (z >= 0 && z < EzDataManager.Instance.World_Z)
      {
         for (int l = 0; l < this.rooms.GetLength(0); l++)
         {
            for (int m = 0; m < this.rooms.GetLength(1); m++)
            {
--   would go here      this.w_gen.room_data[z, l, m].room_activated_time = 0f;
--   would go here       this.w_gen.room_data[z, l, m].I_was_There = true;
               if (this.clr_index[l, m] < 100)
               {
                  this.block.Clear();
                  if (!this.w_gen.room_data[z, l, m].exist)
                  {
                     this.block.SetFloat("_Box_Offset_X", 0f);
                     this.block.SetFloat("_Box_Offset_Y", -0.25f);
                     this.block.SetFloat("_Room_Mode", 0f);
                     this.rooms[l, m].SetPropertyBlock(this.block);
                     this.clr_index[l, m] = 100;
                  }
                  else
                  {
                     if (Time.time > this.w_gen.room_data[z, l, m].room_activated_time && this.w_gen.room_data[z, l, m].I_was_There)
                     {
                        this.block.SetFloat("_Box_Offset_X", (float)this.w_gen.room_data[z, l, m].room_type_metka * 0.125f);
                     }
                     this.block.SetFloat("_Box_Offset_Y", (float)this.w_gen.room_data[z, l, m].metka_num * 0.25f - 0.25f);
                     if (this.clr_index[l, m] != 100 && Time.time > this.w_gen.room_data[z, l, m].Start_Time)
                     {
                        if (this.w_gen.room_data[z, l, m].End_Time - Time.time < 10f)
                        {
                           this.block.SetFloat("_In_Zone", (0.5f + (1f + Mathf.Sin(Time.time * 4f)) * 0.25f) * Mathf.Clamp01((Time.time - this.w_gen.room_data[z, l, m].Start_Time) / (this.w_gen.room_data[z, l, m].End_Time - this.w_gen.room_data[z, l, m].Start_Time)));
                        }
                        else
                        {
                           this.block.SetFloat("_In_Zone", Mathf.Clamp01((Time.time - this.w_gen.room_data[z, l, m].Start_Time) / (this.w_gen.room_data[z, l, m].End_Time - this.w_gen.room_data[z, l, m].Start_Time)));
                        }
                        if (Time.time > this.w_gen.room_data[z, l, m].End_Time && this.clr_index[l, m] != 100)
                        {
                           this.rooms[l, m].enabled = false;
                           this.clr_index[l, m] = 100;
                        }
                     }
                     if (this.w_gen.room_data[z, l, m].I_was_There)
                     {
                        this.block.SetFloat("_Room_Mode", 2f);
                        this.rooms[l, m].SetPropertyBlock(this.block);
                        this.clr_index[l, m] = 0;
                     }
                     else
                     {
                        this.block.SetFloat("_Room_Mode", 1f);
                        this.rooms[l, m].SetPropertyBlock(this.block);
                        this.clr_index[l, m] = 1;
                     }
                  }
               }
            }
         }
      }
   }


I'm looking to make this "Cheat" a toggleable script instead of making it a persistent cheat by using something like a .NET viewer (or whatever they're called)

OTHER INFO:

Will provide opcodes if needed!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites