View previous topic :: View next topic |
Author |
Message |
!BEWARE! !BEWARE! Deletes post on answer Reputation: 0
Joined: 26 Jun 2013 Posts: 56 Location: !BEWARE!
|
Posted: Sat Sep 18, 2021 7:09 am Post subject: LUA server detector -alert |
|
|
Im looking for something like alert when someone create server.
In Parsec app people streaming games but you need all the time looking and reloading list to catch specific game.
I would like automatic this process. The idea is:
CE will be making for every few seconds "New Scan" in looking for "Hellish Quart" string. If someone make server with this game CE should detect new text string and this is alert which I am looking for.
Im tried to find simillar working LUA but without results.
Could somebody help me with creating it?
Its how look when someone host this game. Values are dynamic and jumping after every list reload
|
|
Back to top |
|
|
Birdi Expert Cheater Reputation: 0
Joined: 08 Jun 2020 Posts: 122 Location: Migrating
|
Posted: Sat Sep 18, 2021 4:07 pm Post subject: |
|
|
Considering the string is written out in bytes, just use an AOBscan to find any instances of it, then do what you want when it's found; a lua pop-up alert for yourself? Not sure the end goal here.
_________________
Trying to learn!
Add me on Discord if you want hands-on help: Birdi#0007 |
|
Back to top |
|
|
!BEWARE! !BEWARE! Deletes post on answer Reputation: 0
Joined: 26 Jun 2013 Posts: 56 Location: !BEWARE!
|
Posted: Sun Sep 19, 2021 2:02 am Post subject: |
|
|
Will try describe more precislly
On this pic we see how looks hosting games. Three players hosting Cuphead. When Parsec app detecting supported game, then automaticly adding pic and name marks. So this is anchor point, a constantly repeating thing.
We want detecting only specific games, in this example Cuphead.
So when w throw "Cuphead" string to CheatEngine we get 3 results = 3 servers.
In picture we see yellow cover of Cuphead is faded. Thats mean game is full and started. So we waiting for another, fourth host of this game. When its become we get 4 results.
And now we are back to CheatEngine. We want detecting new servers of this game. And my idea looks like:
1. CE auto scaning for every 10 seconds and repeating this process in looking for Cuphead string or bytes
2. When scaning results growing +1 thats mean someone host new game. When -1 someone ended.
3. We are looking for grownig results, so when it up. I want getting alert (a short beep or notification in tray)
And thats it. I hope wrote it clearly enough. Now needing help with creating LUA script which will be contains it
|
|
Back to top |
|
|
Skyrimfus Cheater Reputation: 1
Joined: 17 Mar 2016 Posts: 42
|
Posted: Sun Sep 19, 2021 4:20 am Post subject: |
|
|
Code: |
utf16 = false
str = "Cuphead"
count = 0
bt = utf16 and wideStringToByteTable(str) or stringToByteTable(str)
if tm then tm.destroy() end
tm = createTimer()
tm.Interval = 10000
tm.OnTimer = function()
t = AOBScan(table.unpack(bt))
if t==nil then return end
if t.Count > count then
count = t.Count
executeCodeLocalEx("Beep",800,200)
end
t.destroy()
end
|
This will beep if the aob scan result count is greater than the last one
Edit:made some mistakes, now it's fixed
|
|
Back to top |
|
|
!BEWARE! !BEWARE! Deletes post on answer Reputation: 0
Joined: 26 Jun 2013 Posts: 56 Location: !BEWARE!
|
Posted: Sun Sep 19, 2021 5:36 am Post subject: |
|
|
Thank you. Already tested and works pretty good.
But found "false flag"
Cuphead with < " > making false alarm
Cuphead with < . > is a good one
00 Byte is not readed as dot in string so i dont know how to correct
Wanna also ask about mechanical structure:
When count is 5 and then drop to 3 next grow to 4. So this four will be detected or script waiting for greater than 5?
|
|
Back to top |
|
|
|