游戏达人
- 贡献度
- 123
- 金元
- 25214
- 积分
- 3013
- 精华
- 0
- 注册时间
- 2003-12-18
|
本帖最后由 DarkMars 于 2012-10-23 09:52 编辑
1.11 的 我自己也修改了基值的 win7 64位一切正常 你试试先 insert 然后home等虫变 全是大个的出来了
VarkidBaseAddressString = '"Borderlands2.exe"+13A7D48'
DenBaseString = '"Borderlands2.exe"+13D3B00'
EnBaseString = '"Borderlands2.exe"+13AC460'
STable = '"Borderlands2.exe"+1589A24'
ObjScan = createMemScan()
DenScan = createMemScan()
EnScan = createMemScan()
VarScan = createMemScan()
MemScanUsedBefore = false
DenScanUsedBefore = false
EnScanUsedBefore = false
VarScanUsedBefore = false
Count = 0
EnResult = {}
ObjResult = {}
CurrentObj = 0
AVark = 0
DenData = {}
function SpawnEnabled()
local bEnabled = readInteger(getAddress('bSpawnModLoaded'))
if bEnabled == nil or bEnabled ~= 1 then return 0 end
return 1
end
function DenFind()
if getOpenedProcessID() == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: DenFind()")
local VarkidBaseAddress = getAddress(VarkidBaseAddressString)
if VarkidBaseAddress == 0 then
DebugLog("!Error: Wrong den base address")
return
end
if MemScanUsedBefore == true then foundlist_deinitialize(ObjResult) end; MemScanUsedBefore = true
memscan_firstScan(ObjScan,soExactValue,vtDword,"",VarkidBaseAddress,"0","0x00000000","0x70000000",'+W-X-C',fsmAligned,"4",false,false,true,false)
memscan_waitTillDone(ObjScan)
ObjResult = createFoundList(ObjScan)
foundlist_initialize(ObjResult)
Count = foundlist_getCount(ObjResult) - 1
CurrentObj = 1
if Count < 1 then
DebugLog("!Error: Couldn't find any dens")
Count = 0
elseif Count > 5000 then
DebugLog("!Error: Too many dens found (" .. Count .. ")")
Count = 0
else
DebugLog("-Found " .. Count .. " dens")
PopulateDenData()
beep()
end
end
function PopulateDenData()
if getOpenedProcessID() == 0 or Count == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: PopulateDenData()")
local iNewCount = 0; local iTotalCount = 0
for i=1,Count do
local offset = foundlist_getAddress(ObjResult,i)
local aSpawnCount = getAddress(offset .. "+244")
local iSpawnCount = readInteger(aSpawnCount)
iTotalCount = iTotalCount + 1
if DenData[offset] == nil then
iNewCount = iNewCount + 1
DenData[offset] = iSpawnCount
end
end
DebugLog("-Den data populated with " .. iNewCount .. " out of " .. iTotalCount .. " added with total of " .. getn(DenData) .. " entries")
end
function RestoreDens()
if getOpenedProcessID() == 0 or Count == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: RestoreDens()")
if DenData["AVark"] ~= nil and AVark ~= 0 then
local aAVark = readInteger(getAddress(AVark .. "+40"))
writeInteger(aAVark, DenData["AVark"])
end
for i=1,Count do
local offset = foundlist_getAddress(ObjResult,i)
local aKillCount = getAddress(offset .. "+268")
local aSpawnCount = getAddress(offset .. "+244")
if DenData[offset] ~= nil then
writeInteger(aSpawnCount, DenData[offset])
end
writeInteger(aKillCount, 0)
end
DebugLog("-Den original states restored")
beep()
end
function KillReset()
if getOpenedProcessID() == 0 or Count == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: KillReset()")
for i=1,Count do
local offset = foundlist_getAddress(ObjResult,i)
local address = getAddress(offset .. "+268")
writeInteger(address,0)
end
DebugLog("-Den kill counter reset")
beep()
end
function MaxKills()
if getOpenedProcessID() == 0 or Count == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: StopSpawns()")
for i=1,Count do
local offset = foundlist_getAddress(ObjResult,i)
local address = getAddress(offset .. "+268")
writeInteger(address, 255)
end
DebugLog("-Dens are now at maxed kills ")
beep()
end
function DenMaxUp()
if getOpenedProcessID() == 0 or Count == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: DenMaxUp()")
for i=1,Count do
local offset = foundlist_getAddress(ObjResult,i)
local address = getAddress(offset .. "+244")
local CurVal = readInteger(address)
writeInteger(address,CurVal + 1)
end
DebugLog("-Den spawn max increased")
beep()
end
function DenMaxDown()
if getOpenedProcessID() == 0 or Count == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: DenMaxDown()")
for i=1,Count do
local offset = foundlist_getAddress(ObjResult,i)
local address = getAddress(offset .. "+244")
local CurVal = readInteger(address)
if CurVal > 1 then
writeInteger(address,CurVal - 1)
end
end
DebugLog("-Den spawn max decreased")
beep()
end
function VarkidSwap()
if getOpenedProcessID() == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: VarkidSwap()")
GetVarkAdultOffset()
if AVark == 0 then
DebugLog("!Error: Couldn't find the Adult Varkid offset")
return
else
DebugLog("-Adult Varkid found at offset " .. AVark)
end
local VarBase = getAddress(EnBaseString); if VarBase==0 then return end
if VarScanUsedBefore == true then foundlist_deinitialize(VarResult) end; VarScanUsedBefore = true
memscan_firstScan(VarScan,soExactValue,vtDword,"",VarBase,"0","0x00000000","0x70000000",'+W-X-C',fsmAligned,"4",false,false,true,false)
memscan_waitTillDone(VarScan)
VarResult = createFoundList(VarScan)
foundlist_initialize(VarResult)
local VarCount = foundlist_getCount(VarResult) - 1
if VarCount < 1 then
DebugLog("!Error: Couldn't find any dens")
return
else
DebugLog("-Found " .. VarCount .. " dens")
end
local Swapper = readInteger(getAddress(AVark .. "+40"))
local VermiFound = false
for i=1,VarCount do
local offset = foundlist_getAddress(VarResult, i)
local Varstring = GetString(readInteger(getAddress(offset .. "+AC")))
if string.find(Varstring, 'BugMorphRaid') ~= nil then
local success = writeInteger(Swapper, getAddress(offset))
if success then
DebugLog("-Adult Varkid swapped with Vermi (" .. getAddress(offset) .. ")")
else
DebugLog("!Error: Swapping failed ")
end
VermiFound = true
break
end
end
if VermiFound == false then DebugLog("!Error: Vermi wasn't found in the den table") else beep() end
end
function GetString(Address)
local string = readInteger((readInteger(Address + 44) * 4) + readInteger(getAddress(STable)))+16
return readString(string,30)
end
function GetVarkAdultOffset()
AVark = 0
DenBase = getAddress(DenBaseString); if DenBase==0 then return end
if DenScanUsedBefore == true then foundlist_deinitialize(DenResult) end; DenScanUsedbefore = true
memscan_firstScan(DenScan,soExactValue,vtDword,"",DenBase,"0","0x00000000","0x70000000",'+W-X-C',fsmAligned,"4",false,false,true,false)
memscan_waitTillDone(DenScan)
DenResult = createFoundList(DenScan)
foundlist_initialize(DenResult)
local count = foundlist_getCount(DenResult) - 1
for i=1,count do
local offset = foundlist_getAddress(DenResult,i)
local string = GetString(getAddress(offset))
if string == "PopDef_BugMorphAdult" then
AVark = offset
if DenData["AVark"] == nil then
local iAVark = readInteger(readInteger(getAddress(AVark .. "+40")))
DenData["AVark"] = iAVark
DebugLog("-Stored Adult Varkid data (" .. iAVark .. ")")
end
break
end
end
end
function VarkFindClick(sender)
if getOpenedProcessID() == 0 or SpawnEnabled() == 0 then return end
DebugLog("@Function: VarkFindClick()")
GetVarkAdultOffset()
if AVark == 0 then
DebugLog("!Error: Couldn't find the Adult Varkid offset")
return
else
DebugLog("-Adult Varkid found at offset " .. AVark)
end
local items = listbox_getItems(Varkid_Swapper_EnList)
strings_clear(items)
local EnBase = getAddress(EnBaseString); if EnBase==0 then return end
if EnScanUsedBefore == true then foundlist_deinitialize(EnResult) end; EnScanUsedBefore = true
memscan_firstScan(EnScan,soExactValue,vtDword,"",EnBase,"0","0x00000000","0x70000000",'+W-X-C',fsmAligned,"4",false,false,true,false)
memscan_waitTillDone(EnScan)
EnResult = createFoundList(EnScan)
foundlist_initialize(EnResult)
local Encount = foundlist_getCount(EnResult) - 1
if Encount < 1 then
DebugLog("!Error: List couldn't initialize")
else
DebugLog("-List initialized with " .. Encount .. " entries")
end
for i=1,Encount do
local offset = foundlist_getAddress(EnResult, i)
local addr = getAddress(offset .. "+AC")
local Enstring = GetString(readInteger(addr))
strings_add(items, Enstring)
end
end
function EnListClick(sender)
if getOpenedProcessID() == 0 or SpawnEnabled() == 0 then return end
local current = listbox_getItemIndex(sender)
if current < 0 or AVark == 0 then return end
DebugLog("@Function: EnListClick()")
local EnName = strings_getString(listbox_getItems(Varkid_Swapper_EnList), current)
local EnIndex = getAddress(foundlist_getAddress(EnResult,current + 1))
local Swapper = readInteger(getAddress(AVark .. "+40"))
local success = writeInteger(Swapper, EnIndex)
if success then
DebugLog("-Adult Varkid swapped with " .. EnName .. " (" .. EnIndex .. ")")
else
DebugLog("!Error: Swapping failed ")
end
end
if hkdenfind~=nil then object_destroy(hkdenfind);hkdenfind=nil;end
hkdenfind = createHotkey("DenFind", VK_INSERT)
if hkkillreset~=nil then object_destroy(hkkillreset);hkkillreset=nil;end
hkkillreset = createHotkey("KillReset", VK_HOME)
if hkmaxkills~=nil then object_destroy(hkmaxkills);hkmaxkills=nil;end
hkmaxkills = createHotkey("MaxKills", VK_SCROLL)
if hkmaxup~=nil then object_destroy(hkmaxup);hkmaxup=nil;end
hkmaxup = createHotkey("DenMaxUp", VK_PRIOR)
if hkmaxdown~=nil then object_destroy(hkmaxdown);hkmaxdown=nil;end
hkmaxdown = createHotkey("DenMaxDown", VK_NEXT)
if hkvarkidswap~=nil then object_destroy(hkvarkidswap);hkvarkidswap=nil;end
hkvarkidswap = createHotkey("VarkidSwap", VK_END)
if hkrestore~=nil then object_destroy(hkrestore);hkrestore=nil;end
hkrestore = createHotkey("RestoreDens", VK_PAUSE)
|
评分
-
1
查看全部评分
-
|