Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------註冊大漠插件
- PutAttachment ".\plugin", "RegDll.dll"
- PutAttachment ".\plugin\dm", "dm.dll"
- CALL Plugin.RegDll.Reg("C:\test_game\dm.dll")
- Set dm = createobject("dm.dmsoft")
- //這裡設置插件基本目錄
- dm.SetPath "C:\test_game"
- //dm_ret = dm.SetDict(0, "dm_soft.txt")
- // 獲取句柄
- hwnd = dm.GetMousePointWindow()
- // 綁定
- dm_ret = dm.BindWindow(hwnd,"dx","dx2","dx",0)
- //----------------------------------------------------註冊大漠插件結束
- //抓抓的X座標-7 = 大漠的X坐標
- //抓抓的Y座標-29 = 大漠的Y坐標
- Dimenv a
- DimEnv x
- DimEnv n
- Dimenv t
- //-----------------------計時器---------------------------------------------------------------
- Event Form1.LoadOver
- Form1.Timer1.Enabled = 1 //開啟定時器
- Form1.Timer1.Interval = 500 //設置定時器循環的間隔時間(單位:毫秒)
- END Event
- Event Form1.Timer1.TIMER
- a = Form1.InputBox1.Text
- x = Form1.InputBox2.Text
- t = Form1.InputBox3.Text
- END Event
- //-----------------------自定義輸入框---------------------------------------------------------------
- Event Form1.InputBox1.Change
- a = Form1.InputBox1.Text
- END Event
- Event Form1.InputBox2.Change
- x = Form1.InputBox2.Text
- END Event
- Event Form1.InputBox3.Change
- t = Form1.InputBox3.Text
- END Event
- //-----------------------視窗解析度與位置------------------------------------------------------------
- dm.MoveWindow hwnd,0,0
- dm_ret = dm.SetClientSize(hwnd, 800, 600)
- MessageBox "自動喊話開始"
- //-----------------------判斷對話框是否活化----------------------------------------------------------
- dm_ret = dm.FindColor(0,0,2000,2000,"98cc24-000000",0.9,0,intX,intY)
- IF intX >= 0 AND intY >= 0 THEN
- dm.moveto 381, 218
- Delay 200
- dm.leftclick
- END IF
- //-----------------------是否要重複喊話--------------------------------------------------------------
- IF Form1.CheckBox1.Value = 1 THEN
- DO
- CALL 自動喊話()
- LOOP
- ELSE
- CALL 自動喊話()
- END IF
- //-----------------------副程式--------------------------------------------------------------------------
- SUB 自動喊話
- TracePrint a
- TracePrint x
- TracePrint t
- n = 1
- Delay 500
- //---------------------------------------------------------------------------------------------------------------
- FOR x
- dm.KeyPress 13
- dm.moveto 148,218
- dm.leftclick
- Delay 500
- //---------------------------------------------------------------------------------------------------------------
- //判斷頻道
- IF Form1.OptionBox1.Value = 1 THEN
- CALL Plugin.Bkgnd.SendString(hwnd, "/trade " & n)
- ELSEIF Form1.OptionBox2.Value = 1 THEN
- CALL Plugin.Bkgnd.SendString(hwnd, "/global " & n)
- END IF
- //---------------------------------------------------------------------------------------------------------------
- Delay 500
- dm.KeyPress 13
- Delay 500
- dm.KeyPress 13
- Delay 500
- //---------------------------------------------------------------------------------------------------------------
- //判斷頻道
- IF Form1.OptionBox1.Value = 1 THEN
- CALL Plugin.Bkgnd.SendString(hwnd, "$"&a)
- ELSEIF Form1.OptionBox2.Value = 1 THEN
- CALL Plugin.Bkgnd.SendString(hwnd, "#"&a)
- END IF
- //---------------------------------------------------------------------------------------------------------------
- Delay 500
- dm.KeyPress 13
- Delay t
- //---------------------------------------------------------------------------------------------------------------
- IF x = n THEN
- EXIT FOR
- END IF
- n = n + 1
- NEXT
- END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement