We're giving away Borderlands 3 gift key. Click here!

Help for ProgressBar ..

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
SSurfer
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Jan 30, 2019 2:22 am
Reputation: 0

Help for ProgressBar ..

Post by SSurfer » Wed Jan 30, 2019 2:42 am

hi..
There are more than 30 code combination buttons.
Instead of processing a value for all: in a single code,
How do I make the ProgressBar active and max? :cry:

Could you please give an example with the following codes
Thanks in advance for your answers and ideas.

Code: Select all

----------------------------------------- 1
function DEC_HEX(IN)
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
   if IN<1 then
  OUT=0
  return OUT
   end
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),math.fmod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
-------------------------------------------------- 2
function Aobswap(search, change)
   aobs = AOBScan(search)
   if(aobs ~= nil) then
   j = stringlist_getCount(aobs)
   for i = 1, j do
   address=stringlist_getString(aobs,i-1)
   for i = 1, string.len(change), 3 do
   z = string.sub(change, i, i+2)
   x, y = string.find(z, "%?+")
   if (x == nil) then
   script=[[
   ]]..address.."+"..(DEC_HEX((i-1)/3))..[[:
   db ]]..z..[[
   ]]
   autoAssemble(script)
   end
   end
   end
   object_destroy(aobs);
   aobs=nil
end
end
-----------------------------------------------------------
function byteTableToAobString(t)
  for k,v in ipairs(t) do
    t[k] = ('%02X'):format(v)
  end
  return table.concat(t, ' ')
end
-------------------------------------------------- 3
function search()
  if not initializeSearch() then return end

  local a,b=SearchSendCommand('status aobs')
  return tonumber(b) or 0
end

function change()
  if not initializeChange() then return end

  local a,b=ChangeSendCommand('status Aobswap')
  return tonumber(b) or 0
end
-----------------------------------------------------
progressTimer = createTimer(nil,false)
progressTimer.Interval = 10
progressTimer.OnTimer = function ()
  UDF1.CEProgressbar1.Position = Aobswap(search)
  UDF1.CEProgressbar1.Max = Aobswap(change)
end
----------------------------------------------------- 4


function CEButton1Click(sender)
progressTimer.Enabled = true
codescan1 = 'A0 86 01'

Aobswap(codescan1,('B0 86 01'))
progressTimer.Enabled = false
end

User avatar
FreeER
RCE Fanatics
RCE Fanatics
Posts: 148
Joined: Fri Mar 10, 2017 7:11 pm
Reputation: 17

Re: Help for ProgressBar ..

Post by FreeER » Thu Jun 20, 2019 1:45 pm

use the more complicated memscan object that lets you give it a progress bar?

Post Reply

Who is online

Users browsing this forum: Google [Bot]