CELua[RU]
    • Категории
    • Последние
    • Метки
    • Популярные
    • Пользователи
    • Группы
    • Зарегистрироваться
    • Войти
    1. Главная
    2. MasterGH
    3. Сообщения
    Не в сети
    • Профиль
    • Подписки 1
    • Подписчики 1
    • Темы 134
    • Сообщения 260
    • Группы 4

    Сообщения

    Последние Лучшие сообщения Спорные
    • RE: CE Lua чистка памяти от утечек

      Оптимизация CE Lua кода по сборке мусора

      Есть инструкции, которые добавляют мусора больше чем другие.
      Показываем объем памяти мусора

      print(string.format('Lua memory usage %.1f MiB',collectgarbage('count')/1024))
      

      Ниже код того как попробовать узнать сколько мусора добавил код при парсинге ассемблерной строки двумя способами

      local s = " 0045464A - FF 05 A4B54500        - inc [0045B5A4] { [000003EA] }"
      
      function GetDebugString(address)
        return splitDisassembledString(s)
      end
      
      \-- address, bytes, opcode
      function GetDebugString2(address)
        local clearString = string.gsub(s, '%s','')
        return string.match(clearString, '^(.-)%-(.-)%-(.-)$')
      end
      
      function NoOptimizeCode()
        GetDebugString2()
      end
      
      function OptimizeCode()
        GetDebugString()
      end
      
      local countRepeat = 500000 -- add more cycle
      local x1 = 0
      local x2 = 0
      
      x1 = getTickCount()
      print(string.format('Lua memory usage %.1f MiB',collectgarbage('count')/1024))
      for i = 1, countRepeat do NoOptimizeCode() end
      print(string.format('Lua memory usage %.1f MiB',collectgarbage('count')/1024))
      x2 = getTickCount()
      for i = 1, countRepeat do OptimizeCode() end
      print(string.format('Lua memory usage %.1f MiB',collectgarbage('count')/1024))
      
      print(string.format("%.2f", (x2 - x1)/(getTickCount() - x2)) )
      

      Пример результатов могут отличаться. Фиг его знает почему. Возможно работает сборщик мусора в разные моменты времени

      Lua memory usage 1.8 MiB
      Lua memory usage 1.8 MiB
      Lua memory usage 1.8 MiB
      1.49

      Lua memory usage 1.8 MiB
      Lua memory usage 2.3 MiB
      Lua memory usage 2.3 MiB
      1.47

      Lua memory usage 2.3 MiB
      Lua memory usage 2.8 MiB
      Lua memory usage 2.8 MiB
      1.49

      написал в Плагин-строй
      MasterGHM
      MasterGH
    • Работа с системой контроля версий в команде разработчиков

      Инфа по совместной работе с гитом. Может быть пригодится кому, а может и нет. Такую систему я использую на работе недавно.

      Можно совместно работать над одним большим проектом через git-flow. Возможно, кто-то из форумчан тоже использует git flow на работе.

      git-flow — это набор расширений git предоставляющий высокоуровневые операции над репозиторием для поддержки модели ветвления Vincent Driessen.

      Кратко. Модель контроля версии построена на 4 ветках

      master - релизы
      develop - разработка
      feature - фичи
      hotfix - исравления

      С develop начинается разработка через копирования в ветку feature.
      Над фичей идет работа, а после завершения feature мержится с develop и feature сразу удаляется.
      После запланированных изменений develop мержится с master уходя в релиз.
      Если возникли баги, то от master создается ветвь на hotfix . После фиксов hotfix мержится с master.

      Доступ к мастер ветки может иметь один человек или его доверенные лица. Ветка Develop открыта для разработчиков. Это значит, что множество разработчиков колдуют в Develop ветке, а мержит изменения с master уже главный разработчик или несколько главных разработчиков.

      В мастере создаются теги с обозначением версии.

      Учитывая номер версии МАЖОРНАЯ.МИНОРНАЯ.ПАТЧ, следует увеличивать:

      МАЖОРНУЮ версию, когда сделаны обратно несовместимые изменения API.
      МИНОРНУЮ версию, когда вы добавляете новый функционал, не нарушая обратной совместимости.
      ПАТЧ-версию, когда вы делаете обратно совместимые исправления.
      Дополнительные обозначения для предрелизных и билд-метаданных возможны как дополнения к МАЖОРНАЯ.МИНОРНАЯ.ПАТЧ формату.

      git-flow заметки
      Семантическое версионирование

      написал в Справочники git-flow версионирование
      MasterGHM
      MasterGH
    • RE: CE вывод списка записей и вывод свойств компонентов

      Ищем свойства userData.

      UserData в Lua это пользовательский тип. Точно не знаю, но я думаю в документации в CE Lua (celua.txt или здесь на офф. сайте) тип userData у всех классов или большинства классов. Например, проверим, что главная форма CE это userData тип

      local mainFormCE = getMainForm()
      print(type(mainFormCE))
      
       > userdata (вывод из консоли)
      

      Выводим список свойств следующим образом через getmetatable функцию. Метатаблица — это особая таблица свойств Lua-переменной

      local mainForm = getMainForm()
      local listUserData = createStringlist()
      
      for k,_ in pairs(getmetatable(mainForm)) do
        listUserData.add(k)
      end
      
      local allowCustomInput = false
      local id, name = showSelectionList("Title", "Caption", listUserData, allowCustomInput)
      print ('Index: '..id..", Name: "..name)
      
      listUserData.destroy()
      

      Результат в виде списка свойство переменной mainForm
      1a800863-fb55-46e7-a2b0-b3daed1613af-изображение.png
      Чтобы наглядно было. Свойства эти похожи на свойства из Дельфи. Можно загуглить, они поддробно описываются.

      Берем например свойство цвет. Прочитаем оригинальное и запишем свое любое

      local mainFormCE = getMainForm()
      print(mainFormCE.getColor())
      
      > 536870912 -- в hex-е это 0x20000000. Можно перевести в калькуляторе или через print(string.format("%08X", 536870912))
      

      Случайное свое впишем ради наглядного примера
      mainFormCE.setColor(546484)

      72d5c265-f388-4d4f-b24c-f3dcb46d8f39-изображение.png

      написал в Плагин-строй
      MasterGHM
      MasterGH
    • Lua ООП конспект

      Пригодится для создания больших плагинов в Cheat Engine. Более ~500 строк

      Наследование

      ClassX = {}
      
      	function ClassX:New(_argument1, _argument2)
      
      		local obj = {}
      		obj.argument1 = _argument1
      		obj.argument2 = _argument2
      
      		-- Через "self"
      		function obj:GetValue1() return obj.argument1 end
      		function obj:GetValue2() return obj.argument2 end
      
      		setmetatable(obj, self)
      		obj.__index = ClassX
      		return obj
      	end
      
      	someObject = ClassX:New("A", "B")
      	print(someObject.GetValue1())
      	print(someObject.GetValue2())
      
      
         	Woman = {}
      	--наследуемся
      	setmetatable(Woman ,{__index = ClassX})
      	--проверяем
      	masha = Woman:New("Марья","Ивановна")
      	print(masha:GetValue1())  --->результат: Марья
      

      Инкапсуляция

      Person = {}
      	function Person:new(name)
      		--приватное свойство
      		local private = {}
      		private.age = 18
      
      		local obj = {}
      		--публичное свойство
      		obj.name = name or "Вася"   -- "Вася" - это значение по умолчанию
      
      		function obj:getAge() return private.age end
      
      		setmetatable(obj,self)
      		self.__index = self
      		return obj
      	end
      
      	vasya = Person:new()
      	print(vasya.name)          --> результат: Вася
      	print(vasya.age)           --> результат: nil
      	print(vasya:getAge())     --> результат: 18
      

      Полиморфизм

      Person = {}
      	function Person:New(name)
      		local private = {}
      		private.age = 18
      
      		local obj = {}
      		obj.name = name or "Вася"
      		-- Защищенный от переорпеделения
      		function obj:GetName() return "Person protected "..self.name end
      		-- Переопределяемый
      		function Person:GetName2() return "Person "..self.name	end
      
      		setmetatable(obj, self)
      		self.__index = self
      		return obj
      	end
      
      	--создадим класс, унаследованный от Person
      	Woman = {}
      	setmetatable(Woman,{__index = Person})
      	function Woman:GetName() return "Woman protected "..self.name end
      	function Woman:GetName2() return "Woman "..self.name end
      
      	--проверим
      	masha = Woman:New()
      	print(masha:GetName())   --> Person protected Вася
      	print(masha:GetName2())  --> Woman Вася
      

      ref

      написал в Справочники ce lua oop
      MasterGHM
      MasterGH
    • FPU инструкция FINCSTP. Очистка ST(0)

      Команда FINCSTP добавляет единицу (без переноса) к трехбитному полю TOP слова состояния FPU.

      Эффект действия команды FINCSTP заключается во вращении стека. Она не изменяет регистров тэгов и не перемещает данные. Она не эквивалентна операции выталкивания из стека, потому что, она не устанавливает тэг старой вершины стека в значение пустой.

      Флаги C0, C2, C3 регистра SW после выполнения команды не определены, флаг C1 устанавливается равным 0.

      Похожа на FSTP, также вращает стек регистров FPU (я кстати не знал, увидел при тестах в CE), но только не перемещает значение по адресу.

      FSTP [здесь указывается адрес или регистр]
      FINCSTP
      

      Если нужно вытолкнуть значение из ST(0), а адрес куда его выталкивать не нужен, то можно сделать так FINCSTP Или аналог FSTP ST(0)

      При использовании стоит обратить внимание на флаги, возможно их состояние будет влиять на исполнение кода.
      6260cbac-426b-48f3-bbb1-159a31ee36f6-изображение.png
      *Вообще не помню почему я пишу "выталкивать значение" через fstp, когда оно появляется снизу в ST(8). Т.е. не выталкивается по сути.

      написал в Справочники ce aa fincstp
      MasterGHM
      MasterGH
    • RE: Сравнение времени выполнения двух функций

      С точностью до тысячной доли секунды можно посчитать задержку выполнения кода, что можно применить как счет производительности.

      local x = os.clock()
      local s = 0
      for i=1,100000 do s = s + i end
      print(string.format("elapsed time: %.3f\n", os.clock() - x))
      

      После выполнения, показывает 2 тысячных секунды или 2 мс

      elapsed time: 0.002
      

      Можно посчитать прошедшее время для другой цели. Например, если цикл в отладке выполняется более 3 секунд, то это вероятно корневой цикл, а если менее, то это вложенный цикл. На корневом цикле можно остановить трейслог. Об этом может быть потом напишу.

      написал в Обучающие примеры
      MasterGHM
      MasterGH
    • Функция autoAssemble

      Функция autoAssemble это Lua функция, которая позволяет скопилировать ассемблерный код активации и деактивации. Пример ниже

      \-- Скрипт похожий на таблицу АА
      InfiniteHealthScript = [[
      [ENABLE]
      alloc(InfiniteHealth,2048,BlackOps3.exe)
      aobscanmodule(InfiniteHealthAOB,BlackOps3.exe,8B 83 C8 02 00 00 48 8B)
      registersymbol(InfiniteHealthAOB)
      label(return)
      
      InfiniteHealth:
        mov [rbx+000002C8],#999
        jmp return
      
      InfiniteHealthAOB:
        jmp InfiniteHealth
        nop
      return:
      
      [DISABLE]
      InfiniteHealthAOB:
        db 8B 83 C8 02 00 00
      
      unregistersymbol(InfiniteHealthAOB)
      
      dealloc(InfiniteHealth)
      ]]
      
      \-- Функция активации
      function enableInfiniteHealthCheat()
        -- Если чит был выключен, то только тогда сработает деактивация
        if not InfiniteHealthCheatIsEnabled then
          InfiniteHealthCheatIsEnabled,InfiniteHealthCheatDisableinfo = autoAssemble(InfiniteHealthScript)
        end
      end
      
      \-- Функция деактивации
      function disableInfiniteHealthCheat()
        -- Если чит был включен, то только тогда сработает активация
        if InfiniteHealthCheatIsEnabled then
          if autoAssemble(InfiniteHealthScript,InfiniteHealthCheatDisableinfo) then
            InfiniteHealthCheatIsEnabled = false
          end
        end
      end
      
      написал в Приёмы ce aa ce lua autoassemble
      MasterGHM
      MasterGH
    • CE Lua чистка памяти от утечек

      Хотя в последних версиях CE включили чистку памяти (надеюсь, что эта функция была и есть). Но может пригодится очистка памяти. Вдруг?

      ИМХО отказываться от CE Lua скриптов из-за утечек памяти не стоит, если такая происходит. Т.е. оперативная память забивается каким-то мусором. Это бывает редко, когда пилишь плагины.

      Можно чистить память следующим образом

      function startCollectgarbageProcess(interval, showStatus)
        local timer1 = createTimer(true)  
        timer1.Interval = interval  
        timer1.onTimer = function ()  
          if (showStatus) then
            print(string.format('Lua memory usage %.1f MiB',collectgarbage('count')/1024))
          end 
          collectgarbage("restart")
          collectgarbage("collect")    
          if (showStatus) then
            print(string.format('Lua memory usage %.1f MiB',collectgarbage('count')/1024))
          end    
        end
      end
      
      \-- Собирать каждую 1 минуту и показать результат
      startCollectgarbageProcess(60000, true)
      
      написал в Плагин-строй ce lua ce plugin memory leak
      MasterGHM
      MasterGH
    • RE: CE Lua ColorPicker (скрытый компонент)

      Lazarus — это среда разработки программ под разные операционные системы. Можно найти в Интернете.

      На Lazarus создали программу Cheat Engine, собрав исходники в exe. Исходники большие и запутанные.
      Исходники CE лежат на официальном сайте и их можно открыть с помощью Lazarus. Но лучше этого не делать без необходимости, т.к. чтобы разобраться в исходниках и уметь их собирать нужно потратить некоторое время, а может и много-много времени.

      Просто на Lazarus видно все компоненты в том числе скрытые. А в CE видны только те компоненты, к которым DarkByte явно дал доступ. К компоненту смены цвета доступ можно получить как я писал выше

      написал в Плагин-строй
      MasterGHM
      MasterGH
    • Обработка исключения в Cheat Engine Lua

      pcall() функция может вызывать функцию, которая может вызывать исключение.

      Возвращает статус в виде булевой о том, есть ли исключение или нет и возвращает текст исключения.

      function ThrowException()
            -- раскоментировать чтобы зывать ошибку по условию некоторому
            -- error("string expected", 2)
            
            -- Пример вывода стека ошибки
            print('AAA ->> '..debug.traceback())
            
            -- Исключение делаем
            temp[5] = 1
            
            -- До этой строчки не дойдет, т.к. исключение выше будет из-за temp[5] = 1
            print('BBB ->> '..debug.traceback())
          end
      
          local status, err = pcall(ThrowException)
      
          -- Показать какие типы имеют статус и ошибка (это булевый и строка)
          print(type(status))
          print(type(err))
      
          if status then
            print('No Exception')
          else
            print('Exception: ' .. err)
          end
      

      Как этим пользоваться? Если вдруг знаем, что может произойти ошибка, то можно её обработать и выполнить правильное действие не останавливая работу Lua скрипта.
      Подробнее документация

      Или например если не выполняется условие, то можем сами создать ошибку с помощью функции error, что остановит скрипт.

      написал в Приёмы ce lua exception
      MasterGHM
      MasterGH
    • Обработка исключения в Cheat Engine AA

      Новые директивы try/except в AA доступны Cheat Engine 6.8 Beta2 и выше

      Задача try/except в AA обработать исключение, не допустить crash. Чтобы игра продолжалась, а чит в лучшем случае не закрыл бы процесс.

      В теории возможно определить, что был crash и что-то сделать. Например, отправить логи в свой или иной удаленный сервис аналитики, что такой-то чит не сработал...

      Пример от DarkByte для try/exceptс счетчиком crashes

      [ENABLE] 
      alloc(newmem,2048) 
      alloc(crashcount,4) 
      registersymbol(crashcount) 
      label(returnhere) 
      label(originalcode) 
      label(exit) 
        
      newmem: 
        
      push eax 
      {$try} 
      mov eax,[esi+95c] 
      cmp [eax+10],0 
      jmp ok 
      {$except} 
      pop eax 
      add [crashcount],1 
      jmp originalcode 
        
      ok: 
      pop eax 
        
      je aftersub //it is 0 
      originalcode: 
      subss xmm0,xmm3 
        
      aftersub: 
      movss [esi+00000164],xmm0 
        
      exit: 
      jmp returnhere 
        
      "HomeworldRM.exe"+22AEEA: 
      jmp newmem 
      nop 
      nop 
      nop 
      nop 
      nop 
      nop 
      nop 
      returnhere: 
        
        
        
      [DISABLE] 
      dealloc(newmem) 
      "HomeworldRM.exe"+22AEEA: 
      subss xmm0,xmm3 
      movss [esi+00000164],xmm0 
      //Alt: db F3 0F 5C C3 F3 0F 11 86 64 01 00 00 
      
      написал в Приёмы фишки ce aa exception
      MasterGHM
      MasterGH
    • Считаем размер инъекции в байтах

      Можно подхватить разные моменты активации и деактивации записи в таблице CE и рассчитать размер кода между метками

      1. По шаблону вставляем АА код для туториала Cheat Engine
      2. Регистрируем метки-маркеры в АА коде
      3. Этими метками в Lua считаем и выводим ""endCode - startCode" размер байтов

      Пример, который подсчитал 15 байтов
      c330e4cc-9f25-4763-88b6-ca32eb0b2817-изображение.png
      95d770a5-02ec-4fba-855c-8ed07c23180d-изображение.png

      Пример скрипта

      {$lua}
        memrec.OnActivate = function (memoryrecord, before, currentstate)
          if currentstate and not before then
             print("Bytes: " .. getAddress("endCode - startCode"))
          end
          return before
        end
      {$ASM}
      
      [ENABLE]
      //code from here to '[DISABLE]' will be used to enable the cheat
      aobscanmodule(INJECT,Tutorial-i386.exe,81 BB 80 04 00 00 E8 03 00 00) // should be unique
      alloc(newmem,$1000)
      
      label(code)
      label(endCode)
      label(startCode)
      registerSymbol(startCode)
      registerSymbol(endCode)
      
      newmem:
      
      code:
      startCode:
        cmp [ebx+00000480],000003E8
        jmp return
      endCode:
      
      INJECT:
        jmp newmem
        nop
        nop
        nop
        nop
        nop
      return:
      registersymbol(INJECT)
      
      [DISABLE]
      //code from here till the end of the code will be used to disable the cheat
      INJECT:
        db 81 BB 80 04 00 00 E8 03 00 00
      unregistersymbol(startCode)
      unregistersymbol(endCode)
      unregistersymbol(INJECT)
      dealloc(newmem)
      
      {
      // ORIGINAL CODE - INJECTION POINT: "Tutorial-i386.exe"+23FE3
      
      "Tutorial-i386.exe"+23FD1: C9                             -  leave
      "Tutorial-i386.exe"+23FD2: C3                             -  ret
      "Tutorial-i386.exe"+23FD3: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FD5: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FD7: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FD9: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FDB: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FDD: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FDF: 00 53 89                       -  add [ebx-77],dl
      "Tutorial-i386.exe"+23FE2: C3                             -  ret
      // ---------- INJECTING HERE ----------
      "Tutorial-i386.exe"+23FE3: 81 BB 80 04 00 00 E8 03 00 00  -  cmp [ebx+00000480],000003E8
      // ---------- DONE INJECTING  ----------
      "Tutorial-i386.exe"+23FED: 75 2C                          -  jne Tutorial-i386.exe+2401B
      "Tutorial-i386.exe"+23FEF: 8B 83 68 04 00 00              -  mov eax,[ebx+00000468]
      "Tutorial-i386.exe"+23FF5: B2 01                          -  mov dl,01
      "Tutorial-i386.exe"+23FF7: 8B 8B 68 04 00 00              -  mov ecx,[ebx+00000468]
      "Tutorial-i386.exe"+23FFD: 8B 09                          -  mov ecx,[ecx]
      "Tutorial-i386.exe"+23FFF: FF 91 20 02 00 00              -  call dword ptr [ecx+00000220]
      

      Документация кому интересно

      MemoryRecord Class:
      The memoryrecord objects are the entries you see in the addresslist

      properties
      ID: Integer - Unique ID
      Index: Integer - The index ID for this record. 0 is top. (ReadOnly)
      Description: string- The description of the memory record
      Address: string - Get/set the interpretable address string. Useful for simple address settings.
      AddressString: string - Get the address string shown in CE (ReadOnly)
      OffsetCount: integer - The number of offsets. Set to 0 for a normal address
      Offset[] : integer - Array to access each offset
      OffsetText[] : string - Array to access each offset using the interpretable text style

      CurrentAddress: integer - The address the memoryrecord points to
      VarType: ValueType (string) - The variable type of this record. See vtByte to vtCustom
      Type: ValueType (number) - The variable type of this record. See vtByte to vtCustom
      If the type is vtString then the following properties are available:
      String.Size: Number of characters in the string
      String.Unicode: boolean
      String.Codepage: boolean

      If the type is vtBinary then the following properties are available
      Binary.Startbit: First bit to start reading from
      Binary.Size : Number of bits

      If the type is vtByteArray then the following properties are available
      Aob.Size : Number of bytes

      CustomTypeName: String - If the type is vtCustom this will contain the name of the CustomType
      Script: String - If the type is vtAutoAssembler this will contain the auto assembler script
      Value: string - The value in stringform.
      Selected: boolean - Set to true if selected (ReadOnly)
      Active: boolean - Set to true to activate/freeze, false to deactivate/unfreeze
      Color: integer
      ShowAsHex: boolean - Self explanatory
      ShowAsSigned: boolean - Self explanatory
      AllowIncrease: boolean - Allow value increasing, unfreeze will reset it to false
      AllowDecrease: boolean - Allow value decreasing, unfreeze will reset it to false
      Collapsed: boolean - Set to true to collapse this record or false to expand it. Use expand/collapse methods for recursive operations.
      IsGroupHeader: boolean - Set to true if the record was created as a Group Header with no address or value info. (ReadOnly)
      IsReadable: boolean - Set to false if record contains an unreadable address. NOTE: This property will not be set until the value property is accessed at least once. (ReadOnly)

      Options: String set - a string enclosed by square brackets filled with the options seperated by a comma. Valid options are: moHideChildren, moActivateChildrenAsWell, moDeactivateChildrenAsWell, moRecursiveSetValue, moAllowManualCollapseAndExpand, moManualExpandCollapse

      DropDownLinked: boolean - if dropdown list refers to list of another memory record eg. (memrec name)
      DropDownLinkedMemrec: string - Description of linked memrec or emptystring if not linked
      DropDownList : StringList - list of "value:description" lines, lists are still separate objects when linked, read-write
      DropDownReadOnly: boolean - true if 'Disallow manual user input' is set
      DropDownDescriptionOnly: boolean - self explanatory
      DisplayAsDropDownListItem: boolean - self explanatory
      DropDownCount: integer - equivalent to .DropDownList.Count
      DropDownValue[index] : Array to access values in DropDownList (ReadOnly)
      DropDownDescription[index] : Array to access Descriptions in DropDownList (ReadOnly)

      Count: Number of children
      Child[index] : Array to access the child records
      [index] = Child[index]
      Parent: MemoryRecord - self explanatory

      HotkeyCount: integer - Number of hotkeys attached to this memory record
      Hotkey[] : Array to index the hotkeys

      Async: Boolean - Set to true if activating this entry will be asynchronious. (only for AA/Lua scripts)
      AsyncProcessing: Boolean - True when async is true and it's being processed
      AsyncProcessingTime: qword - The time that it has been processing in milliseconds

      OnActivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to true. If before is true, not returning true will cause the activation to stop.
      OnDeactivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to false. If before is true, not returning true will cause the deactivation to stop.
      OnDestroy: function() - Called when the memoryrecord is destroyed.
      OnGetDisplayValue: function(memoryrecord,valuestring):boolean,string - This function gets called when rendering the value of a memory record. Return true and a new string to override the value shown
      DontSave: boolean - Don't save this memoryrecord and it's children

      methods
      getDescription()
      setDescription()
      getAddress() : Returns the interpretable addressstring of this record. If it is a pointer, it returns a second result as a table filled with the offsets
      setAddress(string) : Sets the interpretable address string, and if offsets are provided make it a pointer

      getOffsetCount(): Returns the number of offsets for this memoryrecord
      setOffsetCount(integer): Lets you set the number of offsets

      getOffset(index) : Gets the offset at the given index
      setOffset(index, value) : Sets the offset at the given index

      getCurrentAddress(): Returns the current address as an integer (the final result of the interpretable address and pointer offsets)

      appendToEntry(memrec): Appends the current memory record to the given memory record

      getHotkey(index): Returns the hotkey from the hotkey array
      getHotkeyByID(integer): Returns the hotkey with the given id

      reinterpret()
      createHotkey({keys}, action, value OPTIONAL): Returns a hotkey object

      disableWithoutExecute(): Sets the entry to disabled without executing the disable section

      global events
      function onMemRecPreExecute(memoryrecord, newstate BOOLEAN):
      If above function is defined it will be called before action* has been performed.
      Active property is about to change to newState.

      function onMemRecPostExecute(memoryrecord, newState BOOLEAN, succeeded BOOLEAN):
      If above function is defined it will be called after action*.
      Active property was supposed to change to newState.
      If 'succeeded' is true it means that Active state has changed and is newState.

      newState and succeeded are read only.

      *action can be: running auto assembler script (ENABLE or DISABLE section), freezing and unfreezing.

      написал в Приёмы ce lua фишки ce aa
      MasterGHM
      MasterGH
    • Выполить текст, как код

      Функция loadstring исполняет строку кода как функцию.

      f = loadstring ("print 'hello, world'")
      f ()   --> hello, world
      

      Есть еще и такая функция как string.dump. Она создает строку из функции

      function f () print "hello, world" end
      s = string.dump (f)
      \-- Можно строку тут же запустить как код
      loadstring (s) () --> hello, world
      

      Если по обратной связи строить и исполнять строку кода, то предположительно можно генерировать код другим кодом и учитывать гораздо больше условий, чем это может сделать человек.

      Пригодится для ИИ отладки и для ИИ бота.

      Код пишет другой код по обратной связи. Реальность?

      написал в Приёмы фишки ce lua loadstring
      MasterGHM
      MasterGH
    • CE Lua ColorPicker (скрытый компонент)

      Чтобы получить цвет из компонента нужно найти его на форме CE через Lazarus. Этот компонент нельзя найти визуально, он скрыт.

      function MainLuaProgramm()
      
        -- Глобальная форма mainForm
        local visibleState = true
        mainForm = createForm(visibleState)
        
        local testButton = createButton(mainForm)
        testButton.Caption = 'Set Color'
        testButton.onClick = function (sender)
      	local colorDialog = getMainForm().findComponentByName("ColorDialog1")
      	if(colorDialog.Execute()) then
      		mainForm.Color = colorDialog.Color
      		print(string.format('%08X',mainForm.Color))
      	end
        end
        
      end
      
      MainLuaProgramm()
      

      Узнал об этом случайно, когда зашел на форум Cheat Engine в тему расширений на Lua. Теперь в дизассемблере можно будет быстренько цвета менять
      dd4b8ef7-573e-442e-8dea-2e96b9638dc6-изображение.png

      написал в Плагин-строй ce plugin ce lua ce components
      MasterGHM
      MasterGH
    • Сверточные сети от МФТИ (лекция)
      Лекция. Сверточные нейронные сети

      Для тех, кто давно пытается понять, что такое сверточная сеть и как она работает (для меня например)

      Ну еще и сюда

      написал в Видео cnn
      MasterGHM
      MasterGH
    • Обзор игры STELLARIS

      Космическая стратегия

      Всё о «STELLARIS» за 20 минут

      Готовые скрипты для этой игры от самого Recifense.
      Попробовать сделать самому, а потом посмотреть готовые - ссылка

      Todo: добавить плагин просмотрщик youtube видео. Создать чат в discord, telegram.

      написал в Видео todo обзор игра
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Да, косяки. Еще не поправил. Я кидаю из буфера. т.е. делать скрин в буфер и вставить.
      Если с телефона, то скрин на телефоне двумя кнпками делается выкл и убавить грумкость. Но он захватит весь экран. Либо ждать, когда я поправлю

      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Тогда добавить 4 раза разные имена

      getAutoAttachList().add("game1.exe")
      getAutoAttachList().add("game2.exe")
      getAutoAttachList().add("game3.exe")
      getAutoAttachList().add("game4.exe")
      

      Т.е. вместо одной строки будет уже 4 и более

      написал в Вопросы
      MasterGHM
      MasterGH
    • CE вывод списка записей и вывод свойств компонентов

      Бывает полезно посмотреть быстро списки данных и даже поискать что-то в них

      getPropertyList() — возвращает список срок свойств компонента
      showSelectionList() — отображает компонент с поиском этих свойств
      Подробнее смотри документацию.

      Документация
      521c110c-d0f4-43d3-9e83-9a88e110c7c2-изображение.png

      Как пример посмотрим список свойств главной формы и выберем любое свойство

      local mainForm = getMainForm()
      local listProperties = getPropertyList(mainForm)
      local allowCustomInput = false
      local id, name = showSelectionList("Title", "Caption", listProperties, allowCustomInput)
      print ('Index: '..id..", Name: "..name)
       --> Примеры выполнения: 
       --> Index: 55, Name: ShowHint 
       --> Index: 10, Name: Top 
      

      После выполнения Lua скрипта вот такой диалог появится. Можно искать свойство через ввод текста
      0e3f2131-fdfb-4ed3-8919-62578d090e69-изображение.png

      showSelectionList(title, caption, stringlist, allowCustomInput OPTIONAL): integer,string

      • Shows a menu with the given list. It returns the linenumber (starting at 0) and the selected string. Linenumber is -1 if the user was allowed to enter custom input

      Список строк (Stringlist Class) используют:

      createStringlist(): Strings - постой список
      getAutoAttachList(): Strings - список имен процессов для автоподключения
      getPropertyList(class) : Strings - список свойств
      getCommonModuleList(): Strings - список пропускаемых при сканировании модулей
      getProcesslist(Strings) - список процессов
      getWindowlist(Strings) - список окон
      getThreadlist(Strings) - список потоков
      Database.Params: Strings - свойство базы данных SQL
      ListItem.SubItems: Strings - свойство подстрок в визуальном компоненте списка
      ComboBox.Items: Strings - комбобокс
      Memo.Lines: Strings - мемо компонент
      RadioGroup.Items: Strings - компонент RadioGroup
      ListBox.Items: Strings - компонент ListBox
      FileDialog.Files: Strings - выбранные файлы в диалоге

      написал в Плагин-строй ce lua ce plugin ce components userdata
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      @Pitronic ок

      написал в Вопросы
      MasterGHM
      MasterGH
    • 1
    • 2
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 10 / 13