源码库首页 | 返回资源站 | 论坛
天龙八部3免费脚本[ 点击 29301 次 下载 3702 次 ] [提交者:641155532 ]隐藏/展开脚本说明
更好用的脚本请进QQ群:213375265

//====================商帮出城脚本======================
Sub 商帮出城()
    Rem 寻路
    //打开自动寻路窗口
    dm.KeyDown 18
    dm.KeyPress 192
    dm.KeyUp 18
    Delay 500
    //查找“坐标”字位置并输入移动位置100.156
    dm_ret = dm.FindStr(400, 100, 800, 600,"坐标","fff263-181008",1.0,intX,intY)
    Delay 200
    If intX > 0 and intY > 0 Then
    dm.MoveTo intX + 42,intY + 6
        Delay 200
        dm.LeftClick
        Delay 200
        //SayString "100"
        dm.SendString DYCK,"100"
        Delay 200
        dm.keypress 13
        Delay 200
        //SayString "156"
        dm.SendString DYCK,"156"
        Delay 200
        //移动鼠标到“移动”单击
        dm.keypress 13
        Delay 200
     Else
        Goto 寻路
     End If
    
     //跑路延时
     Delay 5000
    
     //判断是否出城      
     While intX > 0 and intY > 0
           dm.MoveTo intX + 128, intY + 7
           Delay 200
           dm.LeftClick
           Delay 5000
           dm_ret = dm.FindStr(400, 100, 800, 600,"坐标","fff263-181008",1.0,intX,intY)
           Delay 200
     Wend
    
End Sub
//====================返回己方城市脚本======================
Sub 返回己方帮派()
    Rem 返回帮派寻路
    //打开自动寻路窗口
    dm.KeyDown 18
    dm.KeyPress 192
    dm.KeyUp 18
    Delay 500
    //判断是否打开自动寻路
    dm_ret = dm.FindStr(400, 100, 800, 600,"坐标","fff263-181008",1.0,intX,intY)
    Delay 100
    If intX > 0 and intY > 0 Then
        Delay 200
    Else
     Goto 返回帮派寻路
    End If
    //查找指定区域内所有字符串是否含有地图标志人物名称或怪物
    //赋值当前地图为map
        
    dm_ret = dm.FindPic(400, 100, 800, 600, "自动寻路.bmp","000000",0.9,0,intX,intY)  
    Dim x1
    Dim x2
    Dim y1
    Dim y2
    x1 = intX
    y1 = intY + 153
    x2 = intX + 85
    y2 = intY + 167    
    s = dm.Ocr(x1,y1,x2,y2,"ffffff-1b1008", 1.0)
        Delay 200
        
   VBSBegin
        Select Case s
        Case "白堤柳鬼"
        map = "西湖"
        Case "童贯"
        map = "洛阳"
        Case "金钱豹"
        map = "雁南"
        Case "阿林"
        map = "草原"
        Case "阿史那默谷"
        map = "辽西"
        Case "纥石烈阿疏"
        map = "长白山"
        Case "大黑熊"
        map = "黄龙府"
        Case "韦大叔"
        map = "苏州"
        Case "程青霜"
        map = "大理"
        Case "打草谷辽兵"
        map = "雁北"
        Case "江湖游医"
        map = "嵩山"
        Case "许愿树"
        map = "太湖"
        Case "法河"
        map = "龙泉"
        Case "白花蜘蛛"
        map = "武夷"
        Case "甘草"
        map = "梅岭"
        Case "鳄鱼帮打手"
        map = "南海"
        Case "凌忆慈"
        map = "琼州"
        Case "曹延惠"
        map = "敦煌"
        Case "大脸"
        map = "剑阁"
        Case "方光智"
        map = "无量山"
        Case "白景武"
        map = "南诏"
        Case "阿雨"
        map = "苗疆"
        Case "阿支"
        map = "石林"
        Case "简丁"
        map = "洱海"
        Case "古鲁拉"
        map = "玉溪"
        Case "长毛雪怪"
        map = "苍山"
        Case Else
        map = "镜湖"
        End Select
    VBSEnd
     //遍历商线地图  
        k = UBound(MyArray)
        For UBound(MyArray)
            k = k-1
            a = MyArray(k)
            
            If a = map Then
             //当前地图赋值
                inmap = MyArray(k)
                //下一地图赋值
                tomap = MyArray(k-1)
            End If
        Next
    
    //移动下一地图
    dm_ret = dm.FindStr(400, 100, 800, 600,tomap,"ffffff-1b1008",1.0,intX,intY)
Delay 100
dm.moveto intX + 10, intY + 5
Delay 100
dm.LeftClick
Delay 100
dm.LeftClick

//跑路延时
Delay 5000
  
//加速判断F1    
    If Varo2 = 1 Then
        t0 = dm.GetTime()
        T = t0 - t1
            If T/1000-1 > Varo3 Then
               dm.KeyPress 112
               Delay 50
               t1 = dm.GetTime()
               Delay 50
               End If
     End If

//判断进入镜湖地图
dm_ret = dm.FindPic(200, 200, 800, 600, "进入镜湖.bmp","000000",0.9,0,intX,intY)
If intX > 0 and intY > 0 Then
    dm.moveto intX + 20, intY + 10
    Delay 100
    dm.LeftClick
    Delay 500
End If
  
//判断场景切换
dm_ret = dm.FindPic(200, 200, 800, 600, "场景切换.bmp","000000",0.9,0,intX,intY)
If intX > 0 and intY > 0 Then
    Delay 5000
End If

//判断到达目的地
dm_ret = dm.FindPic(0, 0, 800, 600, "城市.bmp","000000",0.9,0,intX,intY)
If intX > 0 and intY > 0 Then
    Delay 1000
Else
    Goto 返回帮派寻路
End If
End Sub
//====================进入己方城市脚本======================
Sub 进入已方城市()
    tomap = MyArray(0)
    dm_ret = dm.FindPic(0, 0, 800, 600, "城市.bmp","000000",0.9,0,intX,intY)
    If intX > 0 and intY > 0 Then
       Delay 50
    Else
        Goto QMScript_8
    End if
    
    If tomap = "城市1" Then
     dm.MoveTo intX + 90,intY + 10
     Delay 100
        dm.LeftClick
        Delay 100
     ElseIf tomap = "城市2" Then
        dm.MoveTo intX + 90,intY + 35
     Delay 100
        dm.LeftClick
        Delay 100
     ElseIf tomap = "城市3" Then
        dm.MoveTo intX + 90,intY + 60
     Delay 100
        dm.LeftClick
        Delay 100
      Else
        dm.MoveTo intX + 90,intY + 85
     Delay 100
        dm.LeftClick
        Delay 100  
      End If
      
    //场景延时
    Delay 5000
    
End Sub
//====================满商卖出商品脚本======================
Sub 满商卖出商品()

    Call 找财政官员()
    Delay 100
    
    //-------打开店铺-------
    Rem 打开店铺
    dm_ret = dm.FindStr(10, 100, 800, 600,"商人店铺","ffd555-180d08",1.0,intX,intY)
    If intX > 0 and intY > 0 Then
        dm.MoveTo intX + 5, intY + 8
        Delay 200
        dm.LeftClick
        Delay 2000
    Else
        Goto 打开店铺
    End If
    
    //-------判断价格-------  
    dm_ret = dm.FindPic(590, 5, 610, 30,"丑.bmp|辰.bmp|未.bmp|戌.bmp","00000",0.9,0,intX,intY)
    If intX >= 0 and intY >= 0 Then
       Goto 卖出商品
    Else
       Goto 打开店铺
    End If
  
    Rem 卖出商品
    //打开包裹ALT+A
    dm.KeyDown 18
    dm.KeyPress 65
    dm.KeyUp 18
    Delay 500
    //-------材料包裹-------  
    dm_ret = dm.FindStr(400, 100, 800, 600,"材料","fdeb78-000000",1.0,intX,intY)    
    If intX > 0 and intY > 0 Then
        dm.MoveTo intX + 15, intY + 6
        Delay 100
        dm.LeftClick
        Delay 500
    Else
        Goto 卖出商品
    End If
    //-------遍历包裹,点击右键卖出-------
    Dim X
    Dim Y
    X = intX - 36
    Y = intY + 36
    
    dm.MoveTo X , Y
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 36, Y
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 72 , Y
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 108 , Y
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 144 , Y
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X , Y + 36
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 36 , Y + 36
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 72 , Y + 36
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 108 , Y + 36
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 144 , Y + 36
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X  , Y + 72
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +36 , Y + 72
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +72 , Y + 72
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +108 , Y + 72
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +144 , Y + 72
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X  , Y + 108
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +36 , Y + 108
        Delay 50
        dm.RightClick
        Delay 50  
    dm.MoveTo X +72 , Y + 108
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +108 , Y + 108
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X +144 , Y + 108
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X  , Y + 144
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 36 , Y + 144
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 72 , Y + 144
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 108 , Y + 144
        Delay 50
        dm.RightClick
        Delay 50
    dm.MoveTo X + 144 , Y + 144
        Delay 50
        dm.RightClick
        Delay 50
        
     //ESC 一次
     Delay 200
     dm.KeyPress 27
     Delay 500
    
End Sub
//====================交还影票脚本======================
Sub 交还银票()

Call 找财政官员()
    Delay 100
    
    //交还银票
Rem 交还银票
dm_ret = dm.FindStr(10, 100, 400, 600,"交还银票","ffd555-000000",1.0,intX,intY)
    If intX > 0 and intY > 0 Then
     dm.MoveTo intX + 15, intY + 8
     Delay 100
        dm.LeftClick
        Delay 100
        dm.LeftClick
        Delay 100
    Else
        Goto 交还银票
    End If
    
    //ESC 一次
    Delay 200  
    dm.KeyPress 27
    Delay 500
    
End Sub
//====================音乐报警脚本======================
//选择MP3文件路径
Event Form1.选择.Click
    Dim MP3
    MP3 = Plugin.File.SelectFile()    //打开选择文件对话框
    If UCase(Right(MP3,4)) = ".MP3" Or UCase(Right(MP3,4)) = ".WAV"  Then
        Form1.路径.Text = MP3
    Else
        If MP3 <> "" Then
            MsgBox "请选择“.mp3或者.wav”音乐格式的文件!"
        End If
    End If
End Event
//播放音乐测试
Event Form1.播放.Click
    Call Plugin.Media.Play(Form1.路径.Text)
End Event
Event Form1.UnLoad
    Call Plugin.Media.Stop()
End Event
//====================关闭窗口脚本======================
Sub 关闭

    dm.KeyPress 27
    Delay 500
Rem 关闭窗口
    dm_ret = dm.FindPic(0, 0, 800, 600, "关闭.bmp","000000",0.9,0,intX,intY)
        If intX > 0 and intY > 0
           dm.KeyPress 27
           Delay 100
           Goto 关闭窗口
        End If
End Sub

//===================答题脚本======================
Sub 答题
    dm_ret = dm.FindPic(0, 0, 800, 600,"C:\TLPS\挂机.bmp","000000",0.9,0,intX,intY)
    If intX >= 0 and intY >= 0 Then
        Call Plugin.Media.Beep(659, 1600)
        Delay 1000
        //播放路径下的“报警”音乐文件
        Call Plugin.Media.Play(Form1.路径.Text)
        Delay 2000
        
        If Form1.答题.ListIndex = 0 Then
           Call 手动答题
        ElseIf Form1.答题.ListIndex = 1 Then
           Call 远程答题
        End If
        
        Call Plugin.Media.Stop()
        
    End If
      
End Sub
Sub 手动答题

//获取反挂机坐标
Rem 手动答题
    dm_ret = dm.FindPic(0, 0, 800, 600,"C:\TLPS\答题.bmp","000000",0.9,0,intX,intY)
    If intX >= 0 and intY >= 0 Then
       Delay 2000
    Else
       Goto 手动答题
    End If
    
    Dim 编号
//获取答案,确定坐标
    编号 = InputBox("请输入答案编号1,2,3,4")
    Delay 2000
    
    If 编号 = 1 Then
       dm.MoveTo intX + 55, intY + 175
       Delay 50
       dm.LeftClick
       Delay 1000
       dm.MoveTo intX + 135, intY + 275
       Delay 50
       dm.LeftClick
       Delay 1000
     ElseIf 编号 = 2 Then
       dm.MoveTo intX + 55, intY + 200
       Delay 50
       dm.LeftClick
       Delay 1000
       dm.MoveTo intX + 135, intY + 275
       Delay 50
       dm.LeftClick
       Delay 1000
     ElseIf 编号 = 3 Then
       dm.MoveTo intX + 55, intY + 225
       Delay 50
       dm.LeftClick
       Delay 1000
       dm.MoveTo intX + 135, intY + 275
       Delay 50
       dm.LeftClick
       Delay 1000
     ElseIf 编号 = 4 Then
       dm.MoveTo intX + 55, intY + 250
       Delay 50
       dm.LeftClick
       Delay 1000
       dm.MoveTo intX + 135, intY + 275
       Delay 50
       dm.LeftClick
       Delay 1000
     Else
       Delay 200
     End If
    
End Sub
Sub 远程答题
//答题截图
    Rem 远程答题
    dm_ret = dm.FindPic(0, 0, 800, 600,"C:\TLPS\答题.bmp","000000",0.9,0,intX,intY)
    If intX >= 0 and intY >= 0 Then
       Delay 1000
    Else
       Goto 远程答题
    End If
    dm_ret = dm.Capture(intX-40,intY+73,intX+140,intY+260,"screen.bmp")
    Delay 20

     Do
    
     Rem 发送
        题目ID = Plugin.lyydt.SendImages(ZH, MM, "11100", "1", "30", "C:\TLPS\screen.bmp", "选项:1,2,3,4")
        If 题目ID > 0 Then
            Exit Do
        ElseIf 题目ID < 0 Then
            Goto 发送
        End If
        Loop
        
        
        答案 = ""
             While 答案 = ""
             答案 = Plugin.lyydt.GetAnswer(ZH, MM, 题目ID)
             Delay 20
                   If 答案 = "1" Then
                      dm.MoveTo intX + 55, intY + 175
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                      dm.MoveTo intX + 135, intY + 275
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                   End If
                   If 答案 = "2" Then
                      dm.MoveTo intX + 55, intY + 200
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                      dm.MoveTo intX + 135, intY + 275
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                   End If
                   If 答案 = "3" Then
                      dm.MoveTo intX + 55, intY + 225
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                      dm.MoveTo intX + 135, intY + 275
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                   End If
                   If 答案 = "4" Then
                      dm.MoveTo intX + 55, intY + 250
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                      dm.MoveTo intX + 135, intY + 275
                      Delay 50
                      dm.LeftClick
                      Delay 1000
                   End If
               Wend
              
End Sub



脚本附件:

运行环境:分辨率:1366x768 色深:32位 操作系统:Microsoft Windows XP 按键精灵版本:9.30.11233
1 2 3 4 5 Next 
1 2 3 4 5 Next 
人投票
(满分10分)
你觉得这个脚本好用吗?



版权所有 2001 – 2015 兄弟软件 闽B2-20130008-14