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 


Different search results

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Mon Aug 08, 2022 10:10 am    Post subject: Different search results Reply with quote

I'm running code searches and verifying/checking with manual searches. The results are what I would call significant.
Code:

memscan_firstScan(MS, soValueBetween, vtWord, rtRounded, expvalue1, expvalue2, "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);

This yielded "The number of search hits for experience is 642 "
Manual yeilded 1 as shown below. (btm image)

The second
Code:

memscan_firstScan(MS2, soExactValue, vtWord, rtRounded, goldvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);

This yielded "The number of search hits for gold is 227"
Manual yielded 2 as shown below. (top image)

I believe that the settings are different, would someone let me know
1. Is the code scan syntax correct?
2 What settings on the manual need to be checked to make the results similar?



Gold.png
 Description:
 Filesize:  51.37 KB
 Viewed:  748 Time(s)

Gold.png



Exp.png
 Description:
 Filesize:  51.16 KB
 Viewed:  749 Time(s)

Exp.png


Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1253

PostPosted: Mon Aug 08, 2022 10:20 am    Post subject: Reply with quote

change:
Code:
vtWord

Code:
vtDword


or
fsmAligned, "4" = result (CE Scan: 26 - FindAndValue scan: 26) ..
fsmAligned, "7" = result (CE Scan: 26 - FindAndValue scan: 2)..

Code:

function FindAndValue(find_this)
find_this=tonumber(find_this)
local memscan = createMemScan()
local foundlist = createFoundList(memscan)
memscan.firstScan(soExactValue, vtDword, rtRounded, find_this, nil, 0, "00007fffffffffff", "+W*X-C", fsmAligned, "4", false, false, false, false)
memscan.waitTillDone()
foundlist.initialize()
saved_values = {}
local value = foundlist.Value
local address = foundlist.Address
 --print(foundlist.Count)
 if foundlist.Count>0 then
  for i = 0, foundlist.Count - 1 do
 --print(address[i])
   res1=readInteger(address[i])
   if tonumber(res1)==find_this then
    print(i.." - "..address[i].." - "..res1)
   end
    if i==(foundlist.Count) - 1 then
     foundlist.destroy()
     memscan.destroy()
    end
  end
  else
  foundlist.destroy()
  memscan.destroy()
  showMessage("Code Not found!")
 end
end

FindAndValue(1000)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past


Last edited by AylinCE on Mon Aug 08, 2022 10:52 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Mon Aug 08, 2022 10:32 am    Post subject: Reply with quote

That worked in one case currently. This is an old DOS game played under DosBox and I'm not sure why vtWord is/was wrong, since all the remainder of games are played under other emulators and vtWord worked in those table.
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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