; AutoIt Version: 3.0
; Name: Xfish version 2.0
; Language: English
; Platform: WinXP, Win2k
; Author: xeonz16 (base version)
; berzerkwolf(some tuning changes and added lure function)
;
; Script Function:
; WoW Xfish
; Some hints and tips...Deviate fish and Oily Blackmouth are really the only kind that sell
;in my experience...I'm only 150 fishing though. If you leave bot on all night, it will fill your
;inventory up with 2-3 stacks of 'rare' fish and zillions of stacks of common crappy ones that
;you either destroy or sell fccccor 20c a stack. I've found if you SPIKE your inventory before
;turning the bot on you can catch a way more rare fish. However, this will take longer.
;I've guessed the bot fills up a medium-low sized inventory in about 3-4 hours. For me,
;I have to go to work for periods of about 12 hours anyway, so I spike my inventory, by
;taking a stack of 20 oily blackmouth and splitting them into 20 stacks of 1. After 12 hours
;when I get home I've got 20 stacks of oily blackmouth instead of 2-3 stacks and 20 stacks of
;cheapo fish. You can catch oily blackmouth in the water near ratchet, and deviate fish
; + deviate scales I think in the oasis's scattered around the barrens. If you are gonna
;fish the oasis you need to pick a spot VERY carefully so the wandering centaurs don't
;kill you. When you catch these, you need to sell them to PLAYERS, namely alchemists...they won't
;get you crap from merchants.
;COMMON TROUBLESHOOTING--
;for troubleshooting the first thing you should do is set $splash to 1
; remember to turn it back to zero after you have the bot working...as leaving it on
;will limit the bot's lifespan to about 3-4 hours.
;this allows you to see which stage of the script the bot is in then
;if the mouse moves to a wrong location, then lower $colorvariance
;if the mouse doesn't move and the bot gets hung up on 'searching for feather' raise $colorvariance
;if the mouse moves to the feather, and then the bot says 'FISH!' without a splash, lower $splashvariance
; the bobber splashes and the bot does not do anything, raise $splashvariance
;move the variances in increments of 5 for best result...
;SLIGHTLY MORE ADVANCED TROUBLESHOOTING--
;for trouble FINDING THE BOBBER--
;notice there are several definitions of $feather commented out
;comment out the current one and use another, and then retry adjusting variances
;for trouble WITH SPLASHES--
;there are two pixelsearchs for splash, one uses $day and nother uses $night, you can
;remark one or the other out depending. You can also adjust the $s_offset. This determines
;how many pixels in each direction from the feather the bot 'searches' for the splash.
;if you tighten this down you will have less missfires.
;if you are getting lots of 'moonglare' you might have to move to another side of the lake
;too much moonglare will cause missfires, changing your location might be the only solution.
;
;Added comments by berzerkwolf:
;
;Find places where you can see the sky and got a bright feather
;you can download a autoit source and can change the windows specific names to unusual names for a harder detection of autoit.
;Extract this files to an unusual folder (like "windows folder system32 etc)
;The lurefunction just works if the standard key for the character windows "c" is bind (or change it in this script)
;If you changed the charater frame position at the game, change the coordinates of the rod coordinates
;Change the fleft, fright, fbottom, ftop variable for the coordinates of the fishing rod icon at your weapon slot(use the autoinfo file)
;The coordinates are for a 1280x1024 resolution
;Zoom in with your character to get a first person view
;The key for the lure is 7 (change this key in the script if you ve got an other shortcutnumber)
;For feedback and questions go to [Only registered and activated users can see links. Click Here To Register...] and post your question/feedback at the forum or pm me
;changes by berzerkwolf:
;
; -Added a random function to simulate a more human usage of the rod
; -Added a lure function to combine a lure with the fishing rod
; -Changed some variables for a better tuning
; -Changed some variables for a more lag friendly game
; -Added some needed variables for the new functions
hotkeyset("{ESC}", "Term")
;these are the colorcodes obtained by pantless crab for different splashes
; Colour of splash -
; 0xA2A67D
; 0xC1AD7A
; 0xD0C08D
;this is the box definitions that decide how large of an area to scan for the feather/rod
$left = 110
$top = 240
$right = 1050
$bottom = 530
;fishing rod icon coordinates (change here for the rod at the weapon slot)
$fleft = 150
$ftop = 610
$fright = 195
$fbottom = 655
;these are various variables for the operation of fish bot
$day = 0xF6F6F6;splash color day
$night = 0xFFFFFF;splash color night
;$feather = 0x31314E;day --blue feather
;$feather = 0x1A130F;night --dark dark red
$feather = 0xC33415;day --bright red
;$feather = 0xBD5C27;night --bright red
$colourVariance =30;range of accepted values differing from original code for feather
$splashVariance =10;range of accepted values differing from original code for splash
$step =1;1 = search every pixel, 2 = search every other pixel...etc don't put higher then like 5
$s_offset =25;search offset, basically how large an area to search around the feather for splash
$lureoffset = 1; increases the luretimer
$frod = 0x947235; color of the rod (change this for the different rod types (+5 fishing rod +20 fishing rod etc)
$lureset = 10; change this for the lure you use (i.e. a 10 min lure =10, a 5 min lure =5)
$splash =0;set this to 1 to view GUI messages, so you can tell where the bot gets hung up
;but turn it to zero once the bot is working, and the bot will 'last' for DAYS
;as compared to maybe 4-5 hours with GUI on.
$width = 100; width of GUI box
$height = 60; Height of GUI box--note these two are changed periodically through the script
dim $feather_cord, $time, $sp, $ait1, $ait2, $luretimer, $timelure ;various definitions
$lurediff = $lureset*60000+100000
sleep(5000)
$message = "lurediff set..."
update_splash()
sleep(2000)
frod()
while 1;main loop
sleep(8000)
WinActivate("World of Warcraft")
$lurediff = TimerDiff($timelure)
$message = $lurediff
update_splash()
sleep(3000)
frod()
send("0")
sleep(4000)
$start2 = Timerinit();start timer
;this loop searches for feather
while 1
$dif = TimerDiff($start2)
if $dif > 35000 then;if timer > then 35 seconds then restart bot IE can't find feather
exitloop
endif
sleep(1000)
$message = "Searching for feather..."
$height = 60
update_splash()
;find where the feather is located
$feather_cord = PixelSearch ($left, $top, $right, $bottom, $feather, $colourVariance, $step)
if NOT @error = 1 then
seterror(2);resets @error macro so it doesn't fire next loop
$message = "Found Something."
update_splash()
;setting arrayed cords to variables to allow easier manipulation
$featherx = $feather_cord[0]
$feathery = $feather_cord[1]
mousemove($featherx, $feathery);move mouse to feather
exitloop
endif
WEnd
$start = Timerinit()
;this loop waits for the splash once feather is found
While 1
sleep(400)
$message = "Waiting for bite..."
$height = 100
update_splash()
;calc area of probable splash
$s_left = ($featherx - $s_offset)
$s_top = ($feathery - $s_offset)
$s_right = ($featherx + $s_offset)
$s_bottom = ($feathery + $s_offset)
;these switch between day and night splash...I've been just commenting one of them out
;$sp = Pixelsearch($s_left, $s_top, $s_right, $s_bottom, $day, $splashvariance)
$sp = Pixelsearch($s_left, $s_top, $s_right, $s_bottom, $night, $splashvariance)
$dif = TimerDiff($start)
if $dif > 35000 then;resets bot if no bite within 35 seconds
exitloop
endif
if ubound($sp) > 1 then;if $sp returns cords then shift + rightclick, discards $sp cords
seterror(2)
$message = "Fish!"
$height = 60
update_splash()
send("{shiftdown}")
sleep(900)
mouseclick("right", $featherx, $feathery, 1, 1)
ait1()
sleep($ait1)
send("{shiftup}")
$luretimer = ($luretimer + $lureoffset)
exitloop
sleep($ait1)
endif
WEnd
WEnd
;this func just updates splash message if the variable $splash is set to '1' in the beginning
func update_splash ()
if $splash = 1 then
SplashTextOn( "", $message , $width , $height ,1 ,1 , 17)
endif
endfunc
;exit the script with the escape key
func Term ()
exit
endfunc
;FUNCTIONS ADDED BY berzerkwolf
; this function is for the random timers
func ait1()
if $message= "Fish" then
random,$ait1,3300,10000
random,$ait2,6000,10000
endif
endfunc
; this function is for the lureadding
func frod()
update_splash()
$message = "started frod..."
update_splash()
if $lurediff >= $lureset*60000 then
$timelure = 0
send("c")
sleep(2000)
$message = "Searching for fishing rod..."
$height = 60
;find where the fishing rod is located
$frod_cord = PixelSearch ($fleft, $ftop, $fright, $fbottom, $frod, $colourVariance, $step)
if NOT @error = 1 then
seterror(2);resets @error macro so it doesn't fire next loop
$message = "Found Something."
;setting arrayed cords to variables to allow easier manipulation
$frodx = $frod_cord[0]
$frody = $frod_cord[1]
mousemove($frodx, $frody);move mouse to feather
send("7")
sleep($ait2)
mouseclick("left", $frodx, $frody, 1, 1)
sleep(6000)
$timelure = TimerInit(); starts the luretimer
send("c")
endif
endif
endfunc
|