//before use this script:
//1: set 1024*768, close all disply effects, close hardware point
//2: open skill book, drag fishing out, set hotkey ALT+P
//3: if you want to automatically add bait
// 1)create a macro:
// /script for k=0,4 do if not GetWeaponEnchantInfo(16) then for w=1,22 do if GetContainerItemLink(k,w) and string.find(GetContainerItemLink(k,w),"YOURBAITNAME") then UseContainerItem(k,w); PickupInventoryItem(16);AutoEquipCursorItem();end;end;end;end
// 2)change YOURBAITNAME to your bait name
// 2)Drag this macro out, set hotkey: ALT+O
// 3)use bait: 1, don't use bait:0
//4: face water, only water in your vision
UserVar fishertime=0
If fishertime<>0
KeyDown 18,1
KeyPress 79,1
KeyUp 18,1
Delay 6000
starttime=now
EndIf
timeagain=0
dela=0
Rem start
timeagain=timeagain+1
//scan center
x=398:y=200
dim color0(2)
dim avcolor
dim ddcolor
dim yy
dim dr
dim dg
dim db
dim xlong
dim xx
//use fishing Pole
KeyDown 18,1
KeyPress 80,1
KeyUp 18,1
Delay 2100
//space between scan point
v=35
delaytime=0
//scan 20 times
a=1:b=0
j=7:k=1
p=1
For 12
For 2
n=a*j+b*k
For n
x=x+a*p*v:y=y+b*p*v
MoveTo x,y
Delay 40+dela
IfColor x y 000000 0
Delay 100
IfColor x y 000000 0
MoveTo x,y+50
Goto over1
EndIf
Goto over2
EndIf
EndFor
c=a:a=b:b=c
EndFor
p=p*(-1)
j=j+1:k=k+1
EndFor
If dela<9
Dela=dela+8
EndIf
Goto start
Rem over2
a=1:b=0
j=1:q=1
p=1
For 6
For 2
n=a*j+b*q
For n
x=x+a*p*v:y=y+b*p*v
MoveTo x,y
Delay 120
IfColor x y 000000 0
Delay 100
IfColor x y 000000 0
Goto over1
EndIf
EndIf
EndFor
c=a:a=b:b=c
EndFor
p=p*(-1)
j=j+1:q=q+1
EndFor
Dela=dela+10
Goto start
//scan bobber 1
Rem over1
Delay 100
xx=x
yy=y+50
If k=1
yy=yy+10
EndIf
For 70
MoveTo xx,yy
Delay 10+dela
IfColor xx yy 000000 0
y0=yy
MoveTo x-80 y0-20
Goto over3
EndIf
yy=yy-2
EndFor
Rem over3
//scan bobber 2
Delay 100
xx=x-60
yy=y0-20
For 50
MoveTo xx,yy
Delay 10+dela
IfColor xx yy 000000 0
x0=xx
Goto over7
EndIf
xx=xx+2
EndFor
Rem over7
//scan bobber 3
dim color0(2)
xx=x0+14
yy=y0+20
MoveTo xx,yy+1
Delay 100
VBSCall cpix=GetPixelColor(xx,yy)
color0(0)=cint("&H"&left(cpix,2))
color0(1)=cint("&H"&mid(cpix,3,2))
color0(2)=cint("&H"&right(cpix,2))
For 70
MoveTo xx,yy+1
yy=yy-1
VBSCall cpix=getpixelcolor(xx,yy)
dr=abs(color0(2)-cint("&H"&right(cpix,2)))
dg=abs(color0(1)-cint("&H"&mid(cpix,3,2)))
db=abs(color0(0)-cint("&H"&left(cpix,2)))
avcolor=int((dr+db+dg)/3)
ddcolor=abs(dr-avcolor)+abs(dg-avcolor)+abs(db-avcolor)
If ddcolor>10 or dr+dg+db>100
y0=yy
x0=xx
Goto over4
EndIf
Rem re1
color0(0)=cint("&H"&left(cpix,2))
color0(1)=cint("&H"&mid(cpix,3,2))
color0(2)=cint("&H"&right(cpix,2))
EndFor
Goto start
Rem over4
//wait...
xx=x0
yy=y0-5
ddcolor=0
i=0
VBSCall cpix=GetPixelColor(xx,yy)
color0(0)=cint("&H"&left(cpix,2))
color0(1)=cint("&H"&mid(cpix,3,2))
color0(2)=cint("&H"&right(cpix,2))
While 1>0
If delaytime>28000
Goto start
EndIf
i=i+1
VBSCall cpix=getpixelcolor(xx,yy)
dr=abs(color0(2)-cint("&H"&right(cpix,2)))
dg=abs(color0(1)-cint("&H"&mid(cpix,3,2)))
db=abs(color0(0)-cint("&H"&left(cpix,2)))
avcolor=int((dr+db+dg)/3)
ddcolor=abs(dr-avcolor)+abs(dg-avcolor)+abs(db-avcolor)
If ddcolor>40 or dr+dg+db>150
Goto over5
EndIf
EndWhile
Rem over5
//pull fish pole
MoveTo xx+50,yy+50
Delay 100
MoveTo xx,yy
KeyDown 16,1
RightClick 1
KeyUp 16,1
Delay 2000
//add BUFF every 5 min
If datediff("s",starttime,now)>303 and fishertime<>0
KeyDown 18,1
KeyPress 79,1
KeyUp 18,1
Delay 6000
starttime=now
dela=0
EndIf
goto start
rem over