9/12保留快速躲商場資料.
增加紅點檢測點.請配合停止呼吸使用
其它我覺的有必要增加的功能.請自行瞭解與修改- Dim Box_X1: Dim Box_X2: Dim Box_Y1: Dim Box_Y2
- Dim HP_X: Dim MP_X: Dim HP_Y: Dim MP_Y
- Dim HP_sx: Dim MP_sx
- Dim Color_HP: Dim Color_MP: Dim Color_sHP: Dim Color_sMP
- Dim KEY_HP: Dim KEY_MP: Dim KEY_SHP: Dim KEY_SMP:
- Dim KEY_FIGHT: Dim KEY_PICK
- Dim KEY_SK1: Dim KEY_SK2: Dim KEY_SK3: Dim KEY_SK4: Dim KEY_SK5
- Dim TMR_SK1: Dim TMR_SK2: Dim TMR_SK3: Dim TMR_SK4: Dim TMR_SK5
- Dim T_SK1: Dim T_SK2: Dim T_SK3: Dim T_SK4: Dim T_SK5
- Dim Sk1_Dle: Dim Sk2_Dle: Dim Sk3_Dle: Dim Sk4_Dle: Dim Sk5_Dle
- Dim Fi_Temp: Dim Go2LR: Dim Fi_Mode: Dim WalkCounter
- Dim KeepRun: Dim AutoChng
- Dim Yelo_x: Dim Yelo_y
- Dim maple_wnd: Dim key_wnd
- Dim halt_x: Dim halt_y: Dim halt_color
- Dim Yelo_temp: Dim Ch_temp: Dim temp
- Dim temp_x: Dim temp_y: Dim usercounter:
- Sub Main()
- key_Wnd = HWindow.GetForeground
- HWindow.SetSize key_Wnd,620,300
-
- '==============基本數據設定區==============
- KEY_HP="PageDown": KEY_MP="Insert" '大瓶hp/mp藥水
- KEY_SHP="0": KEY_SMP="9" '小瓶hp/mp藥水
- KEY_FIGHT="PageUp": KEY_PICK="Z"
- TMR_SK1=190: Sk1_Dle=800: KEY_SK1="End" '快劍
- TMR_SK2=190: Sk2_Dle=800: KEY_SK2="Shift" '速度激發
- TMR_SK3=170: Sk3_Dle=800: KEY_SK3="Delete" '掠奪
- TMR_SK4=9999: Sk4_Dle=1000: KEY_SK4="Home"
- TMR_SK5=9999: Sk5_Dle=1: KEY_SK5="Ctrl" '金炸
- Fi_mode=5 : fi_temp=30: Go2LR=1
- '1 定點往右打 Fi_temp:攻擊次數
- '2 定點往左打 Go2LR:一次循環走動次數
- '3 定點左右打
- '4 打中間
- '5 定製品 "Delete" "End" "PageDown" "Insert" "Home"
- '6 左右走動 "PageUp" "Ctrl" "Shift" "Alt"
- '==========================================
- T_SK1=1: T_SK2=1: T_SK3=1: T_SK4=1: T_SK5=1
- KeepRun=1
- Go2LR=1
- walkcounter=1
- Delay 500
- Call setting()
-
- Delay 500
- halt_x=21: halt_y=605 '暫停功能用
- halt_color=GetPixelColor(halt_x,halt_y)
- Color_HP=GetPixelColor(HP_X,HP_Y) '大瓶藥水取色
- Color_MP=GetPixelColor(MP_X,MP_Y)
- Color_sHP=GetPixelColor(HP_SX,HP_Y) '小瓶藥水取色
- Color_sMP=GetPixelColor(MP_SX,MP_Y)
- maple_Wnd = HWindow.GetForeground
- '主程式運作區
- Do While KeepRun=1
- Call chk_halt() '撿查是否暫停
- If autochng=1 Then '紅點自動換平
- Call chchnl(Box_X1,Box_Y1,Box_X2,Box_Y2)
- End If
- Call FixYelo()
- Call ChkSkill() '檢查技能
- Call ChkHpMp() '自動補紅補藍
- Call WalkFight(Go2LR) '自動攻擊
- If walkcounter >= Go2LR *2 Then
- walkcounter=1
- Else
- walkcounter=walkcounter+1
- End If
- Loop
- End Sub
- Sub ChkSkill()
- If TIMER <30 Then
- T_SK1=1
- T_SK2=1
- T_SK3=1
- T_SK4=1
- T_SK5=1
- End If
- If TIMER > T_SK1+TMR_SK1 And tmr_sk1 < 9000 Then
- Delay Sk1_Dle
- KeyPressH KEY_SK1,1
- T_SK1=TIMER
- End If
- If TIMER > T_SK2+TMR_SK2 And tmr_sk2 < 9000 Then
- Delay Sk2_Dle
- KeyPressH KEY_SK2,1
- T_SK2=TIMER
- End If
- If TIMER > T_SK3+TMR_SK3 And tmr_sk3 < 9000 Then
- Delay Sk3_Dle
- KeyPressH KEY_SK3,1
- T_SK3=TIMER
- End If
- If TIMER > T_SK4+TMR_SK4 And tmr_sk4 < 9000 Then
- Delay Sk4_Dle
- KeyPressH KEY_SK4,1
- T_SK4=TIMER
- End If
- If TIMER > T_SK5+TMR_SK5 And tmr_sk5 < 9000 Then
- Delay Sk5_Dle
- KeyPressH KEY_SK5,1
- T_SK5=TIMER
- End If
- End Sub
- Sub ChkHpMp()
- If IsColor(HP_X,HP_Y,Color_HP,0) <> 1 Then '大藥水
- Delay 300
- KeyPressH KEY_HP,1
- End If
- If IsColor(MP_X,MP_Y,Color_MP,0) <> 1 Then
- Delay 300
- KeyPressH key_mp,1
- End If
- If IsColor(HP_SX,HP_Y,Color_sHP,0) <> 1 Then '小藥水
- Delay 300
- KeyPressH KEY_sHP,1
- End If
- If IsColor(MP_sx,MP_Y,Color_sMP,0) <> 1 Then
- Delay 300
- KeyPressH key_smp,1
- End If
- End Sub
- Sub WalkFight(Go2LR)
- Select Case True
- Case Fi_mode=1
- Call fight_a
- Case Fi_mode=2
- Call fight_b
- Case Fi_mode=3
- Call fight_c
- Case Fi_mode=4
- Call fight_d
- Case Fi_mode=5
- Call fight_e
- Case Fi_mode=6
- Call fight_f
- End Select
- End Sub
- Sub fight_a()
- Delay 800
- KeyPressH "RArrow",2
- Call fi_loop()
- Delay 500
- KeyPressH "RArrow",2
- Call fi_loop()
- Delay 500
- KeyPressH "RArrow",2
- Call fi_loop()
-
- KeyDownH "RArrow"
- Delay 3000
- KeyUpH "RArrow" '後續由FIXYELO走回定點
- End Sub
- Sub fight_b()
- Delay 800
- KeyPressH "LArrow",2
- Call fi_loop()
- Delay 500
- KeyPressH "LArrow",2
- Call fi_loop()
- Delay 500
- KeyPressH "LArrow",2
- Call fi_loop()
-
- KeyDownH "LArrow"
- Delay 3000
- KeyUpH "LArrow" '後續由FIXYELO走回定點
- End Sub
- Sub fight_c()
- If walkcounter mod 2 =1 Then
- Delay 800
- KeyPressH "RArrow",2
- Else
- Delay 800
- KeyPressH "LArrow",2
- End If
- Call fi_loop()
- End Sub
- Sub fight_d()
- If walkcounter mod 2 =1 Then
- Delay 500
- KeyDownH "RArrow"
- Delay 1000
- KeyUpH "RArrow"
- Delay 800
- KeyPressH "LArrow",2
- Else
- Delay 500
- KeyDownH "LArrow"
- Delay 1000
- KeyUpH "LArrow"
- Delay 800
- KeyPressH "RArrow",2
- End If
- Call fi_loop() '後續由FIXYELO走回中心點
- End Sub
- Sub fight_e() '刀賊+bomb
- Delay 800
- KeyPressH "LArrow",2
- For usercounter=1 To 4 '奪取
- Call fi_loop()
- Delay 500
- KeyPressH "LArrow",1
- Next
- KeyDownH "RArrow" '炸
- Delay 500
- KeyUpH "RArrow"
- Delay 800
- KeyPressH "LArrow",2
- For USERCOUNT=1 To FI_TEMP / 4
- Delay 1000
- KeyPressH KEY_SK5,1
- Next
- KeyDownH "LArrow" '檢
- Delay 1000
- KeyUpH "LArrow"
- End Sub
- Sub fight_f()
- KeyDownH "RArrow"
- Delay 8000
- KeyUpH "RArrow"
- Delay 300
- KeyDownH "LArrow"
- Delay 8000
- KeyUpH "LArrow"
- Delay 300
- End Sub
複製代碼 接2樓
[ 本文章最後由 SAYHIGH 於 2007-9-13 14:51 編輯 ] |