mirror of
https://github.com/ulfgebhardt/autoit_wowfishingbot.git
synced 2025-12-13 07:45:57 +00:00
removed ArraySize call since UBound can be utilized
This commit is contained in:
parent
cb36826cf9
commit
b001cffe4e
@ -1,14 +0,0 @@
|
||||
#include <Array.au3>
|
||||
|
||||
Func _ArraySize( $aArray )
|
||||
SetError( 0 )
|
||||
|
||||
$index = 0
|
||||
|
||||
Do
|
||||
$pop = _ArrayPop( $aArray )
|
||||
$index = $index + 1
|
||||
Until @error = 1
|
||||
|
||||
Return $index - 1
|
||||
EndFunc
|
||||
35
fish!.au3
35
fish!.au3
@ -184,19 +184,15 @@
|
||||
; -Autoexit if Window is no longer in focus.
|
||||
;
|
||||
|
||||
|
||||
;Includes
|
||||
#Include <_ArraySize.au3>
|
||||
|
||||
;OPTIONS:
|
||||
;WindowOptions:
|
||||
$windowed_mode = 0 ;If u run the bot in windowmode set windowed_mode to 1, else to 0.
|
||||
$game_res_x = 1600 ;Only nessecary if u are in wondowed_mode!
|
||||
$game_res_y = 1050 ;Only nessecary if u are in wondowed_mode!
|
||||
$search_area_space_left = 400 ;Pixels from the left , wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$search_area_space_right = 400 ;Pixels from the right , wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$search_area_space_top = 200 ;Pixels from the top , wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$search_area_space_bottom = 600 ;Pixels from the bottom, wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$game_res_x = 1920 ;Only nessecary if u are in wondowed_mode!
|
||||
$game_res_y = 1080 ;Only nessecary if u are in wondowed_mode!
|
||||
$search_area_space_left = 500 ;Pixels from the left , wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$search_area_space_right = 500 ;Pixels from the right , wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$search_area_space_top = 250 ;Pixels from the top , wherin the feather is not searched; pixels are counted within the wow-window
|
||||
$search_area_space_bottom = 250 ;Pixels from the bottom, wherin the feather is not searched; pixels are counted within the wow-window
|
||||
|
||||
;GameOptions:
|
||||
$fishing_hotkey = "1" ;Key for the fishingrod on ur hotkeybar
|
||||
@ -223,13 +219,13 @@
|
||||
;othersplash = 0xA2A67D ;some other splashcodes
|
||||
;othersplash = 0xC1AD7A
|
||||
;othersplash = 0xD0C08D
|
||||
dim $feathers[6]
|
||||
$feathers[0] = 0xBFA67B ;day -- pole
|
||||
$feathers[1] = 0xBD5C27 ;night --bright red
|
||||
$feathers[2] = 0x31314E ;day --blue feather
|
||||
$feathers[3] = 0x1A130F ;night --dark dark red
|
||||
$feathers[4] = 0xC33415 ;day --bright red
|
||||
$feathers[5] = 0x8F825B ;day -- pole
|
||||
dim $feathers[1]
|
||||
;$feathers[0] = 0xBFA67B ;day -- pole
|
||||
;$feathers[1] = 0xBD5C27 ;night --bright red
|
||||
$feathers[0] = 0x31314E ;day --blue feather
|
||||
;$feathers[3] = 0x1A130F ;night --dark dark red
|
||||
;$feathers[4] = 0xC33415 ;day --bright red
|
||||
;$feathers[5] = 0x8F825B ;day -- pole
|
||||
|
||||
;SearchParameters:
|
||||
$feather_color_variance = 15 ;range of accepted values differing from original code for feather
|
||||
@ -281,7 +277,7 @@ func main()
|
||||
$time = TimerDiff($timer);timerconrtroll
|
||||
|
||||
if $search_status = 0 then
|
||||
print_log("Searching for feather...")
|
||||
;print_log("Searching for feather...")
|
||||
if search_feather($feathers) = 1 then
|
||||
$search_status = 1 ; Feather found
|
||||
endif
|
||||
@ -312,8 +308,7 @@ endfunc
|
||||
func search_feather($feathers)
|
||||
|
||||
;find where the feather is located
|
||||
|
||||
for $i = 0 to _ArraySize($feathers)-1
|
||||
for $i = 0 to UBound($feathers)-1
|
||||
print_log("Search Feather " + $i)
|
||||
if $windowed_mode = 0 then ;left;top;right;bottom
|
||||
$feather_cord = PixelSearch ( $search_area_space_left, $search_area_space_top, @DesktopWidth- $search_area_space_right, @DesktopHeight - $search_area_space_bottom, $feathers[$i], $feather_color_Variance, $step)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user