改為 記憶體讀取式 腳本
[General]
Description=自動航行
BeginHotkey=122
BeginHotkeyMod=0
PauseHotkey=0
PauseHotkeyMod=0
StopHotkey=123
StopHotkeyMod=0
RunOnce=1
EnableWindow=大航海時代Online
Enable=1
AutoRun=0
[Repeat]
Type=0
Number=1
[Relative]
SetupOCXFile=
[Comment]
Content=
[Script]
// ============================================
//是否暴風航行
UserVar auto_travel_taifon=DropList{是:1|否:0}=0 是否暴風航行
//是否自動航行
UserVar auto_travel=DropList{是:1|否:0}=0 是否自動航行
//目前位置顯示
VBS write_locate=1
//操帆 訓練開關 自動下錨
VBS auto_close_f=0
//吃料理的最低百分比
UserVar eat_pe=50 行動力
//疲勞吃料理的最低百分比
UserVar weak_pe=50 疲勞度
//自動統帥
UserVar auto_kill=DropList{是:1|否:0}=0 自動統帥
//吃料理1的技能格位置
UserVar eat_s=2 料理位置
//自動施放技能個數
VBS auto_n=13
VBS Dim auto_sk(12)
VBS auto_sk(0)="調度.bmp"
VBS auto_sk(1)="操帆.bmp"
VBS auto_sk(2)="測量.bmp"
VBS auto_sk(3)="警戒.bmp"
VBS auto_sk(4)="運用.bmp"
VBS auto_sk(5)="划船.bmp"
VBS auto_sk(6)="釣魚.bmp"
VBS auto_sk(7)="望風.bmp"
VBS auto_sk(8)="採集.bmp"
VBS auto_sk(9)="生存.bmp"
VBS auto_sk(10)="救助.bmp"
VBS auto_sk(11)="統帥.bmp"
VBS auto_sk(12)="急加速.bmp"
//技能是否使用
VBS Dim auto_b(12)
VBS auto_b(0)=0
VBS auto_b(1)=1
VBS auto_b(2)=1
VBS auto_b(3)=0
VBS auto_b(4)=1
VBS auto_b(5)=0
VBS auto_b(6)=0
VBS auto_b(7)=0
VBS auto_b(8)=0
VBS auto_b(9)=0
VBS auto_b(10)=0
VBS auto_b(11)=0
VBS auto_b(12)=0
//----------------------------------以下請勿修改----------------------------------------------
VBS stateAddr=&H00C01D34
VBS mpAddr=stateAddr+&HC0
VBS maxMpAddr=stateAddr+&HC4
VBS weakAddr=stateAddr+&HD0
VBS personAddr=stateAddr+&HCC
VBS personFightAddr=stateAddr+&HCE
VBS shiphpAddr=stateAddr+&HDA
VBS baiAddr=stateAddr+&HA8
VBS fightAddr=stateAddr+&H8
VBS baiSecAddr=stateAddr+&H84
VBS SailAddr=stateAddr+&H4B0
VBS autoSailAddr=stateAddr+&H4D0
VBS waterAddr=stateAddr+&HD2
VBS woodAddr=stateAddr+&HD8
VBS sinxAddr=stateAddr+&H124
VBS cosxAddr=stateAddr+&H12C
VBS weatherAddr=&H00C042E8
V●禁私人部落格●Addr=&H00C040BC
VBS usedialogAddr=&H00C0409C
//自動航行判斷的等待時間差
VBS check_time=1500
//是否自動開帆
VBS auto_op=1
//判斷是否暴風
VBS auto_trav=1
//航行方向向前
VBS right_click=1
//當前選擇的自動航行腳本
VBS map_name="當前路徑"
//技能只使用一次
VBS Dim auto_b1(12)
VBS auto_b1(0)=0
VBS auto_b1(1)=1
VBS auto_b1(2)=1
VBS auto_b1(3)=1
VBS auto_b1(4)=1
VBS auto_b1(5)=1
VBS auto_b1(6)=1
VBS auto_b1(7)=0
VBS auto_b1(8)=0
VBS auto_b1(9)=0
VBS auto_b1(10)=1
VBS auto_b1(11)=1
VBS auto_b1(12)=0
//螢幕位置偏差值
VBS nx=0
VBS ny=0
//當前行動力
VBS pow_●嚴禁張貼廣告●=0
//當前疲勞度
VBS weak_●嚴禁張貼廣告●=0
//座標資訊
VBS Dim poi(10)
VBS poi(0)="航0.bmp"
VBS poi(1)="航1.bmp"
VBS poi(2)="航2.bmp"
VBS poi(3)="航3.bmp"
VBS poi(4)="航4.bmp"
VBS poi(5)="航5.bmp"
VBS poi(6)="航6.bmp"
VBS poi(7)="航7.bmp"
VBS poi(8)="航8.bmp"
VBS poi(9)="航9.bmp"
VBS poi(10)="航11.bmp"
//測量顯示數字大小
VBS s_x1=6
VBS s_y1=11
//是否抓到 當前螢幕方向
VBS check_po2=1
//是否抓到當前航海座標
VBS check_po=0
//到達航海目標點 偏差值 小於偏差值表示到達
VBS chang_dis=15
//轉向時容許轉向角度偏差
VBS change_ang=3
//螢幕方向
VBS ang=0
//目標點方向
VBS ang_loc=0
VBS pi=4*Atn(1)
//讀取的航行腳本儲存位置
VBS dim map_li(50,1)
//航行腳本的路徑數量
VBS map_li_n=0
//當前航行腳本所在位置
VBS n_loc=0
//第一次執行判斷所在腳本位置
VBS check_loc=0
Gosub 讀取路徑
Gosub check_w
//解除異常
VBS dim si_cu(20)
VBS si_cu(0)="甲板刷.bmp"
VBS si_cu(1)="停戰協議書.bmp"
VBS si_cu(2)="滅火沙.bmp"
VBS si_cu(3)="滅鼠藥.bmp"
VBS si_cu(4)="疾病用特效藥.bmp"
VBS si_cu(5)="萊姆果汁.bmp"
//技能格區域初始值
VBS skill_po_x=0
//當前航海座標
VBS po_x=0
VBS po_y=0
//航海點紀錄
VBS po_x1=0
VBS po_y1=0
//技能格資訊
VBS skill_x=689-800+scrW+nx
VBS skill_y=79+ny
VBS skill_x1=58
VBS skill_y1=54
//判斷測量方向用圖
VBS chuling=0
//-----------------------------------------------------------------------------------
Gosub 初始技能格位置
Rem 開始
Gosub 自動下錨
Gosub 揚帆暴風確認
IfColor 788-800+scrW+nx 104+ny ffffff 1
Gosub ctrlQ
Delay 10
EndIf
Gosub 船員數確認
Gosub 解除異常
Gosub 行動力確認
Gosub 自動施放技能
Gosub 確認座標
If check_po=1
Gosub 確認方向
EndIf
If check_po=1 and check_po2=1
If check_loc=0
Gosub 確認現在位置
VBS check_loc=1
EndIf
Gosub 確認目的方向
Gosub 改變船向
If ang_changed=1
Gosub 等待轉向
Else
Delay 1000
EndIf
Gosub 調整船向
EndIf
Delay 100
Goto 開始
Rem end_script
EndScript
//---------------------------------function------------------------------------------
Sub 等待轉向
VBS old_ang=int(ang)
Gosub 確認方向
Rem rewaite
VBS ang1=ang
Delay 1000
Gosub 確認方向
If abs(ang1-ang)>0.2 or int(ang)=old_ang
Goto rewaite
EndIf
Return
Sub 調整船向
//確認航行方向
If auto_travel>0 and right_click>0
Plugin Bkgnd.KeyPress(hwn,27)
Delay 100
Plugin Bkgnd.RightClick(hwn,100,100)
Delay 1000
//MoveTo 600-800+scrW+nx 300+ny
EndIf
Return
Sub 確認下目標距離
If map_li(n_loc,0)>0 and map_li(n_loc,1)>0
//與下個目的點距離
VBS checklm=Abs(po_x-map_li(n_loc,0))
If checklm>8192
checklm=Abs(16384-checklm)
EndIf
VBS lm=sqr(checklm^2+(po_y-map_li(n_loc,1))^2)
//與上個目的點距離
VBS lm2=-1
If n_loc-1 >=0
VBS checklm=Abs(po_x-map_li(n_loc-1,0))
If checklm>8192
checklm=Abs(16384-checklm)
EndIf
VBS lm2=sqr(checklm^2+(po_y-map_li(n_loc-1,1))^2)
EndIf
EndIf
Return
Sub 初始技能格位置
Rem s1
IfColor 788-800+scrW+nx 104+ny ffffff 0
Gosub ctrlQ
EndIf
VBS b=0
Rem dd1
VBS i=0
For 8
IfColor 680-800+scrW-(i*32)+nx 136+ny ffffff 0
VBS skill_po_x=680-800+scrW-(i*32)+nx
EndIf
VBS i=i+1
EndFor
If skill_po_x>0
Gosub ctrlQ
Else
If b>=10
Goto s1
EndIf
Delay 200
VBS b=b+1
Goto dd1
EndIf
Return
Sub 自動下錨
If auto_close_f>=1
VBSCall FindPic(776-800+scrW+nx,602-600+scrH+ny,796-800+scrW+nx,623-600+scrH+ny,"下錨.bmp",0.9,x,y)
If x>0
Plugin Bkgnd.LeftClick(hwn,x-5-nx,y-31-ny)
Delay 1500
EndIf
EndIf
Return
Sub 揚帆暴風確認
If auto_op>=1
//判斷暴風自動下錨
VBSCall FindPic(757-800+scrW+nx,606-600+scrH+ny,773-800+scrW+nx,623-600+scrH+ny,"暴風.bmp",0.9,x,y)
If x>0 and auto_travel_taifon=0
//自動航行暫時取消
VBS auto_trav=0
VBSCall FindPic(776-800+scrW+nx,602-600+scrH+ny,796-800+scrW+nx,623-600+scrH+ny,"下錨.bmp",0.9,x,y)
If x>0
Plugin Bkgnd.LeftClick(hwn,x-5-nx,y-31-ny)
Delay 500
EndIf
Else
VBS auto_trav=1
Gosub check_black
VBSCall FindPic(775-800+scrW+nx,527-600+scrH+ny,798-800+scrW+nx,540-600+scrH+ny,"已揚帆.bmp",0.9,x,y)
If x<0
Plugin Bkgnd.LeftClick(hwn, 785-800+scrW-5,553-600+scrH-31)
Delay 500
EndIf
EndIf
EndIf
Return
Sub check_black
//背景顏色不為黑色(換海域)
Rem black1
IfColor 768-800+scrW+nx 44+ny 0 0
Delay 100
Goto black1
EndIf
Return
Sub 船員數確認
Gosub check_black
Plugin person_a=Memory.Read16Bit(hwn,personAddr)
Plugin shiphp=Memory.Read16Bit(hwn,shiphpAddr)
IfColor person_a=0 or shiphp=0
// IfColor 50+nx 127+ny 554c4a 0
VBS auto_b(10)=1
EndIf
IfColor 713-800+scrW+nx 502-600+scrH+ny 2f2f2f 0
VBS auto_b(1)=1
EndIf
If auto_kill>0
Plugin state=Memory.Read32Bit(hwn,stateAddr)
If state=&H040000 or state=&H80 or state=&H000040
VBS auto_b(11)=1
EndIf
EndIf
Return
Sub 改變船向
VBS ang_changed=0
If auto_travel=1 and auto_trav=1 and check_po=1 and check_po2=1
VBS r=150:r2=78:x0=407-400+scrW/2:y0=364-300+scrH/2:x=0:y=0
VBS ta1=ang_loc-ang
If abs(ta1)>change_ang
VBS ang_changed=1
VBS ta=(ta1)*pi/180
VBS x=x0+r*sin(ta)+nx
VBS y=y0-r2*cos(ta)+ny
Plugin Bkgnd.LeftDoubleClick(hwn,x-5-nx,y-31-ny)
EndIf
EndIf
Return
Sub 確認目的方向
//與下個目的點距離
VBS checklm=Abs(po_x-map_li(n_loc,0))
If checklm>8192
checklm=Abs(16384-checklm)
EndIf
VBS lm=sqr(checklm^2+(po_y-map_li(n_loc,1))^2)
If lm<=chang_dis
//還未到目的地 換下一目標點
If n_loc<map_li_n-1
VBS n_loc=n_loc+1
Else
//到達目的地 準備下錨進港
VBS auto_trav=0
VBSCall FindPic(776-800+scrW+nx,602-600+scrH+ny,796-800+scrW+nx,623-600+scrH+ny,"下錨.bmp",0.9,x,y)
If x>0
Rem auto_in1
Plugin Bkgnd.LeftClick(hwn,x-5-nx,y-31-ny)
Delay 3000
Plugin Bkgnd.LeftDoubleClick(hwn,405-800+scrW-5,188-31)
VBS b=0
Rem auto_in
IfColor 649-800+scrW+nx 414-600+scrH+ny d1b6b3 0
Plugin Bkgnd.LeftClick(hwn,649-800+scrW-5,414-600+scrH-31)
Goto end_script
Else
VBS b=b+1
If b>200
Goto auto_in1
EndIf
Delay 10
Goto auto_in
EndIf
EndIf
VBS auto_op=0
EndIf
EndIf
//如果航行點為 -1 -1則回圈執行航行點
If map_li(n_loc,0)=-1 and map_li(n_loc,1)=-1
VBS n_loc=0
EndIf
If abs(map_li(n_loc,0)-po_x)>16384/2
If map_li(n_loc,0)<16384/2
VBS n_x=map_li(n_loc,0)+16384-po_x
ElseIf po_x<16384/2
VBS n_x=map_li(n_loc,0)-po_x-16384
EndIf
Else
VBS n_x=map_li(n_loc,0)-po_x
EndIf
VBS n_y=po_y-map_li(n_loc,1)
VBS ang_loc=int(Atn(abs(n_x/n_y))/pi*180)
If n_x>0 and n_y>0
ElseIf n_x>0 and n_y<0
VBS ang_loc=180-ang_loc
ElseIf n_x<0 and n_y<0
VBS ang_loc=180+ang_loc
ElseIf n_x<0 and n_y>0
VBS ang_loc=360-ang_loc
ElseIf n_x=0 and n_y>0
VBS ang_loc=0
ElseIf n_x=0 and n_y<0
VBS ang_loc=180
ElseIf n_x<0 and n_y=0
VBS ang_loc=270
ElseIf n_x>0 and n_y=0
VBS ang_loc=90
EndIf
Return
Sub 解除異常
Gosub check_black
VBS i=-1
Plugin state=Memory.Read32Bit(hwn,stateAddr)
//甲板刷
If state=&H010000
VBS i=0
//火災
ElseIf state=&H10
VBS i=2
//壞血
ElseIf state=&H01
VBS i=5
//疫病
ElseIf state=&H02
VBS i=4
//老鼠
ElseIf state=&H08
VBS i=3
//老鼠
ElseIf state=&H02
VBS keyval=eat_s
Gosub 開技能
EndIf
//停戰
Plugin fight=Memory.Read16Bit(hwn,fightAddr)
If fight>=1
VBS i=1
EndIf
If i>-1
Plugin Window.Active(hwn)
IfColor 788-800+scrW+nx 104+ny ffffff 0
Gosub ctrlW
VBS b=0
Rem su1
//IfColor 315-400+scrW/2+nx,131-300+scrH/2+ny,b3b3b3,0
IfColor 547-400+scrW/2+nx 400-300+scrH/2+ny 0 0
VBSCall FindPic(255-400+scrW/2+nx,126-300+scrH/2+ny,533-400+scrW/2+nx,405-300+scrH/2+ny,si_cu(i),0.9,x,y)
LockMouse
SaveMousePos
If x>0
MoveTo x y
Delay 100
LeftDoubleClick 1
Delay 1000
Else
MoveTo 547-400+scrW/2+nx 390-300+scrH/2+ny
Delay 100
LeftClick 1
Delay 100
VBSCall FindPic(255-400+scrW/2+nx,126-300+scrH/2+ny,533-400+scrW/2+nx,405-300+scrH/2+ny,si_cu(i),0.9,x,y)
If x>0
MoveTo x y
Delay 100
LeftDoubleClick 1
Delay 1000
Else
RightClick 1
EndIf
EndIf
RestoreMousePos
UnlockMouse
Else
VBS b=b+1
If b>300
Goto su2
EndIf
Delay 10
Goto su1
EndIf
Rem su2
EndIf
EndIf
Return
Sub 確認現在位置
VBS le=-1
VBS i=0
//找尋與現在座標最近路徑點
For map_li_n
VBS checklm=Abs(po_x-map_li(i,0))
If checklm>16384/2
checklm=Abs(16384-checklm)
EndIf
VBS lm=checklm+Abs(po_y-map_li(i,1))
If le>lm or le=-1
VBS le=lm
VBS n_loc=i
EndIf
VBS i=i+1
EndFor
//判斷是否再下一個路徑點的路徑上 為真 則變換目標路徑點
If n_loc<map_li_n-1 and map_li(n_loc,0)>0 and map_li(n_loc+1,0)>0
VBS checklm=Abs(po_x-map_li(n_loc,0))
If checklm>8192
checklm=Abs(16384-checklm)
EndIf
VBS lm=checklm+Abs(po_y-map_li(n_loc,1))
VBS checklm=Abs(po_x-map_li(n_loc+1,0))
If checklm>8192
checklm=Abs(16384-checklm)
EndIf
VBS lm2=checklm+Abs(po_y-map_li(n_loc+1,1))
VBS checklm=Abs(map_li(n_loc,0)-map_li(n_loc+1,0))
If checklm>8192
checklm=Abs(16384-checklm)
EndIf
VBS lm3=checklm+Abs(map_li(n_loc,1)-map_li(n_loc+1,1))
If lm+lm2<lm3*1.1
VBS n_loc=n_loc+1
EndIf
EndIf
Return
Sub 自動施放技能
VBS tt=0
VBS i=0
For auto_n
If auto_b(i)=1
VBS askill=i
Gosub 施放技能
If skill_b=1
If auto_b1(i)>=1
VBS auto_b(i)=0
EndIf
Else
VBS auto_b(i)=0
EndIf
EndIf
VBS i=i+1
EndFor
Return
Sub 讀取路徑
VBS dim fso,file,filename,text
VBS filename=map_name
VBS Const ForReading=1
VBS Set fso=CreateObject("Scripting.FileSystemObject")
If fso.FileExists(filename)=-1
VBS Set file=fso.OpenTextFile(filename,ForReading)
VBS i=0
While file.AtEndOfLine<>-1
VBS text=file.ReadLine
VBS s=InStr(text," ")
VBS map_li(i,0)=Int(Left(text,s-1))
VBS map_li(i,1)=Int(Right(text,len(text)-s))
VBS i=i+1
EndWhile
VBS file.Close
VBS map_li_n=i
EndIf
Return
Sub 行動力確認
Plugin mp=Memory.Read16Bit(hwn,mpAddr)
Plugin maxmp=Memory.Read16Bit(hwn,maxMpAddr)
Plugin weak=Memory.Read16Bit(hwn,weakAddr)
VBS pow_●嚴禁張貼廣告●=100
VBS weak_●嚴禁張貼廣告●=0
If maxmp<>0
VBS pow_●嚴禁張貼廣告●=CInt(mp*100/maxmp)
VBS weak_●嚴禁張貼廣告●=CInt(weak/10)
EndIf
If pow_●嚴禁張貼廣告●<eat_pe or weak_●嚴禁張貼廣告●>=weak_pe
VBS keyval=eat_s
Gosub 開技能
EndIf
Return
Sub 確認方向
Plugin n_x = Memory.ReadSingle(hwn, sinxAddr)
Plugin n_y= Memory.ReadSingle(hwn, cosxAddr)
n_y=n_y*-1
PI = 4*Atn(1)
VBS ang=Atn(abs(n_x/n_y))/pi*180
If n_x>0 and n_y>0
ElseIf n_x>0 and n_y<0
VBS ang=180-ang
ElseIf n_x<0 and n_y<0
VBS ang=180+ang
ElseIf n_x<0 and n_y>0
VBS ang=360-ang
ElseIf n_x=0 and n_y>0
VBS ang=0
ElseIf n_x=0 and n_y<0
VBS ang=180
ElseIf n_x<0 and n_y=0
VBS ang=270
ElseIf n_x>0 and n_y=0
VBS ang=90
EndIf
// ang=360-ang
// MessageBox ""&ang
VBS check_po2=1
Return
Sub 確認座標
//座標確認的螢幕上位置
VBS s_x=787-800+scrW+nx
VBS s_y=358-600+scrH+ny
VBS po_n=0
VBS po_z=0
VBS po_x=0
VBS po_y=0
VBS check_po=0
If chuling=0
VBSCall FindPic(663-800+scrW+nx,350-600+scrH+ny,680-800+scrW+nx,380-600+scrH+ny,"測量方向.bmp",1,x,y)
If x>0
VBS chuling=1
VBS chuling_s="測量方向.bmp"
Else
VBSCall FindPic(663-800+scrW+nx,350-600+scrH+ny,680-800+scrW+nx,380-600+scrH+ny,"測量方向1.bmp",1,x,y)
If x>0
VBS chuling=1
VBS chuling_s="測量方向1.bmp"
EndIf
EndIf
EndIf
VBSCall FindPic(663-800+scrW+nx,350-600+scrH+ny,680-800+scrW+nx,380-600+scrH+ny,chuling_s,1,x,y)
If x>0
For 11
VBS i=0
For 11
VBSCall FindPic(s_x,s_y,s_x+s_x1,s_y+s_y1,poi(i),1,x,y)
If x>0
If i<=9
If po_z=0
VBS po_y=po_y+i*10^po_n
Else
VBS po_x=po_x+i*10^po_n
EndIf
VBS po_n=po_n+1
Goto end0
Else
EndIf
Else
VBS i=i+1
If i=10
VBS po_z=1
VBS po_n=0
EndIf
EndIf
EndFor
Rem end0
VBS s_x=s_x-6
EndFor
EndIf
If po_x1=0 and po_y1=0
VBS po_x1=po_x
VBS po_y1=po_y
VBS check_po=1
EndIf
If abs(po_x-po_x1)>16384/2
If 16384-abs(po_x-po_x1)+abs(po_y-po_y1)<150
VBS po_x1=po_x
VBS po_y1=po_y
VBS check_po=1
EndIf
Else
If abs(po_x-po_x1)+abs(po_y-po_y1)<150
VBS po_x1=po_x
VBS po_y1=po_y
VBS check_po=1
EndIf
EndIf
//寫航點紀錄製剪貼簿
If write_locate=1 and check_po=1
Plugin Sys.SetCLB(""&po_x&" "&po_y&" "&n_loc)
EndIf
Return
Sub 施放技能
VBS skill_b=0
Gosub OpenQ
VBSCall FindPic(skill_po_x+21,78+ny,800-800+scrW+nx,229+ny,auto_sk(askill),0.9,x,y)
If x>0
Plugin Bkgnd.LeftClick(hwn,x-5-nx,y-31-ny)
VBS skill_b=1
Else
VBS skill_b=0
Gosub ctrlQ
EndIf
Gosub su_chk
Return
Sub 開技能
VBS skill_b=0
Gosub OpenZ
VBS x=int((keyval-1)/4)*skill_x1+skill_x
VBS y=((keyval-1) mod 4)*skill_y1+skill_y
VBS b=0
IfColor x y b3b3b3 0
VBS b=1
EndIf
IfColor x y bbbbbb 0
VBS b=1
EndIf
If b=1
Plugin Bkgnd.KeyPress(hwn,111+keyval)
VBS skill_b=1
Else
Gosub closeZ
VBS skill_b=0
EndIf
Gosub su_chk
Return
Sub su_chk
VBS b=0
Rem resu_chk
IfColor 788-800+scrW+nx 104+ny ffffff 1
VBS b=b+1
If b>60
Goto end_resu_chk
EndIf
Delay 50
Goto resu_chk
EndIf
Rem end_resu_chk
Return
Sub OpenQ
VBS b=0
Gosub closeWin
// IfColor skill_po_x 104+ny ffffff 1
Gosub ctrlQ
// EndIf
Rem reopenq
IfColor skill_po_x 104+ny ffffff 1
Delay 50
VBS b=b+1
If b>60
Goto end_reopenq
EndIf
Goto reopenq
EndIf
Rem end_reopenq
Return
Sub OpenZ
VBS b=0
Gosub closeWin
//IfColor 662-800+scrW+nx 104+ny ffffff 1
Gosub ctrlZ
// EndIf
Rem reopenz
IfColor 662-800+scrW+nx 104+ny ffffff 1
Delay 50
VBS b=b+1
If b>60
Goto end_fopenz
EndIf
Goto reopenz
EndIf
Rem end_fopenz
Return
Sub closeWin
IfColor skill_po_x 104+ny ffffff 0
Gosub ctrlQ
EndIf
IfColor 662-800+scrW+nx 104+ny ffffff 0
Gosub closeZ
EndIf
Gosub su_chk
Return
Sub closeZ
Plugin Bkgnd.LeftClick(hwn,662-800+scrW-5,104-31)
Return
Sub ctrlZ
Gosub check_black
Plugin Bkgnd.KeyPress(hwn,119)
Return
Sub ctrlQ
Gosub check_black
Plugin Bkgnd.KeyPress(hwn,120)
Return
Sub ctrlW
Gosub check_black
Plugin Bkgnd.KeyPress(hwn,121)
Return
Sub check_w
Plugin hwn=Window.GetKeyFocusWnd()
Plugin winRect=Window.GetClientRect(hwn)
winPoint = Split(winRect, "|", -1, 1)
nx = CInt(winPoint(0))-5
ny = CInt(winPoint(1))-31
VBS scrW= CInt(winPoint(2))
VBS scrH= CInt(winPoint(3))
Return |