Return
Sub 什么地方Sub
RecColorArr = Array("", "", "", "", "")
RecColorArr(0) = GetPixelColor(342,192)
RecColorArr(1) = GetPixelColor(460,192)
RecColorArr(2) = GetPixelColor(608,192)
RecColorArr(3) = GetPixelColor(413,192)
RecColorArr(4) = ColorStrFindPlace(RecColorArr(0), RecColorArr(1), RecColorArr(2), RecColorArr(3), 15)
If RecColorArr(4)<>""
place = RecColorArr(4)
If debugon=300
MsgBox place,0,"什么地方Sub"
EndIf
Else
place = "未知地图"
EndIf
Return
Sub 防卡刷新第N分钟
//防卡刷新第N分钟使用设置: TimeOutRefreshTimeArray(2)设置时间
If TimeOutRefreshTimeArray(0)=0
Plugin TimeOutRefreshTimeArray(0)=GetSysInfo.GetTime()
Plugin TimeOutRefreshTimeArray(1)=GetSysInfo.GetTime()
Else
Plugin TimeOutRefreshTimeArray(1)=GetSysInfo.GetTime()
If TimeOutRefreshTimeArray(1)-TimeOutRefreshTimeArray(0)>TimeOutRefreshTimeArray(2)
KeyPress 13,1
Gosub 刷新部分
EndIf
EndIf
Return
Sub 防卡刷新
Gosub DEBUGKEY
If rere>20 or LastDebugKey=191
MoveTo 515,406
LeftClick 1
Delay 150
KeyPress 13,1
Delay 150
Gosub 刷新部分
EndIf
rere=rere+1
Return
Sub 防卡刷新60
If rere>60
MoveTo 515,406
LeftClick 1
Delay 150
KeyPress 13,1
Delay 150
Gosub 刷新部分
EndIf
rere=rere+1
Return
Sub 刷新部分
Dim RefreshResult
Dim RefreshLoop
reref = 1
rere = 0
//
RefreshResult = 0
RefreshLoop = 0
While (ColorCompare(GetPixelColor(503,561),"6B6D31",20)<=0 Or ColorCompare(GetPixelColor(496,627),"2928C6",25)<=0 Or RefreshLoop=0) And RefreshLoop<20
If newwindow>0
//关闭窗口重新打开新窗口方法
Plugin Window.Close(mlxthw)
Plugin mlxthw=Window.Find(0,"魔力学堂")
Plugin ismlxthw=Window.IsWindow(mlxthw)
While ismlxthw=1
Plugin Window.Close(mlxthw)
Plugin mlxthw=Window.Find(0,"魔力学堂")
Plugin ismlxthw=Window.IsWindow(mlxthw)
Delay 500
EndWhile
//不好用...
//Plugin mlxthw=Window.Find("IEFrame",0)
//Plugin ismlxthw=Window.IsWindow(mlxthw)
//While ismlxthw=1
// Plugin Window.Close(mlxthw)
// Plugin mlxthw=Window.Find("IEFrame",0)
// Plugin ismlxthw=Window.IsWindow(mlxthw)
// Delay 500
//EndWhile
//
//强制关闭所有IE!
VBSBegin
dim bag,pipe
set bag=getobject("winmgmts:\\.\root\cimv2")
set pipe=bag.execquery("select * from win32_process where name='IEXPLORE.EXE'")
For each i in pipe
i.terminate()
next
VBSEnd
Delay 3000
//重新打开状态窗口
ShowStateWin
notexit=1
//执行下面Sub只为了打开新窗口,设置notexit=1
Gosub 调整魔力学堂窗口位置Sub
notexit=0
Delay 1000