- UID
- 124375
- 帖子
- 507
- 主題
- 507
- 精華
- 0
- 積分
- 504
- 楓幣
- 5024
- 威望
- 503
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 0
- GP
- 512
- 閱讀權限
- 50
- 性別
- 保密
- 在線時間
- 11 小時
- 註冊時間
- 2015-12-21
- 最後登入
- 2016-3-29
|
下載
原始碼
- --[[INIT START]]
- errorOnLookupFailure(false)
- form_show(UDF1)
- getAutoAttachList().add("TheDivision.exe")
-
- function CloseClick()
- closeCE()
- return caFree
- end
-
- UDF1.OnClose = CloseClick
- mAddress = mAddress or nil
- mOldValue = mOldValue or nil
- --[[INIT END]]
-
- --[[FUNCTIONS START]]
- --http://forum.cheatengine.org/viewtopic.php?t=584799
- --function by vng21092
- function lua_aobscan(name,module,bytes,index)
- index = index - 1
- if(module == "") then
- local resultSet = AOBScan(bytes)
- if(resultSet == nil) then
- unregisterSymbol(name)
- print(name.." not found")
- else
- unregisterSymbol(name)
- registerSymbol(name,resultSet[index])
- resultSet.destroy()
- end
- else
- if(getModuleSize(module) == nil) then
- --print("Module "..module.." not found")
- else
- local memScanner = createMemScan()
- local memFoundList = createFoundList(memScanner)
- memScanner.firstScan(
- soExactValue,vtByteArray,rtRounded,bytes,nil,
- getAddress(module),(getAddress(module)+getModuleSize(module)),"",
- fsmNotAligned,"",true,false,false,false)
- memScanner.waitTillDone()
- memFoundList.initialize()
- if(memFoundList.Count == 0) then
- unregisterSymbol(name)
- print(name.." in module "..module.." not found")
- else
- unregisterSymbol(name)
- registerSymbol(name,memFoundList.Address[index])
- end
- memScanner.destroy()
- memFoundList.destroy()
- end
- end
- end
- --function by vng21092
-
- --check for process
- function pCheckProcess()
- --This is here because TheDivision.exe opens itself, thus autoattach gets fooled.
- if getProcessIDFromProcessName("TheDivision.exe") ~= getOpenedProcessID() then
- openProcess(getProcessIDFromProcessName("TheDivision.exe"))
- end
-
- if getProcessIDFromProcessName("TheDivision.exe") == getOpenedProcessID() then
- return true
- else
- return false
- end
- end
-
- --Get address
- function td_rcl_start()
- lua_aobscan("td_rcl_base","TheDivision.exe","48 8D 8B ******** F30F59C3 F30F59C7 F30F5806 F30F1106",1)
- local mBase = getAddress('td_rcl_base')
- local mOffset = readInteger('td_rcl_base-4')
- mAddress = mBase+mOffset --result
- if mBase == nil or mBase == 0 or mOffset == nil or mOffset == 0 then
- --nothing
- else
- if not mOldValue then
- mOldValue = readFloat(mAddress) --store initial value
- end
- writeFloat(mAddress,0.0)
- end
- end
-
- --Stop and flush
- function td_rcl_stop()
- writeFloat(mAddress,mOldValue) --restore initial value
- mOldValue = nil
- mAddress = nil
- end
- --[[FUNCTIONS END]]
-
- --[[BUTTONS, ACTIONS START]]
- function CEToggleBox1Change(sender)
- if (checkbox_getState(UDF1.CEToggleBox1) == 1) then
- --[ENABLE]
- if pCheckProcess() then
- td_rcl_start() --execute
- control_setCaption(UDF1.CEToggleBox1, "State: ON")
- else
- --DO SOMETHING IF NO PROCESS
- checkbox_setState(UDF1.CEToggleBox1, 0) --disable current toggle
- control_setCaption(UDF1.CEToggleBox1, "Missing TheDivision.exe\nClick to Refresh")
- end
- end
- if (checkbox_getState(UDF1.CEToggleBox1) == 0) then
- --[DISABLE]
- if pCheckProcess() then
- td_rcl_stop() --execute
- control_setCaption(UDF1.CEToggleBox1, "State: OFF")
- else
- --DO SOMETHING IF NO PROCESS
- checkbox_setState(UDF1.CEToggleBox1, 0) --disable current toggle
- control_setCaption(UDF1.CEToggleBox1, "Missing TheDivision.exe\nClick to Refresh")
- end
- end
- end
複製代碼 |
|