Quote:
Originally Posted by abadonwar
Honestly, you are a douche. Fricking share that stupid bot. I dont need it, but obviously others would appeciate it. You are on a freebie bot section you scoundrel leecher!
|
Sorry you feel that way but maybe my gwa2 is not public so why would I release it....you dont see anyone else releasing it and they did release basically the whole gwa2 if it matters that much I can post the missing functions that will needed to be added to the gwa2. All it takes is a little reading from the forum here and a little time to do some trial and error and he/she could fix this themselves with the posted gwa2. We all start somewhere I started just as he did not knowing anything just give it some initiative and actually try to learn it if you dont want to wait for the few codes to fix and release it
Here are the added functions to the new gwa2 for current 2.4.0.1 this is assuming you have a functional gwa2 as in you removed the duplicate headers from the header file or from the gwa2 file
Func ResignAndReturn()
Resign()
Local $lTimeout = GetPing() + 10000, $lDeadlock = TimerInit()
Do
If GetPartyDefeated() Then
Sleep(1000)
Return ReturnToOutpost()
EndIf
Sleep(250)
Until TimerDiff($lDeadlock) > $lTimeout
EndFunc ;ResignAndReturn
Func GetPartyDefeated()
Return GetPartyState(0x20)
EndFunc
Func GetPartyState($aFlag)
Local $lOffset[4] = [0, 0x18, 0x4C, 0x14]
Local $lBitMask = MemoryReadPtr($mBasePointer,$lOffset)
Return BitAND($lBitMask[1], $aFlag) > 0
EndFunc ;==>GetPartyState
Func _HasEffect($aSkillId = 0, $aHeroNumber = 0)
Local $lEffects = GetEffects($aHeroNumber)
If $aSkillId = 0 Then Return $lEffects
For $i = 1 To $lEffects[0]
If DllStructGetData($lEffects[$i], 'SkillId') = $aSkillId Then Return 1
Next
EndFunc ;==>HasEffect
;Returns array of effects on player or hero. Index 0 is array size
Func GetEffects($aHeroNumber = 0)
Local $lStatusArrayPtr = GetStatusArrayPtr($aHeroNumber)
Local $lStatuses[1] = [0]
Local $lCount
If $lStatusArrayPtr = 0 Then Return $lStatuses
$lCount = GetEffectCount($lStatusArrayPtr)
ReDim $lStatuses[$lCount + 1]
$lStatuses[0] = $lCount
For $i = 0 To $lCount - 1
$lStatuses[$i + 1] = GetEffectByIndex($i, $lStatusArrayPtr)
Next
Return $lStatuses
EndFunc ;GetEffects
;Returns effect struct
Func GetEffectByIndex($aIndex, $aHeroNumber = 0)
Local $lStatusArrayPtr = GetStatusArrayPtr($aHeroNumber)
If $lStatusArrayPtr = 0 Then Return 0
Local $lEffectsPtr = MemoryRead($lStatusArrayPtr + 0x14, 'ptr')
If $lEffectsPtr = 0 Then Return 0
Return MemoryReadStruct($lEffectsPtr + (24 * $aIndex), DllStructCreate('long SkillId;long EffectType;long EffectId;long AgentId;float Duration;long TimeStamp'))
EndFunc ;GetEffectByIndex
;Returns count of effects on player or hero
Func GetEffectCount($aHeroNumber = 0)
Return MemoryReadOffset(GetStatusArrayPtr($aHeroNumber), 0x1C)
EndFunc ;GetEffectCount
#Region Effects Side functions
;Returns ptr to a status array
Func GetStatusArrayPtr($aHeroNumber = 0)
If IsPtr($aHeroNumber) Then Return $aHeroNumber
Local $lStatusArrayPtr = MemoryReadOffset(GetInstanceBasePtr(), 0x508, 'ptr')
Local $lHeroId = GetHeroId($aHeroNumber)
For $i = 0 To GetStatusArraySize() - 1
$lStatusArrayPtr += 0x24 * $i
If MemoryRead($lStatusArrayPtr) == $lHeroId Then Return $lStatusArrayPtr
Next
Return 0
EndFunc ;GetStatusArrayPtr
;Returns current number of status arrays available
Func GetStatusArraySize()
Return MemoryReadOffset(GetInstanceBasePtr(), 0x510)
EndFunc ;GetStatusArraySize
;Internal use only
Func GetInstanceBasePtr()
Local $lOffset[3] = [0, 0x18, 0x2C]
Local $lReturn = MemoryReadPtr($mBasePointer, $lOffset, 'ptr')
Return $lReturn[1]
EndFunc ;GetInstanceBasePtr
;Internal use only
Func MemoryReadOffset($aAddress, $aOffset = 0, $aType = 'dword')
If $aAddress == 0 Then Return 0
Return MemoryRead($aAddress + $aOffset, $aType)
Endfunc ;MemoryReadOffset
;Internal use only
Func MemoryReadStruct($aAddress, $aStruct = 'dword')
If $aAddress == 0 Then Return 0
If Not IsDllStruct($aStruct) Then $aStruct = DllStructCreate($aStruct)
DllCall($mKernelHandle, 'int', 'ReadProcessMemory', 'int', $mGWProcHandle, 'int', $aAddress, 'ptr', DllStructGetPtr($aStruct), 'int', DllStructGetSize($aStruct), 'int', 0)
Return $aStruct
EndFunc ;MemoryReadStruct
#EndRegion Effects Side functions
#EndRegion Effects
dont remember if i changed anything in the actual main bot file but will try to look and see if i did or not