Sign in to follow this  
Followers 0
Newbtastic

My Script Needs Updating....

13 posts in this topic

#1 ·  Posted (edited)

; FishBOT 2

; Globals
$title = âWoW FishBOTâ
$win_title = âWorld of Warcraftâ

$top_border_height = 23
$left_border_width = 4

$screen_width = 800
$screen_height = 600

$time_to_wait = 30000
dim $start_time

; **************************************************
; Hot Keys
HotKeySet("{END}", "Terminate")

; **************************************************
if not WinExists($win_title, â") then
msg($win_title & â window must be open.")
Exit
endif

WinActivate($win_title, â")
WinSetOnTop($win_title, â", 0)
Sleep(500)

check_window()

$win_pos = WinGetPos($win_title, â")
$win_x = $win_pos[0] + $left_border_width
$win_y = $win_pos[1] + $top_border_height

$top = $win_y + (.25 * $screen_height)
$bottom = $top + (.35 * $screen_height) - 1
$left = $win_x + (.15 * $screen_width)
$right = $left + $screen_width - (.15 * 2.0 * $screen_width) - 1

; Show a visual confirmation by making the mouse draw the area on the screen
; that will be used to scan for the bobber.
MouseMove($left, $top, 2)
MouseMove($right, $top, 2)
MouseMove($right, $bottom, 2)
MouseMove($left, $bottom, 2)

cast_pole()
find_float()

; **************************************************
func find_float()
$color_dark_purple = 0x463B4D
$color_dark_blue = 0x283A64
$color_red = 0xA72C0B
$color_stormwind_daylight_blue = 0x2B3254
$color_stormwind_daylight_red = 0x6B1F0C
$color_beige = 0xBB9B3D
$color_night_blue = 0x0B1931

; this is the color used to pixelsearch for the bobber. change the color to a good color
; on the bobber that is prominent on the screen
$color_to_use = $color_red

; this is the search tolerance. In areas where the bobber colors really stand out, you can
; use a fairly high threshold. In areas where the bobber colors are fairly muted in with
; the background, you will have to lower the values considerably.
$bobber_search_tolerance = 30

; itâs better to use lower values here in favor of accurate searching. This will take more
; time for it to detect the bobber, but usually the splash doesnât occur until at least 30%
; of the time has run out, and by that time, it should have detected the bobber (assuming the
; color values and tolerance are correct).
$bobber_search_step = 2

; Search for float. In certain lighting, the part of the float may look more purple than
; blue. In this case, using $color_red tends to work the best with a tolerance of 20.
while 1
if TimerDiff($start_time) >= $time_to_wait then
cast_pole()
endif

$pos = PixelSearch($left, $top, $right, $bottom, $color_to_use, $bobber_search_tolerance, $bobber_search_step)
if @error then
SetError(0)
else
MouseMove($pos[0], $pos[1], 2)
find_splash($pos[0], $pos[1] )
endif
Sleep(10)
wend
endfunc

; **************************************************
func find_splash($float_x, $float_y)
$search_left = $float_x - 32
$search_right = $search_left + 52
$search_top = $float_y - 32
$search_bottom = $search_top + 64

; Usually you do not have to modify the search color for the splash, as the pixels
; have a very distinctive, bright color.
$splash_color = 0xF6F6F6

; Sometimes 30 tolerance works well, sometimes 20 is better in lit areas to avoid catching highlights
; in other things.
$splash_tolerance = 30

; The search step can be pretty small here (1 to 3) without worries because the search area is
; so small once it has been narrowed down - speed isnât much of an issue.
$splash_search_step = 2

; Search for splash
while TimerDiff($start_time) < $time_to_wait
$pos = PixelSearch($search_left, $search_top, $search_right, $search_bottom, $splash_color, $splash_tolerance, $splash_search_step)
if @error then
SetError(0)
else
; Click on the splash
Send("{SHIFTDOWN}")
Sleep(100)
MouseClick("right", $pos[0], $pos[1], 1, 2)
Sleep(100)
Send("{SHIFTUP}")

Sleep(5000)

ExitLoop
endif
Sleep(10)
wend

; Cast pole and start all over again.
cast_pole()
endfunc

; **************************************************
func cast_pole()
$start_time = TimerInit()
Send("1?)
Sleep(3000)
endfunc

; **************************************************
func check_window()
$dimensions = WinGetClientSize($win_title, â")
if $dimensions[0] <> $screen_width or $dimensions[1] <> $screen_height then
msg("*****! Wrong window size. You must use â & $screen_width & âxâ & $screen_height & â resolution in full screen mode.")
Exit
endif
endfunc

; **************************************************
func msg($text)
MsgBox(0, $title, $text)
endfunc

; **************************************************
func msg_array($title, $array, $num_elements)
dim $text
$text = $array[0]

for $j = 1 to $num_elements - 1
$text = $text & â, â & $array[$j]
next

MsgBox(0, $title, $text)
endfunc

; **************************************************
func request_end()
$MB_YESNO = 4
$MB_YES = 6

if MsgBox($MB_YESNO, $title, âEnd script?") == $MB_YES then
Exit
endif
endfunc

; **************************************************
func drain_timer()
Msg("Restart")
$start_time = $start_time - $time_to_wait
endfunc

I updated the hotkey thing but i dont know how to update anything else and i keep getting errors that i dont know how to fix. please help me im very new to this.

Edited by Newbtastic

Share this post


Link to post
Share on other sites



check these Charecters

[ âWoW FishBOTâ ]

what are these?

try to write in english


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

In many parts of the script you're not ending or starting the strings and this will cause errors. Also you're using some weird characters...


Share this post


Link to post
Share on other sites

; FishBOT 2

; Globals
$title = WoW FishBOT
$win_title = World of Warcraft

$top_border_height = 23
$left_border_width = 4

$screen_width = 800
$screen_height = 600

$time_to_wait = 30000
dim $start_time

; **************************************************
; Hot Keys
HotKeySet("{END}", "Terminate")

; **************************************************
if not WinExists($win_title, ") then
msg($win_title &  window must be open.")
Exit
endif

WinActivate($win_title, ")
WinSetOnTop($win_title, ", 0)
Sleep(500)

check_window()

$win_pos = WinGetPos($win_title, ")
$win_x = $win_pos[0] + $left_border_width
$win_y = $win_pos[1] + $top_border_height

$top = $win_y + (.25 * $screen_height)
$bottom = $top + (.35 * $screen_height) - 1
$left = $win_x + (.15 * $screen_width)
$right = $left + $screen_width - (.15 * 2.0 * $screen_width) - 1

; Show a visual confirmation by making the mouse draw the area on the screen
; that will be used to scan for the bobber.
MouseMove($left, $top, 2)
MouseMove($right, $top, 2)
MouseMove($right, $bottom, 2)
MouseMove($left, $bottom, 2)

cast_pole()
find_float()

; **************************************************
func find_float()
$color_dark_purple = 0x463B4D
$color_dark_blue = 0x283A64
$color_red = 0xA72C0B
$color_stormwind_daylight_blue = 0x2B3254
$color_stormwind_daylight_red = 0x6B1F0C
$color_beige = 0xBB9B3D
$color_night_blue = 0x0B1931

; this is the color used to pixelsearch for the bobber. change the color to a good color
; on the bobber that is prominent on the screen
$color_to_use = $color_red

; this is the search tolerance. In areas where the bobber colors really stand out, you can
; use a fairly high threshold. In areas where the bobber colors are fairly muted in with
; the background, you will have to lower the values considerably.
$bobber_search_tolerance = 30

; its better to use lower values here in favor of accurate searching. This will take more
; time for it to detect the bobber, but usually the splash doesnt occur until at least 30%
; of the time has run out, and by that time, it should have detected the bobber (assuming the
; color values and tolerance are correct).
$bobber_search_step = 2

; Search for float. In certain lighting, the part of the float may look more purple than
; blue. In this case, using $color_red tends to work the best with a tolerance of 20.
while 1
if TimerDiff($start_time) >= $time_to_wait then
cast_pole()
endif

$pos = PixelSearch($left, $top, $right, $bottom, $color_to_use, $bobber_search_tolerance, $bobber_search_step)
if @error then
SetError(0)
else
MouseMove($pos[0], $pos[1], 2)
find_splash($pos[0], $pos[1] )
endif
Sleep(10)
wend
endfunc

; **************************************************
func find_splash($float_x, $float_y)
$search_left = $float_x - 32
$search_right = $search_left + 52
$search_top = $float_y - 32
$search_bottom = $search_top + 64

; Usually you do not have to modify the search color for the splash, as the pixels
; have a very distinctive, bright color.
$splash_color = 0xF6F6F6

; Sometimes 30 tolerance works well, sometimes 20 is better in lit areas to avoid catching highlights
; in other things.
$splash_tolerance = 30

; The search step can be pretty small here (1 to 3) without worries because the search area is
; so small once it has been narrowed down - speed isnt much of an issue.
$splash_search_step = 2

; Search for splash
while TimerDiff($start_time) < $time_to_wait
$pos = PixelSearch($search_left, $search_top, $search_right, $search_bottom, $splash_color, $splash_tolerance, $splash_search_step)
if @error then
SetError(0)
else
; Click on the splash
Send("{SHIFTDOWN}")
Sleep(100)
MouseClick("right", $pos[0], $pos[1], 1, 2)
Sleep(100)
Send("{SHIFTUP}")

Sleep(5000)

ExitLoop
endif
Sleep(10)
wend

; Cast pole and start all over again.
cast_pole()
endfunc

; **************************************************
func cast_pole()
$start_time = TimerInit()
Send("1?)
Sleep(3000)
endfunc

; **************************************************
func check_window()
$dimensions = WinGetClientSize($win_title, ")
if $dimensions[0] <> $screen_width or $dimensions[1] <> $screen_height then
msg("*****! Wrong window size. You must use  & $screen_width & x & $screen_height &  resolution in full screen mode.")
Exit
endif
endfunc

; **************************************************
func msg($text)
MsgBox(0, $title, $text)
endfunc

; **************************************************
func msg_array($title, $array, $num_elements)
dim $text
$text = $array[0]

for $j = 1 to $num_elements - 1
$text = $text & ,  & $array[$j]
next

MsgBox(0, $title, $text)
endfunc

; **************************************************
func request_end()
$MB_YESNO = 4
$MB_YES = 6

if MsgBox($MB_YESNO, $title, End script?") == $MB_YES then
Exit
endif
endfunc

; **************************************************
func drain_timer()
Msg("Restart")
$start_time = $start_time - $time_to_wait
endfunc

Sorry thats the correct version. I made .txt first and it error'd my text out.

Share this post


Link to post
Share on other sites

Also, I dont know how to fix these errors. Make this script and try to run it. I get error with the window box thing. Can anyone post a fixed copy of my script because i dont know how to fix it and make it compile correctly.

Share this post


Link to post
Share on other sites

anyone??

Share this post


Link to post
Share on other sites

Ive read a bunch of stuff and still cant run this script. Can anyone help me make this runable? Im very new to this.

Share this post


Link to post
Share on other sites

Ive read a bunch of stuff and still cant run this script. Can anyone help me make this runable? Im very new to this.

You didn't write this script.

In post #3 you were told the first big problem with it. Balancing pairs of quotes is pretty basic. If you won't even do that for yourself, then you are only asking the forum to write the script for you.

That's just not what we do here. We help you do it yourself. Fix the quotes so it comes up clean in SciTE then post again when you have moved on to the next problem. We'll help you with it, but not do it for you.

If you just need the script to work - and don't WANT to learn AutoIt, that's OK to. Hire somebody for a fee to change it for you. Your best bet would be with whoever you got the script from.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

You didn't write this script.

In post #3 you were told the first big problem with it. Balancing pairs of quotes is pretty basic. If you won't even do that for yourself, then you are only asking the forum to write the script for you.

That's just not what we do here. We help you do it yourself. Fix the quotes so it comes up clean in SciTE then post again when you have moved on to the next problem. We'll help you with it, but not do it for you.

If you just need the script to work - and don't WANT to learn AutoIt, that's OK to. Hire somebody for a fee to change it for you. Your best bet would be with whoever you got the script from.

:)

Perfectly Stated Salty

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

if not WinExists($win_title, ") then

That line is broken and I dont know how to fix it.

Share this post


Link to post
Share on other sites

Also I dont need your smart ass attitude salty. I dont even know what the fuck "Balancing pairs of quotes is pretty basic." means.

Share this post


Link to post
Share on other sites

Also show me where the fuck I say this script is mine. The topic might say "My script" but that just means its a script I have in my posession. I never once said i wrote this. How can someone who dont know how to script write a script you fucking idiot. Suck my dick.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0