本帖最後由 taiwan57344 於 2010-1-15 23:25 編輯
//1.請將螢幕設定為800*600 16bit色,執行後程式會自動將視窗固定在左上
//2.無法順利點npc,請自行抓點抓色(抓色目標點: 點NPC後,在右下角會出現名子,抓白色字體的部份)
//3.自定欄設定為F8 城內地圖設定為F11
//4.出港後的技能施放,請放在自定欄內的F1~F3
//5.彩卷放在自定欄內的F8
//6.雖然有寫出翻譯的程式,但還是建議學一下當地的語言,避免行動力不足
//7.如有相關問題,歡迎提出,謝謝 ^^
//使用方式:在碼頭按下快速鍵即可
//程式碼如下:
//=========================我是分隔線=========================
Plugin hwnd=Window.Foreground()
Plugin Window.Move(hwnd,0,0)
dim day,hex
VBS dayAdd=&H00B71A68
VBS hexAdd=&H00B6FAF0
//設定內存位置(日期&體力)
UserVar eat=3 吃料理次數
//設定吃料理次數(預設3次)
Delay 1000
MoveTo 649,412
Gosub 點擊
Delay 6000
//從碼頭進港
Gosub 開地圖
MoveTo 657,216
Gosub 點擊
Delay 14000
//移動到造船廠
KeyPress 27,1
KeyDown 27,1
Delay 1000
Gosub 找船老闆
//找船老闆取船
MoveTo 688,389
Gosub 點擊
Delay 3000
//賣船
KeyPress 40,1
Delay 1000
MoveTo 613,439
Delay 500
//移到確定鍵
IfColor 613,439,abbd44,0
Gosub 點擊
Delay 500
MoveTo 375,285
Gosub 點擊
Delay 2000
Else
MoveTo 669,437
Gosub 點擊
EndIf
//判定是否賣船
MoveTo 652,412
Gosub 點擊
//新造
Delay 3000
For 13
KeyPress 40,1
Delay 150
EndFor
KeyPress 13,1
Delay 1000
//選船-,中型阿拉伯
MoveTo 627,444
Gosub 點擊
//確定
Delay 400
Gosub 點擊
Delay 400
Gosub 點擊
Delay 400
KeyPress 49,1
Gosub 點擊
Delay 3000
//完成造船
Gosub 開地圖
MoveTo 615,181
Gosub 點擊
Delay 4600
//到休息站
KeyPress 27,1
KeyDown 27,1
Delay 1000
Gosub 找休息站老闆
Gosub 吃料理
//吃料理3次
Gosub 開地圖
MoveTo 572,306
Gosub 點擊
Delay 13500
//到碼頭
KeyPress 27,1
KeyDown 27,1
Delay 1000
Gosub 找碼頭官員
//找碼頭官員
Delay 1200
MoveTo 649,387
Gosub 點擊
Delay 6000
//到港口,花7秒
Delay 300
MoveTo 690,388
Gosub 點擊
Delay 1500
MoveTo 208,380
Gosub 點擊
MoveTo 607,422
Delay 500
IfColor 607,422,d1e173,0
Gosub 點擊
Delay 500
Else
Delay 500
MoveTo 661,422
Gosub 點擊
Delay 500
EndIf
//補給
Delay 1000
MoveTo 650,386
Gosub 點擊
Delay 1500
MoveTo 646,416
Gosub 點擊
Delay 6000
//出航
KeyPress 119,1
Delay 1500
KeyPress 112,1
Delay 1000
KeyPress 119,1
Delay 1500
KeyPress 113,1
Delay 1000
KeyPress 119,1
Delay 1500
KeyPress 114,1
Delay 1000
For 5
KeyPress 119,1
Delay 1500
KeyPress 119,1
Delay 1000
EndFor
//放技能自訂1~3+開彩卷5次
//待時12分鐘
a=0
While a=0
Gosub 讀參數
If day>11
MoveTo 15,300
Delay 500
RightDown 1
Delay 1000
MoveTo 750,300
Delay 500
RightUp 1
Delay 500
a=1
EndIf
EndWhile
//11日後,自動尋找3782
Gosub 找3782
EndScript
//==============================================
Sub 點擊
Delay 450
LeftClick 1
Delay 450
Return 點擊
Sub 開地圖
Delay 1000
KeyPress 122,1
Delay 1000
Return 開地圖
Sub 翻譯
Gosub 讀參數
If hex<40
Delay 200
KeyPress 119,1
Delay 1000
KeyPress 118,1
Delay 1000
EndIf
b=0
While b=0
IfColor 651,384,d1dfe0,0
IfColor 641,389,41597e,0
IfColor 662,392,3f4a5e,0
//抓取色彩位置:攀談鍵
Gosub 點擊
Delay 1000
EndIf
EndIf
EndIf
If tmp=1
IfColor 649,383,46c3c8,0
IfColor 643,391,31dde5,0
IfColor 658,390,eceeee,0
//抓取色彩位置:船場老闆購買鍵
b=1
EndIf
EndIf
EndIf
Else
IfColor 647,386,827766,0
IfColor 656,394,726b53,0
//抓取色彩位置:休息店主,點餐鍵
b=1
EndIf
EndIf
EndIf
Delay 300
MoveTo 650,391
Delay 500
EndWhile
Return 翻譯
Sub 找船老闆
tmp=1
a=0
While a=0
Delay 200
KeyPress 9,1
IfColor 635,360,ffffff,0
IfColor 663,373,ffffff,0
IfColor 673,360,ffffff,0
IfColor 686,373,ffffff,0
IfColor 711,373,ffffff,0
//抓取色彩位置:船廠老闆名字白色部份
Delay 300
KeyUp 27,1
Delay 300
KeyPress 13,1
Delay 2000
MoveTo 650,391
Delay 500
Gosub 翻譯
Delay 1500
a=1
EndIf
EndIf
EndIf
EndIf
EndIf
EndWhile
Return 找船老闆
Sub 找休息站老闆
a=0
tmp=2
While a=0
Delay 200
KeyPress 9,1
Delay 300
KeyPress 13,1
IfColor 636,372,ffffff,0
IfColor 668,372,ffffff,0
IfColor 701,370,ffffff,0
//抓取色彩位置:休息站老闆名子白色部份
Delay 300
KeyUp 27,1
Delay 2000
MoveTo 650,391
Delay 500
Gosub 翻譯
a=1
Delay 2000
EndIf
EndIf
EndIf
EndWhile
Return 找休息站老闆
Sub 找碼頭官員
a=0
While a=0
Delay 200
KeyPress 9,1
IfColor 636,361,ffffff,0
IfColor 661,371,ffffff,0
IfColor 677,373,ffffff,0
IfColor 693,372,ffffff,0
//抓取色彩位置:碼頭官員名子白色部份
Delay 300
KeyUp 27,1
Delay 300
KeyPress 13,1
Delay 1000
a=1
EndIf
EndIf
EndIf
EndIf
EndWhile
Return 找碼頭官員
Sub 找3782
a=0
While a=0
KeyPress 9,1
Delay 200
IfColor 636,360,ffffff,0
IfColor 678,373,ffffff,0
IfColor 694,373,ffffff,0
//抓取色彩位置:3782的名子白色部份
KeyPress 13,1
Delay 1000
EndIf
EndIf
EndIf
MoveTo 652,388
IfColor 652,388,ececec,0
IfColor 645,395,607225,0
IfColor 660,395,191c55,0
//抓取色彩位置:出港鍵
a=1
EndIf
EndIf
EndIf
EndWhile
Return 找3782
Sub 讀參數
Plugin day=Memory.Read32Bit(hwnd,dayAdd)
Plugin hex=Memory.Read32Bit(hwnd,hexAdd)
//讀入目前日期及時間
Return 讀參數
Sub 吃料理
MoveTo 650,385
Gosub 點擊
Delay 2000
MoveTo 251,268
Gosub 點擊
Delay 100
MoveTo 389,403
Gosub 點擊
Delay 300
Gosub 點擊
MoveTo 275,324
Gosub 點擊
MoveTo 603,439
Gosub 點擊
Delay 1500
If eat>1
For eat-1
MoveTo 650,385
Gosub 點擊
Delay 2000
MoveTo 603,439
Gosub 點擊
Delay 1500
EndFor
EndIf
Return 吃料理 |