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 


speed hack, it does not work in cetrainer [DaSpamer trainer]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
facecheats
Newbie cheater
Reputation: 0

Joined: 12 Jul 2015
Posts: 20

PostPosted: Thu Mar 10, 2016 8:12 pm    Post subject: speed hack, it does not work in cetrainer [DaSpamer trainer] Reply with quote

HELP

the game does not pause in chrome and OPERA.EXE browsers


Code:
  function CreateTrainer()
     local HackData = {};
    function HackData:HacksData()

 self.trainer.form.Caption =  [[ Kings Road Hack  ]]
      self.trainer.title.Caption = [[Kings Road Hack  ]]
      self.trainer.credits.Caption = [[  ]]
      self.hacktable =    {



{'Pause',[[
luacall(speedhack_setSpeed(0))
 ]],[[  ]],[[]], 'false'} ,





{'Anti Cheats',[[Luacall(Aobswap("D0 30 26 5E ?? ?? 2B 61 ?? ?? 5D ?? ?? 2C ?? ?? D1 D2 20 26 4F ?? ?? 05 47 00 00 ?? ?? ?? ?? ?? ?? 06 D0 30 60","D0 30 27 5E ?? ?? 2B 61 ?? ?? 47 ?? ?? 2C ?? ?? D1 D2 20 26 4F ?? ?? 05 47 00 00 ?? ?? ?? ?? ?? ?? 06 D0 30 27 48"))
Luacall(Aobswap("00 60 ?? ?? 60 ?? ?? A1 75 2A 63", "00 60 ?? ?? 2A 02 02 A1 75 2A 63"))
Luacall(Aobswap("25 ?? ?? 24 00 4A ?? 02 5E ?? 2B", "25 ?? ?? 24 01"))
Luacall(Aobswap("46 ?? ?? 00 12 06 00 00 ?? ?? 4F ?? ?? ?? ?? ?? D2","29 47 02 02"))

 



{'Play',[[luacall(speedhack_setSpeed(1))]],[[  ]],[[]], 'false'}



                  };
   for i=1,#self.hacktable do
      strings_add(self.listitems, self.hacktable[i][1]);
      self.hackstatus[i] = false;
   end
end
function HackData:Info()
   self.activateall = false; -- State.
   self.hackstatus = {};
   self.trainer = {};
   self.trainer.form = createForm(false);
   self.trainer.form.onClose = function (sender) sender.hide(); closeCE(); end;
   self.trainer.form.width = 400;
   self.trainer.form.height = 300;
   setProperty(self.trainer.form, 'Position', 'poScreenCenter');
   setProperty(self.trainer.form, 'BorderIcons', '[biSystemMenu]');
   setProperty(self.trainer.form, 'BiDiMode', 'bdLeftToRight');
   self.trainer.credits = createLabel(self.trainer.form);
   self.trainer.title = createLabel(self.trainer.form);
   local FontHeight = getProperty(self.trainer.title, 'Font');
   setProperty(FontHeight , 'Color', 0x000000FE);
   setProperty(FontHeight , 'Style', '[fsBold]');
   setProperty(FontHeight , 'Height', '20');
   self.trainer.group = createGroupBox(self.trainer.form);
   self.trainer.subtitle = createLabel(self.trainer.group);
   local FontHeight = getProperty(self.trainer.subtitle, 'Font');
   setProperty(FontHeight , 'Color', 0x00007F00);
   setProperty(FontHeight , 'Style', '[fsBold]');
   setProperty(FontHeight , 'Height', '16');
   self.trainer.desctitle = createLabel(self.trainer.group);
   local FontHeight = getProperty(self.trainer.desctitle, 'Font');
   setProperty(FontHeight , 'Color', 0x00F21200);
   self.trainer.desc = createLabel(self.trainer.group);
   self.trainer.list = createListBox(self.trainer.group);
   self.trainer.enable = createButton(self.trainer.group);
   self.trainer.enableall = createButton(self.trainer.group);
   local x,y = control_getSize(self.trainer.form);
   self.trainer.credits.left = 5;
   self.trainer.credits.top = y - 17;
   self.trainer.title.left = 10;
   self.trainer.title.top = 2.5;
   self.trainer.group.width = math.floor(x * 0.965);
   self.trainer.group.height = math.floor(y * 0.85);
   self.trainer.group.left = 5;
   self.trainer.group.top = math.floor((y * 1.095) - y);
   self.trainer.group.caption = 'Hacks';
   self.trainer.subtitle.left = 5;
   self.trainer.subtitle.top = 0;
   self.trainer.subtitle.caption = 'Select an hack from the list, then press enable!';
   local x,y = control_getSize(self.trainer.group);
   self.trainer.list.width = math.floor((x * 0.75) - 6);
   self.trainer.list.height = 64;
   self.trainer.list.left = 5;
   self.trainer.list.top = 20;
   local x,y = control_getSize(self.trainer.list);
   self.trainer.enable.width = math.floor((x * 0.34)-6);
   self.trainer.enable.height = 32;
   self.trainer.enable.left = x + 6;
   self.trainer.enable.top = 19;
   self.trainer.enable.caption = 'Enable';
   self.trainer.enable.onClick = function (sender) self:ActivateHack(sender) end;
   self.trainer.enableall.width = math.floor((x * 0.34)-6);
   self.trainer.enableall.height = 32;
   self.trainer.enableall.left = x + 6;
   self.trainer.enableall.top = 53;
   self.trainer.enableall.caption = 'Enable all';
   self.trainer.enableall.onClick = function (sender) self:ActivateAllHacks(sender) end;
   self.trainer.desctitle.left = 5;
   self.trainer.desctitle.top = y + 20;
   self.trainer.desctitle.caption = 'Selected hack description :';
   self.trainer.desc.left = 5;
   self.trainer.desc.top = y + 35;
   self.trainer.desc.caption = 'No hack was selected...';
   self.listitems = self.trainer.list.getItems();
   HackData:HacksData();
   setMethodProperty(self.trainer.list, 'OnSelectionChange', function () HackData:ChangeDesc() end)
   self.trainer.form.show();
end
function HackData:ActivateAllHacks(sender)
   self.activateall = true;
   for i = 0, #self.hacktable do
      i = i-1
      self.trainer.list.ItemIndex = i
      HackData:ActivateHack()
   end
   self.activateall = false;
end
function HackData:ActivateHack(sender)
   self.listitems = self.trainer.list.getItems();
   local index = self.trainer.list.ItemIndex + 1;
   if (index == 0 or self.hacktable[index] == nil) then
      return;
   end
   if (self.hackstatus[index] == false) then
      if (type(self.hacktable[index][2])=='string') then
         local asm = autoAssemble(self.hacktable[index][2]);
         if (asm == true) then
            if (AobSwapCheck~=true and AobSwapCheck~=nil) then
               AobSwapCheck=nil;
               if self.activateall == false then
                  return showMessage('Hack failed to enable!');
               else
                  return
               end
            end
            AobSwapCheck=nil;
            if self.activateall == false then
               if (self.hacktable[index][4]~='' and self.hacktable[index][4]~= nil) then
                  showMessage(self.hacktable[index][4]);
               else
                  showMessage('Hack was enabled successfully!');
               end
            end
            local str = strings_getString(self.listitems, index - 1);
            strings_setString( self.listitems, index - 1, str .. ' - Enabled!' );
            self.hackstatus[index] = true;
            HackData:ChangeDesc()
         else
            if self.activateall == false then
               return showMessage('Hack failed to enable!');
            else
               return
            end
         end
      end
   elseif (self.hackstatus[index] == true and (self.hacktable[index][5] == true or self.hacktable[index][5] == 'true') and self.activateall == false) then
      if (type(self.hacktable[index][6])=='string') then
         local asm = autoAssemble(self.hacktable[index][6]);
         if (asm == true) then
            if (AobSwapCheck~=true and AobSwapCheck~=nil) then
               AobSwapCheck=nil;
               return showMessage('Hack failed to enable!');
            end
            AobSwapCheck=nil;
            if (self.hacktable[index][7]~='' and self.hacktable[index][7]~= nil) then
               showMessage(self.hacktable[index][7]);
            else
               showMessage('Hack was disabled successfully!');
            end
            strings_setString( self.listitems, index - 1, self.hacktable[index][1] );
            self.hackstatus[index] = false;
         else
            return showMessage('Hack failed to disable!');
         end
      end
   end
   HackData:ChangeDesc();
end
function HackData:ChangeDesc(sender)
   local index = self.trainer.list.ItemIndex + 1
   if (index == 0 or self.hacktable[index] == nil) then
      return
   end
   if (self.hacktable[index][3] ~= '' and self.hacktable[index][3] ~= nil) then
      self.trainer.desc.caption = self.hacktable[index][3];
   else
      self.trainer.desc.caption = "There's no descriptions available about this hack";
   end
   if (self.hackstatus[index] == true and (self.hacktable[index][5] == false or self.hacktable[index][5] == 'false')) then
      self.trainer.enableall.Enabled = false;
      self.trainer.enable.Enabled = false;
   elseif (self.hackstatus[index] == true and (self.hacktable[index][5] == true or self.hacktable[index][5] == 'true')) then
      self.trainer.enableall.Enabled = false;
      self.trainer.enable.Enabled = true;
      self.trainer.enable.Caption = 'Disable';
   else
      self.trainer.enableall.Enabled = true;
      self.trainer.enable.Enabled = true;
      self.trainer.enable.Caption = 'Enable';
   end
end
HackData:Info()
end
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.mod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
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 AobswapC(search, change)
   aobs = AOBScan(search)
   if(aobs == nil) then AobSwapCheck=false else
   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
   AobSwapCheck=true
  end
end
InformationText="Before you continue!\nPlease attach to your game process, Using the attach list\n\nPlease note that you must to attach to right process of your game.\nElse the hack(s) won't work\n\nUpon successful attach the 'Continue' button will be available"
AttachFirst     = {}
AttachFirst[1]  = createForm(false)
AttachFirst[2]  = createPanel(AttachFirst[1])
AttachFirst[3]  = createButton(AttachFirst[2])
AttachFirst[4]  = createLabel(AttachFirst[2])
AttachFirst[5]  = createGroupBox(AttachFirst[2])
AttachFirst[6]  = createLabel(AttachFirst[5])
AttachFirst[7]  = createLabel(AttachFirst[5])
AttachFirst[9]  = createLabel(AttachFirst[5])
AttachFirst[10] = createComboBox(AttachFirst[5])
AttachFirst[12] = createButton(AttachFirst[5])
AttachFirst[13] = createLabel(AttachFirst[2])
setProperty(AttachFirst[1] , "Position", "poScreenCenter")
setProperty(AttachFirst[1] , "BorderIcons", "[biSystemMenu]")
setProperty(AttachFirst[1] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[2] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[2] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[10] , "ReadOnly", "True")
local FontHeight = getProperty(AttachFirst[4] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "17")
local FontHeight = getProperty(AttachFirst[5] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
--
local FontHeight = getProperty(AttachFirst[6] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "14")
local FontHeight = getProperty(AttachFirst[7] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
local FontHeight = getProperty(AttachFirst[9] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "14")
local FontHeight = getProperty(AttachFirst[7] , "Font")
setProperty(FontHeight , "Color", 0x000000FE)
setProperty(FontHeight , "Color", 0x000000FE)
local FontHeight = getProperty(AttachFirst[9] , "Font")
setProperty(FontHeight , "Color", 0x00007F00)
--
local FontHeight = getProperty(AttachFirst[10] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
local FontHeight = getProperty(AttachFirst[12] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
setProperty(AttachFirst[13], "Cursor", "-21")
local FontHeight = getProperty(AttachFirst[13] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "20")
setProperty(FontHeight , "Color", 0x00800180)
--
control_setEnabled(AttachFirst[3], false)
control_setSize(AttachFirst[1], 385, 250)
x,y = control_getSize(AttachFirst[1])
control_setSize(AttachFirst[2], x,y)
control_setSize(AttachFirst[3], 75,25)
control_setSize(AttachFirst[5], 375,190)
control_setSize(AttachFirst[10], 205,21)
control_setSize(AttachFirst[12], 79,45)
control_setPosition(AttachFirst[3], 303,219)
control_setPosition(AttachFirst[4], 5,5)
control_setPosition(AttachFirst[5], 5,25)
control_setPosition(AttachFirst[6], 5,0)
control_setPosition(AttachFirst[7], 5,110)
control_setPosition(AttachFirst[9], 5,150)
control_setPosition(AttachFirst[10], 75,108)
control_setPosition(AttachFirst[12], 287,97)
control_setPosition(AttachFirst[13], 5,219)
control_setCaption(AttachFirst[1],"Attaching Form!")
control_setCaption(AttachFirst[3],"Continue")
control_setCaption(AttachFirst[4],"One moment...")
control_setCaption(AttachFirst[5],"Attaching")
control_setCaption(AttachFirst[6],InformationText)
control_setCaption(AttachFirst[7],"Process list")
control_setCaption(AttachFirst[9],"Currently attached to PID: ")
control_setCaption(AttachFirst[12],"Attach")
control_setCaption(AttachFirst[13]," ")
al = combobox_getItems(AttachFirst[10])
strings_clear(al)
function OpenFlashacking()
shellExecute(" ")
end
strings_add(al, 'Pick a processor....')
strings_add(al, 'Chrome.exe')
strings_add(al, 'Bul-Dozer Browser')
strings_add(al, 'FlashPlayerPlugin')
strings_add(al, 'Opera.exe')
strings_add(al, 'Plugin-Container.exe')
strings_add(al, 'Iexplorer.exe')
setProperty(AttachFirst[10] , "ItemIndex", "0")
success = 1
process = "chrome.exe"
errorOnLookupFailure(false);
function ResetChrome()
   success = 0
   local test = openProcess("chrome.exe") if test ==nil then showMessage("Chrome was not found!!"); timer_setEnabled(openNextProcTimer,false); return end
   strings_add(getAutoAttachList(),process)
   timer_setEnabled(openNextProcTimer,true)
end
function enableCheatsGuiWhatEver()
   local PID=getOpenedProcessID()
   control_setCaption(AttachFirst[1],"Attaching Form!")
   control_setEnabled(AttachFirst[3], true)
   control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
   success = 1
   showMessage("Attached successfully!")
end
function checkProcessMajor()
   reinitializeSymbolhandler()
   if getAddress("pepflashplayer.dll")~=0 or
      getAddress("AdobeCPGetAPI")     ~=0 then
      return true
   end
   return false
end
alreadycheckedPIDS={}
openNextProcTimer = createTimer(nil,false)
timer_setInterval(openNextProcTimer, 1000)
timer_onTimer(openNextProcTimer,
function (sender)
   local tempPIDtable = getPids()
   if #tempPIDtable == 0 then return end
   timer_setEnabled(sender,false)
   openProcess(tempPIDtable[1])
end
)
function getPids()
   local SL=createStringlist()
   getProcesslist(SL)
   local tempPIDtable={}
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
      if processname == process then
         if alreadycheckedPIDS[PID]~=true then
            table.insert(tempPIDtable,PID)
         end
      end
   end
   object_destroy(SL)
   return tempPIDtable
end
function checkProcess(sender)
   timer_setEnabled(sender,false)
   alreadycheckedPIDS[getOpenedProcessID()]=true
   if checkProcessMajor() then
      timer_setEnabled(openNextProcTimer,false)
      alreadycheckedPIDS={}
      enableCheatsGuiWhatEver()
   else
      timer_setEnabled(openNextProcTimer,true)
   end
end
function onOpenProcess()
   if success == 1 then return end
   timer_setEnabled(checkProcessTimer,true)
end
checkProcessTimer = createTimer(nil,false)
timer_setInterval(checkProcessTimer, 100)
timer_onTimer(checkProcessTimer, checkProcess)
function AttachToChrome()
   control_setCaption(AttachFirst[1],"Attaching Form! - Please wait searching for the process...")
   ResetChrome()
end
function AttachList()
   AttachItems = combobox_getItems(AttachFirst[10])
   AttachIndex = combobox_getItemIndex(AttachFirst[10])
   if AttachIndex == -1 then return end
   if AttachIndex == 0 then return showMessage("Please pick a process from the list") end
   if strings_getString(AttachItems,AttachIndex)=='chrome.exe' then return AttachToChrome() end
   openProcess(strings_getString(AttachItems,AttachIndex))
   errorOnLookupFailure(false)
   reinitializeSymbolhandler()
   err=getAddress("kernel32.dll")==0
   if err==true then
      showMessage("Couldn't find the process")
   else
      local PID=getOpenedProcessID()
      control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
      control_setEnabled(AttachFirst[3], true)
      showMessage("Attached successfully!")
   end
end
function AttachClose()
   closeCE()
end
function ExecuteHack()
   CreateTrainer()
   form_hide(AttachFirst[1])
end
control_onClick(AttachFirst[3], ExecuteHack)
control_onClick(AttachFirst[12],AttachList)
form_onClose(AttachFirst[1],AttachClose)
control_onClick(AttachFirst[13],OpenFlashacking)
setProperty(AttachFirst[1] , "ShowInTaskBar", "stAlways")
form_show(AttachFirst[1])



_________________
dved rvrdv vrevr rvrve
Back to top
View user's profile Send private message
Fluffer_Nutter
Advanced Cheater
Reputation: 0

Joined: 26 Feb 2015
Posts: 67

PostPosted: Thu Mar 10, 2016 8:27 pm    Post subject: Reply with quote

To pause the game it is pause() and unpause(). Not all games allow the speedhack to hook.
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Fri Mar 11, 2016 2:18 am    Post subject: Reply with quote

or run the chrome/opera browser with --no-sandbox parameter.
_________________
...
Back to top
View user's profile Send private message
BobiPriest
How do I cheat?
Reputation: 0

Joined: 30 Apr 2016
Posts: 5

PostPosted: Mon May 02, 2016 11:11 am    Post subject: Re: speed hack, it does not work in cetrainer [DaSpamer trai Reply with quote

facecheats wrote:
HELP

the game does not pause in chrome and OPERA.EXE browsers


Code:
  function CreateTrainer()
     local HackData = {};
    function HackData:HacksData()

 self.trainer.form.Caption =  [[ Kings Road Hack  ]]
      self.trainer.title.Caption = [[Kings Road Hack  ]]
      self.trainer.credits.Caption = [[  ]]
      self.hacktable =    {



{'Pause',[[
luacall(speedhack_setSpeed(0))
 ]],[[  ]],[[]], 'false'} ,





{'Anti Cheats',[[Luacall(Aobswap("D0 30 26 5E ?? ?? 2B 61 ?? ?? 5D ?? ?? 2C ?? ?? D1 D2 20 26 4F ?? ?? 05 47 00 00 ?? ?? ?? ?? ?? ?? 06 D0 30 60","D0 30 27 5E ?? ?? 2B 61 ?? ?? 47 ?? ?? 2C ?? ?? D1 D2 20 26 4F ?? ?? 05 47 00 00 ?? ?? ?? ?? ?? ?? 06 D0 30 27 48"))
Luacall(Aobswap("00 60 ?? ?? 60 ?? ?? A1 75 2A 63", "00 60 ?? ?? 2A 02 02 A1 75 2A 63"))
Luacall(Aobswap("25 ?? ?? 24 00 4A ?? 02 5E ?? 2B", "25 ?? ?? 24 01"))
Luacall(Aobswap("46 ?? ?? 00 12 06 00 00 ?? ?? 4F ?? ?? ?? ?? ?? D2","29 47 02 02"))

 



{'Play',[[luacall(speedhack_setSpeed(1))]],[[  ]],[[]], 'false'}



                  };
   for i=1,#self.hacktable do
      strings_add(self.listitems, self.hacktable[i][1]);
      self.hackstatus[i] = false;
   end
end
function HackData:Info()
   self.activateall = false; -- State.
   self.hackstatus = {};
   self.trainer = {};
   self.trainer.form = createForm(false);
   self.trainer.form.onClose = function (sender) sender.hide(); closeCE(); end;
   self.trainer.form.width = 400;
   self.trainer.form.height = 300;
   setProperty(self.trainer.form, 'Position', 'poScreenCenter');
   setProperty(self.trainer.form, 'BorderIcons', '[biSystemMenu]');
   setProperty(self.trainer.form, 'BiDiMode', 'bdLeftToRight');
   self.trainer.credits = createLabel(self.trainer.form);
   self.trainer.title = createLabel(self.trainer.form);
   local FontHeight = getProperty(self.trainer.title, 'Font');
   setProperty(FontHeight , 'Color', 0x000000FE);
   setProperty(FontHeight , 'Style', '[fsBold]');
   setProperty(FontHeight , 'Height', '20');
   self.trainer.group = createGroupBox(self.trainer.form);
   self.trainer.subtitle = createLabel(self.trainer.group);
   local FontHeight = getProperty(self.trainer.subtitle, 'Font');
   setProperty(FontHeight , 'Color', 0x00007F00);
   setProperty(FontHeight , 'Style', '[fsBold]');
   setProperty(FontHeight , 'Height', '16');
   self.trainer.desctitle = createLabel(self.trainer.group);
   local FontHeight = getProperty(self.trainer.desctitle, 'Font');
   setProperty(FontHeight , 'Color', 0x00F21200);
   self.trainer.desc = createLabel(self.trainer.group);
   self.trainer.list = createListBox(self.trainer.group);
   self.trainer.enable = createButton(self.trainer.group);
   self.trainer.enableall = createButton(self.trainer.group);
   local x,y = control_getSize(self.trainer.form);
   self.trainer.credits.left = 5;
   self.trainer.credits.top = y - 17;
   self.trainer.title.left = 10;
   self.trainer.title.top = 2.5;
   self.trainer.group.width = math.floor(x * 0.965);
   self.trainer.group.height = math.floor(y * 0.85);
   self.trainer.group.left = 5;
   self.trainer.group.top = math.floor((y * 1.095) - y);
   self.trainer.group.caption = 'Hacks';
   self.trainer.subtitle.left = 5;
   self.trainer.subtitle.top = 0;
   self.trainer.subtitle.caption = 'Select an hack from the list, then press enable!';
   local x,y = control_getSize(self.trainer.group);
   self.trainer.list.width = math.floor((x * 0.75) - 6);
   self.trainer.list.height = 64;
   self.trainer.list.left = 5;
   self.trainer.list.top = 20;
   local x,y = control_getSize(self.trainer.list);
   self.trainer.enable.width = math.floor((x * 0.34)-6);
   self.trainer.enable.height = 32;
   self.trainer.enable.left = x + 6;
   self.trainer.enable.top = 19;
   self.trainer.enable.caption = 'Enable';
   self.trainer.enable.onClick = function (sender) self:ActivateHack(sender) end;
   self.trainer.enableall.width = math.floor((x * 0.34)-6);
   self.trainer.enableall.height = 32;
   self.trainer.enableall.left = x + 6;
   self.trainer.enableall.top = 53;
   self.trainer.enableall.caption = 'Enable all';
   self.trainer.enableall.onClick = function (sender) self:ActivateAllHacks(sender) end;
   self.trainer.desctitle.left = 5;
   self.trainer.desctitle.top = y + 20;
   self.trainer.desctitle.caption = 'Selected hack description :';
   self.trainer.desc.left = 5;
   self.trainer.desc.top = y + 35;
   self.trainer.desc.caption = 'No hack was selected...';
   self.listitems = self.trainer.list.getItems();
   HackData:HacksData();
   setMethodProperty(self.trainer.list, 'OnSelectionChange', function () HackData:ChangeDesc() end)
   self.trainer.form.show();
end
function HackData:ActivateAllHacks(sender)
   self.activateall = true;
   for i = 0, #self.hacktable do
      i = i-1
      self.trainer.list.ItemIndex = i
      HackData:ActivateHack()
   end
   self.activateall = false;
end
function HackData:ActivateHack(sender)
   self.listitems = self.trainer.list.getItems();
   local index = self.trainer.list.ItemIndex + 1;
   if (index == 0 or self.hacktable[index] == nil) then
      return;
   end
   if (self.hackstatus[index] == false) then
      if (type(self.hacktable[index][2])=='string') then
         local asm = autoAssemble(self.hacktable[index][2]);
         if (asm == true) then
            if (AobSwapCheck~=true and AobSwapCheck~=nil) then
               AobSwapCheck=nil;
               if self.activateall == false then
                  return showMessage('Hack failed to enable!');
               else
                  return
               end
            end
            AobSwapCheck=nil;
            if self.activateall == false then
               if (self.hacktable[index][4]~='' and self.hacktable[index][4]~= nil) then
                  showMessage(self.hacktable[index][4]);
               else
                  showMessage('Hack was enabled successfully!');
               end
            end
            local str = strings_getString(self.listitems, index - 1);
            strings_setString( self.listitems, index - 1, str .. ' - Enabled!' );
            self.hackstatus[index] = true;
            HackData:ChangeDesc()
         else
            if self.activateall == false then
               return showMessage('Hack failed to enable!');
            else
               return
            end
         end
      end
   elseif (self.hackstatus[index] == true and (self.hacktable[index][5] == true or self.hacktable[index][5] == 'true') and self.activateall == false) then
      if (type(self.hacktable[index][6])=='string') then
         local asm = autoAssemble(self.hacktable[index][6]);
         if (asm == true) then
            if (AobSwapCheck~=true and AobSwapCheck~=nil) then
               AobSwapCheck=nil;
               return showMessage('Hack failed to enable!');
            end
            AobSwapCheck=nil;
            if (self.hacktable[index][7]~='' and self.hacktable[index][7]~= nil) then
               showMessage(self.hacktable[index][7]);
            else
               showMessage('Hack was disabled successfully!');
            end
            strings_setString( self.listitems, index - 1, self.hacktable[index][1] );
            self.hackstatus[index] = false;
         else
            return showMessage('Hack failed to disable!');
         end
      end
   end
   HackData:ChangeDesc();
end
function HackData:ChangeDesc(sender)
   local index = self.trainer.list.ItemIndex + 1
   if (index == 0 or self.hacktable[index] == nil) then
      return
   end
   if (self.hacktable[index][3] ~= '' and self.hacktable[index][3] ~= nil) then
      self.trainer.desc.caption = self.hacktable[index][3];
   else
      self.trainer.desc.caption = "There's no descriptions available about this hack";
   end
   if (self.hackstatus[index] == true and (self.hacktable[index][5] == false or self.hacktable[index][5] == 'false')) then
      self.trainer.enableall.Enabled = false;
      self.trainer.enable.Enabled = false;
   elseif (self.hackstatus[index] == true and (self.hacktable[index][5] == true or self.hacktable[index][5] == 'true')) then
      self.trainer.enableall.Enabled = false;
      self.trainer.enable.Enabled = true;
      self.trainer.enable.Caption = 'Disable';
   else
      self.trainer.enableall.Enabled = true;
      self.trainer.enable.Enabled = true;
      self.trainer.enable.Caption = 'Enable';
   end
end
HackData:Info()
end
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.mod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
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 AobswapC(search, change)
   aobs = AOBScan(search)
   if(aobs == nil) then AobSwapCheck=false else
   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
   AobSwapCheck=true
  end
end
InformationText="Before you continue!\nPlease attach to your game process, Using the attach list\n\nPlease note that you must to attach to right process of your game.\nElse the hack(s) won't work\n\nUpon successful attach the 'Continue' button will be available"
AttachFirst     = {}
AttachFirst[1]  = createForm(false)
AttachFirst[2]  = createPanel(AttachFirst[1])
AttachFirst[3]  = createButton(AttachFirst[2])
AttachFirst[4]  = createLabel(AttachFirst[2])
AttachFirst[5]  = createGroupBox(AttachFirst[2])
AttachFirst[6]  = createLabel(AttachFirst[5])
AttachFirst[7]  = createLabel(AttachFirst[5])
AttachFirst[9]  = createLabel(AttachFirst[5])
AttachFirst[10] = createComboBox(AttachFirst[5])
AttachFirst[12] = createButton(AttachFirst[5])
AttachFirst[13] = createLabel(AttachFirst[2])
setProperty(AttachFirst[1] , "Position", "poScreenCenter")
setProperty(AttachFirst[1] , "BorderIcons", "[biSystemMenu]")
setProperty(AttachFirst[1] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[2] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[2] , "BiDiMode", "bdLeftToRight")
setProperty(AttachFirst[10] , "ReadOnly", "True")
local FontHeight = getProperty(AttachFirst[4] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "17")
local FontHeight = getProperty(AttachFirst[5] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
--
local FontHeight = getProperty(AttachFirst[6] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "14")
local FontHeight = getProperty(AttachFirst[7] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
local FontHeight = getProperty(AttachFirst[9] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "14")
local FontHeight = getProperty(AttachFirst[7] , "Font")
setProperty(FontHeight , "Color", 0x000000FE)
setProperty(FontHeight , "Color", 0x000000FE)
local FontHeight = getProperty(AttachFirst[9] , "Font")
setProperty(FontHeight , "Color", 0x00007F00)
--
local FontHeight = getProperty(AttachFirst[10] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
local FontHeight = getProperty(AttachFirst[12] , "Font")
setProperty(FontHeight , "Style", "[]")
setProperty(FontHeight , "Height", "13")
setProperty(AttachFirst[13], "Cursor", "-21")
local FontHeight = getProperty(AttachFirst[13] , "Font")
setProperty(FontHeight , "Style", "[fsBold]")
setProperty(FontHeight , "Height", "20")
setProperty(FontHeight , "Color", 0x00800180)
--
control_setEnabled(AttachFirst[3], false)
control_setSize(AttachFirst[1], 385, 250)
x,y = control_getSize(AttachFirst[1])
control_setSize(AttachFirst[2], x,y)
control_setSize(AttachFirst[3], 75,25)
control_setSize(AttachFirst[5], 375,190)
control_setSize(AttachFirst[10], 205,21)
control_setSize(AttachFirst[12], 79,45)
control_setPosition(AttachFirst[3], 303,219)
control_setPosition(AttachFirst[4], 5,5)
control_setPosition(AttachFirst[5], 5,25)
control_setPosition(AttachFirst[6], 5,0)
control_setPosition(AttachFirst[7], 5,110)
control_setPosition(AttachFirst[9], 5,150)
control_setPosition(AttachFirst[10], 75,108)
control_setPosition(AttachFirst[12], 287,97)
control_setPosition(AttachFirst[13], 5,219)
control_setCaption(AttachFirst[1],"Attaching Form!")
control_setCaption(AttachFirst[3],"Continue")
control_setCaption(AttachFirst[4],"One moment...")
control_setCaption(AttachFirst[5],"Attaching")
control_setCaption(AttachFirst[6],InformationText)
control_setCaption(AttachFirst[7],"Process list")
control_setCaption(AttachFirst[9],"Currently attached to PID: ")
control_setCaption(AttachFirst[12],"Attach")
control_setCaption(AttachFirst[13]," ")
al = combobox_getItems(AttachFirst[10])
strings_clear(al)
function OpenFlashacking()
shellExecute(" ")
end
strings_add(al, 'Pick a processor....')
strings_add(al, 'Chrome.exe')
strings_add(al, 'Bul-Dozer Browser')
strings_add(al, 'FlashPlayerPlugin')
strings_add(al, 'Opera.exe')
strings_add(al, 'Plugin-Container.exe')
strings_add(al, 'Iexplorer.exe')
setProperty(AttachFirst[10] , "ItemIndex", "0")
success = 1
process = "chrome.exe"
errorOnLookupFailure(false);
function ResetChrome()
   success = 0
   local test = openProcess("chrome.exe") if test ==nil then showMessage("Chrome was not found!!"); timer_setEnabled(openNextProcTimer,false); return end
   strings_add(getAutoAttachList(),process)
   timer_setEnabled(openNextProcTimer,true)
end
function enableCheatsGuiWhatEver()
   local PID=getOpenedProcessID()
   control_setCaption(AttachFirst[1],"Attaching Form!")
   control_setEnabled(AttachFirst[3], true)
   control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
   success = 1
   showMessage("Attached successfully!")
end
function checkProcessMajor()
   reinitializeSymbolhandler()
   if getAddress("pepflashplayer.dll")~=0 or
      getAddress("AdobeCPGetAPI")     ~=0 then
      return true
   end
   return false
end
alreadycheckedPIDS={}
openNextProcTimer = createTimer(nil,false)
timer_setInterval(openNextProcTimer, 1000)
timer_onTimer(openNextProcTimer,
function (sender)
   local tempPIDtable = getPids()
   if #tempPIDtable == 0 then return end
   timer_setEnabled(sender,false)
   openProcess(tempPIDtable[1])
end
)
function getPids()
   local SL=createStringlist()
   getProcesslist(SL)
   local tempPIDtable={}
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
      if processname == process then
         if alreadycheckedPIDS[PID]~=true then
            table.insert(tempPIDtable,PID)
         end
      end
   end
   object_destroy(SL)
   return tempPIDtable
end
function checkProcess(sender)
   timer_setEnabled(sender,false)
   alreadycheckedPIDS[getOpenedProcessID()]=true
   if checkProcessMajor() then
      timer_setEnabled(openNextProcTimer,false)
      alreadycheckedPIDS={}
      enableCheatsGuiWhatEver()
   else
      timer_setEnabled(openNextProcTimer,true)
   end
end
function onOpenProcess()
   if success == 1 then return end
   timer_setEnabled(checkProcessTimer,true)
end
checkProcessTimer = createTimer(nil,false)
timer_setInterval(checkProcessTimer, 100)
timer_onTimer(checkProcessTimer, checkProcess)
function AttachToChrome()
   control_setCaption(AttachFirst[1],"Attaching Form! - Please wait searching for the process...")
   ResetChrome()
end
function AttachList()
   AttachItems = combobox_getItems(AttachFirst[10])
   AttachIndex = combobox_getItemIndex(AttachFirst[10])
   if AttachIndex == -1 then return end
   if AttachIndex == 0 then return showMessage("Please pick a process from the list") end
   if strings_getString(AttachItems,AttachIndex)=='chrome.exe' then return AttachToChrome() end
   openProcess(strings_getString(AttachItems,AttachIndex))
   errorOnLookupFailure(false)
   reinitializeSymbolhandler()
   err=getAddress("kernel32.dll")==0
   if err==true then
      showMessage("Couldn't find the process")
   else
      local PID=getOpenedProcessID()
      control_setCaption(AttachFirst[9], "Currently attached to PID: " .. PID)
      control_setEnabled(AttachFirst[3], true)
      showMessage("Attached successfully!")
   end
end
function AttachClose()
   closeCE()
end
function ExecuteHack()
   CreateTrainer()
   form_hide(AttachFirst[1])
end
control_onClick(AttachFirst[3], ExecuteHack)
control_onClick(AttachFirst[12],AttachList)
form_onClose(AttachFirst[1],AttachClose)
control_onClick(AttachFirst[13],OpenFlashacking)
setProperty(AttachFirst[1] , "ShowInTaskBar", "stAlways")
form_show(AttachFirst[1])





[ENABLE]

luacall(speedhack_setSpeed(0))

[DISABLE]

luacall(speedhack_setSpeed(1))
Back to top
View user's profile Send private message
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