Code: Select all
sub GetXY(str,arnum)
arnum[0]=val(mid(str, 7, 3))
arnum[1]=val(mid(str, 10, 3))
end sub
sub decode()
var temp='',i=0
var pos=0
var line=5
var sX=0, sY=0
var code=''
var finding = 1
var CurrX=0
var CurrY=0
var NumSum
dim tempXY[2]
dim Num[9]
Num[0]=6
Num[1]=35
Num[2]=45
Num[3]=-24
Num[4]=34
Num[5]=-5
Num[6]=26
Num[7]=4
Num[8]=-6
Repeat
temp=uo.LastGump('command',line)
GetXY(temp, tempXY)
if pos >= 17 then
if pos == 17 then
NumSum=(CurrX-sX)*10+(CurrY-sY)
finding = 1
i=0
while finding
if NumSum == num[i] then
code=code+str(i+1)
finding = 0
end if
i=i+1
wend
end if
if tempXY[0]-CurrX > 5 then
pos=0
end if
end if
if not pos then
sX=tempXY[0]
sY=tempXY[1]
pos=15
line=line+15
end if
CurrX=tempXY[0]
CurrY=tempXY[1]
pos=pos+1
line=line+1
Until len(code) == 4
return code
end sub
sub AAmacro()
while not uo.dead()
if uo.LastGump('text',0) == 'enter anti macro code:' and uo.LastGump('replyed') == 0 then
uo.lclick(uo.LastGump('x')+75, uo.LastGump('y')+69)
wait(300)
uo.say(decode())
wait(300)
uo.lclick(uo.LastGump('x')+77, uo.LastGump('y')+108)
end if
wait(1000)
wend
end sub
Вобщем в чём проблема как заставить включиться ААмакро() если в журнале не появляется сообщение 'enter anti macro code:' , а просто вылазиет сама таблица.Кто нибуть знает?