Hackers House Last seen recently
Hello, How can we help you?

# valuefromclass()

    -- 1 = Developer mode
    -- 2 = user mode
    userMode = 2 
    
    valueFromClass(
                   "PlayerController",
                   "0x148", 
                   false, 
                   false, 
                   gg.TYPE_DWORD)
    gg.getResults(9999)
    gg.editAll(99999, gg.TYPE_DWORD)
  
Copy

# Introduction :

This is a function provided my field offset finder. Field offset finder is a mannual test tool , but if you find an appropirate value and now want to automate finding the value and edit it then feild offset finder also has the scripting mode.

# How to use :

You should download the code then open the code and edit userMode = 2 then only the script will open on user mode. Remember the field offet finder manual test and script mode are the same script. By default it is in developer mode but if you edit the code and change 1 to 2 then it becomes usermode with complete menu that comes prebuild with the script.

   -- 5 parameters
    valueFromClass(
                   "PlayerController",
                   "0x148", 
                   false, 
                   false, 
                   gg.TYPE_DWORD)
    
    -- 6 parameters      
    valueFromClass(
                   "PlayerController", 
                   "0xD8", 
                   false, 
                   true, 
                   gg.TYPE_DWORD, 
                   {'Struct', "0x4"})     
                  
Copy

The ValueFromClass function will search the value location in ram using class name and offset as input. There can be 5 or six parameters that needs to be passed. First is classname which is a string, second is offset which is also passed as a string but in hex formatting, third value is bool so you have to give either true or false, true means try harder and false means normal mode, then the fourth parameter is also boolean if its true it works for 32 bit games and apps and if false works for 64 bit games. The fifth is the value type of the feild you are searching. Supported are :

  -- These are the types you 
  -- can pass to the script
  -- It is case sensitive

    gg.TYPE_BYTE for Byte / Boolean
    gg.TYPE_DWORD for Dword / 32 bit Int
    gg.TYPE_QWORD for Qword / 64 bit Int
    gg.TYPE_FLOAT for Float
    gg.TYPE_DOUBLE for Double
    Vector2
    Vector2Int
    Vector3
    Vector3Int
    Vector4
    Vector4Int
    String
    Bounds
    BoundsInt
    Matrix2x3
    Matrix4x4
    Color
    Color32
    Quaternion
  

There can also be a sixth parameter which is a table containing, search mode and offset. Can can either pass this or not its your choice. If you pass only 5 parameter then the script will think you wanna use the basic class mode and runs that. But if you want to use struct search mode or child class search mode then you have to add 6th parameter, which will be written like this.

   
    -- Struct Search Mode      
    valueFromClass(
                   "PlayerController", 
                   "0xD8", 
                   false, 
                   true, 
                   gg.TYPE_DWORD, 
                   {'Struct', "0x4"})    
    
    -- Child class search mode
    valueFromClass(
                   "GameController", 
                   "0x28", 
                   false, 
                   true, 
                   gg.TYPE_FLOAT, 
                   {'ChildClass', "0x70"})
                  
Copy

# Switch Off :

      -- 1 = Developer mode
      -- 2 = user mode
      userMode = 2 
      
      valueFromClass(
                     "PlayerController",
                     "0x148", 
                     false, 
                     false, 
                     gg.TYPE_DWORD)
      gg.getResults(9999)

      -- You have to mannually
      -- edit the value to old value
      -- for switching off the cheat
      gg.editAll(1, gg.TYPE_DWORD)
  
Copy

# Examples :

The commented code is an example of feilds you will find in dump.cs. And the code below that shows how to modify the value of feild.

    --public class PlayerController
    -- : MonoBehaviour // TypeDefIndex: 4129
      --{
        -- Fields
        -- public int coin; // 0x18
      --}
        -- 1 = Developer mode
        -- 2 = user mode
        userMode = 2 
        
        valueFromClass(
                       "PlayerController",
                       "0x18", 
                       false, 
                       false, 
                       gg.TYPE_DWORD)
        gg.getResults(9999)
        gg.editAll(99999, gg.TYPE_DWORD)
      
Copy

# These topics might be interesting to you.