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 


How to scan the second function (mono)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 56

PostPosted: Fri Feb 19, 2021 7:13 pm    Post subject: How to scan the second function (mono) Reply with quote

Four functions with the same name


20210205134234.jpg
 Description:
 Filesize:  151.2 KB
 Viewed:  841 Time(s)

20210205134234.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25803
Location: The netherlands

PostPosted: Fri Feb 19, 2021 8:41 pm    Post subject: Reply with quote

you can use
Code:

LaunchMonoDataCollector()

function GetMethods(ImageName,ClassName,MethodName)
  local result={}
  local assemblies=mono_enumAssemblies()
  if assemblies then
    local i
    for i=1,#assemblies do
      local image=mono_getImageFromAssembly(assemblies[i])
      if image and mono_image_get_name(image)==ImageName then
        local classes=mono_image_enumClasses(image)
        if classes then
          local j
          for j=1,#classes do
            local class=classes[j].class
            local classname=mono_class_getName(class)
            if classname==ClassName then
              local methods=mono_class_enumMethods(class)
              local j
              for k=1,#methods do
                if methods[k].name==MethodName then
                  local r={}
                  r.signature, r.parameters, r.ret=mono_method_getSignature(methods[k].method)
                  r.method=methods[k].method
                  table.insert(result,r)
                end
              end
            end
          end
        end
      end
    end
  end

  return result;
end


to get a list of methods with this name and their signature

then you can go through that list to find the one you need

I recommend first printing out the results so you know what to search for
Code:

r=GetMethods('assembly_valheim','Inventory','AddItem')
for i=1,#r do
  print(r[i].signature)
end

(it's probably "ItemDrop/ItemData")

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
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