Advertisement
Guest User

自動領倉

a guest
Feb 6th, 2015
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 3.43 KB | None | 0 0
  1. /*----------------------------------------------------註冊大漠插件
  2. PutAttachment ".\plugin", "RegDll.dll"
  3. PutAttachment ".\plugin\dm", "dm.dll"
  4. CALL Plugin.RegDll.Reg("C:\test_game\dm.dll")
  5. Set dm = createobject("dm.dmsoft")
  6. //這裡設置插件基本目錄
  7. dm.SetPath "C:\test_game"
  8. //dm_ret = dm.SetDict(0, "dm_soft.txt")
  9. // 獲取句柄
  10. hwnd = dm.GetMousePointWindow()
  11. dm.MoveWindow hwnd, 0, 0
  12. CALL Plugin.WINDOW.Active(Hwnd)
  13. // 綁定
  14. dm_ret = dm.BindWindow(hwnd, "normal", "dx2", "normal", 0)
  15. ----------------------------------------------------註冊大漠插件結束*/
  16. hwnd = Plugin.WINDOW.MousePoint()
  17. CALL Plugin.WINDOW.Move(hwnd,0,0)
  18.  
  19.  
  20.  
  21. DIM MyArray
  22. DIM Mypage
  23. Dimenv i
  24. i = 0
  25.  
  26. //---------------------------主程序-------------------------------
  27. CALL 選取倉庫
  28. Delay 500
  29. CALL 強調物品
  30. CALL 領取物品
  31. WHILE page(i) > 0
  32.     CALL 選取倉庫
  33.     Delay 500
  34.     CALL 領取物品
  35. WEND
  36. MessageBox "該物品領取完畢"
  37. //----------------------------------------------------------------
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. //--------------------------選取倉庫------------------------------
  48. SUB 選取倉庫
  49.     MoveTo 363,108
  50.     Delay 50
  51.     LeftClick 1
  52.     Mypage = Form1.InputBox2.Text
  53.     page = split(Mypage, ",")
  54.     FOR page(i)
  55.         KeyPress "Down", 1
  56.     NEXT
  57.     KeyPress "Enter", 1
  58.     MoveTo 363,108
  59.     Delay 50
  60.     LeftClick 1
  61.  
  62. END SUB
  63. //----------------------------------------------------------------
  64. //--------------------------強調物品------------------------------
  65. SUB 強調物品
  66.  
  67.     IF Form1.OptionBox1.Value = 1 THEN
  68.         Item = Form1.InputBox1.Text
  69.     ELSE
  70.         IF Form1.ComboBox1.ListIndex = 0 THEN
  71.             Item = "alteration"
  72.         ELSEIF Form1.ComboBox1.ListIndex = 1 THEN
  73.             Item = "chromatic"
  74.         ELSEIF Form1.ComboBox1.ListIndex = 2 THEN
  75.             Item = "jeweller"
  76.         ELSEIF Form1.ComboBox1.ListIndex = 3 THEN
  77.             Item = "fusing"
  78.         ELSEIF Form1.ComboBox1.ListIndex = 4 THEN
  79.             Item = "alchemy"
  80.         ELSEIF Form1.ComboBox1.ListIndex = 5 THEN
  81.             Item = "random chance"
  82.         ELSEIF Form1.ComboBox1.ListIndex = 6 THEN
  83.             Item = "blacks"
  84.         ELSEIF Form1.ComboBox1.ListIndex = 7 THEN
  85.             Item = "portal scroll"
  86.         ELSEIF Form1.ComboBox1.ListIndex = 8 THEN
  87.             Item = "carto"
  88.         END IF
  89.     END IF
  90.    
  91.     MoveTo 361,528
  92.     Delay 100
  93.     LeftClick 1
  94.     MoveTo 273, 528
  95.     Delay 100
  96.     LeftClick 1
  97.     CALL Plugin.WINDOW.SendString(hwnd,Item)
  98.     TracePrint Item
  99.     Delay 1000
  100. END SUB
  101. //----------------------------------------------------------------
  102. //--------------------------領取物品------------------------------
  103. SUB 領取物品
  104.     XY=Plugin.Color.FindMutiColor(16,119,371,476,"1E0707","3|0|78B5E8,0|3|78B5E8,3|3|78B5E8",1)
  105.     MyArray = Split(XY, "|")
  106.     intX = CINT(MyArray(0)) : intY = CINT(MyArray(1))
  107.     WHILE intX > 0 AND intY > 0
  108.         KeyDown "Ctrl", 1
  109.         MoveTo intX - 15, intY - 10
  110.         Delay 50
  111.         LeftClick 1
  112.         TracePrint "XY座標為" & intX+15 & " , " & intY+10
  113.         Delay 50
  114.         XY=Plugin.Color.FindMutiColor(16,119,371,476,"1E0707","3|0|78B5E8,0|3|78B5E8,3|3|78B5E8",1)
  115.         MyArray = Split(XY, "|")
  116.         intX = CINT(MyArray(0)) : intY = CINT(MyArray(1))
  117.         KeyUp "Ctrl", 1
  118.     WEND
  119.     i = i + 1
  120. END SUB
  121. //----------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement