月雅 发表于 2012-10-23 08:55

求一个1.11养蜂脚本,一个下午时间全浪费在晶石怪和蜜蜂对V当中了.才变了5只蜂王.求大神

时间全浪费在晶石怪和蜜蜂对V当中了.挂一下午才出五只蜂王.郁闷中

以前1.02时有个养蜂脚本.到1.11后可能是基址变了.不能用了.我把基址改了下.点扏行脚本没出错提示.就是变蜂王时提示发现 513563 怪物.可是就是不变蜂王.求个脚本.要是有大神告诉个基址也行啊.谢谢了.下面另附我改了1.11基址的 1.0.2养蜂脚本. 求大神

ObjScan = createMemScan()
BaseAddress = getAddress('[[[[["Borderlands2.exe"+013A9448]+38]+2BC]+358]+1E4]+0')
Count = 0
ObjResult = {}
CurrentObj = 0
AdultVarkidAddress = 0


function DenFind()
   memscan_firstScan(ObjScan,soExactValue,vtDword,"",BaseAddress,"0","0x00000000","0x70000000","",fsmAligned,"4",false,false,true,false)
   memscan_waitTillDone(ObjScan)
   ObjResult = createFoundList(ObjScan)
   foundlist_initialize(ObjResult)
   Count = foundlist_getCount(ObjResult) - 1
   CurrentObj = 1
   showMessage("Found " .. Count .. " Enemy Spawns")
end

createHotkey("DenFind",45)


function KillReset()
for i=1,Count do
   local offset = foundlist_getAddress(ObjResult,i)
   local address = getAddress(offset .. "+84")
   writeInteger(address,0)
end
end

function MaxUp()
for i=1,Count do
   local offset = foundlist_getAddress(ObjResult,i)
   local address = getAddress(offset .. "+60")
   local CurVal = readInteger(address)
   writeInteger(address,CurVal + 1)
end
end

function MaxDown()
for i=1,Count do
   local offset = foundlist_getAddress(ObjResult,i)
   local address = getAddress(offset .. "+60")
   local CurVal = readInteger(address)
   if CurVal > 1 then
   writeInteger(address,CurVal - 1)
   end
end
end


createHotkey("KillReset",36)
createHotkey("MaxUp",33)
createHotkey("MaxDown",34)

function VarkidSwap()
   for i=3,Count-2 do
      local offset = foundlist_getAddress(ObjResult,i)
      if readInteger(getAddress("[" .. offset .. "+24]+44")) == 2 then
         if readInteger(getAddress("[[" .. offset .. "+24]+40]+2c")) == 990057071 then
            AdultVarkidAddress = "[[" .. offset .. "+24]+40]+0"
            --showMessage("AdultVarkidFound = " .. AdultVarkidAddress)
         end
      end
   end
   local VarScan = createMemScan()
   local Varkid = readInteger('[' .. AdultVarkidAddress .. ']+0')
   memscan_firstScan(VarScan,soExactValue,vtDword,"",Varkid,"0","0x00000000","0x70000000","",fsmAligned,"4",false,false,true,false)
   memscan_waitTillDone(VarScan)
   local VarResult = createFoundList(VarScan)
   foundlist_initialize(VarResult)
   local VarCount = foundlist_getCount(VarResult) - 1
   --showMessage("Found " .. VarCount .. " Enemy Spawns")
   for i=1,VarCount do
       local offset = foundlist_getAddress(VarResult,i)
      if readString(getAddress("[[[" .. offset .. "+AC]+44]+4]+0"),10,true) == "Vermi" then
         showMessage("Adult Varkids Replaced with Vermi")
         writeInteger(getAddress(AdultVarkidAddress),getAddress(offset))
      end
   end
end
createHotkey("VarkidSwap",35)

基址怎么算的啊不懂啊.求大神

tianyamingyue 发表于 2012-10-23 09:19

变蜂王怎么用??是不是按下搜索然后直接按end键位?

月雅 发表于 2012-10-23 09:21

这个好像是改过的.你试试 按下INSERT   再按HOME

526885984 发表于 2012-10-23 09:25

才变了5只,,很少吗

tianyamingyue 发表于 2012-10-23 09:46

http://bbs.3dmgame.com/thread-3468860-1-1.html 这个好像是1.11的,至少复活怪物 增加复活次数是有用的,但是变身好像没用?

DarkMars 发表于 2012-10-23 09:49

本帖最后由 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 == nil then
   iNewCount = iNewCount + 1
   DenData = 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 ~= nil then
   writeInteger(aSpawnCount, DenData)
    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)

kycx3000 发表于 2012-10-23 10:13

http://bbs.3dmgame.com/thread-3463988-1-3.html 这是我找来的,两个,一个个试试,刷怪可以用,蜂王没试,我还没打到有蜂子的地方
页: [1]
查看完整版本: 求一个1.11养蜂脚本,一个下午时间全浪费在晶石怪和蜜蜂对V当中了.才变了5只蜂王.求大神