爱问知识人 爱问教育 医院库

按键精灵提示按键精灵源文件需要需要修改

按键精灵提示按键精灵源文件需要需要修改

[General]
Description=打怪v0.5
BeginHotkey=81
BeginHotkeyMod=2
RunOnce=0
Enable=1
[Repeat]
Type=0
Number=1
[CallBack]
OnSetup=
[Comment]
Content=

[Script]
//大小地图比例
VBS scale=30
//小地图上的最大距离,可以保证人物与怪在一个屏幕
VBS r=7
//人怪相邻时的距离
VBS d=2
//纪录停步时间
VBS t=0
VBS tt=0
//表示移动方向上的偏移,左,下,右,上
VBS dim dirt(4,2)
VBS dirt(0,0)=-30
VBS dirt(0,1)=0
VBS dirt(1,0)=0
VBS dirt(1,1)=80
VBS dirt(2,0)=30
VBS dirt(2,1)=0
VBS dirt(3,0)=0
VBS dirt(3,1)=-30
VBS i=0
VBS dim dirt2(4,2)
VBS dirt2(0,0)=-100
VBS dirt2(0,1)=0
VBS dirt2(1,0)=0
VBS dirt2(1,1)=150
VBS dirt2(2,0)=100
VBS dirt2(2,1)=0
VBS dirt2(3,0)=0
VBS dirt2(3,1)=-100
VBS ii=0
//打怪时鼠标的偏移量,从站的位置开始,从左开始
VBS dim fight(8,2)
VBS fight(0,0)=-40
VBS fight(0,1)=-20
VBS fight(1,0)=-25
VBS fight(1,1)=25
VBS fight(2,0)=5
VBS fight(2,1)=19
VBS fight(3,0)=25
VBS fight(3,1)=25
VBS fight(4,0)=35
VBS fight(4,1)=-20
VBS fight(5,0)=30
VBS fight(5,1)=-30
VBS fight(6,0)=0
VBS fight(6,1)=-50
VBS fight(7,0)=-30
VBS fight(7,1)=-30
VBS iii=0
//定义一个随机数
VBS rand=5
//小地图上人物坐标,此坐标固定
VBS role_x0=739
VBS role_y0=59
//大地图上人物站立位置,此坐标固定,取两脚之间的一点
VBS stand_x=390
VBS stand_y=210
VBS role_x1=390
VBS role_y1=140
//小地图上表示怪物的一点颜色为#0000FF
//小地图位置:左上角680,0        左下角680,120        右下角800,120        右上角800,0
Rem 杀怪
//=====================寻找身边是否有怪==========================
VBSCall Call FindCenterColor(role_x0-d,role_y0-d,role_x0+d,role_y0+d,"0000FF",monster_x0,monster_y0)
//有怪
If monster_x0>=680 and monster_y0>=0
    //在身边直接打怪
    //八个打怪的方向,从左开始,逆时针打过来
    If role_x0>monster_x0 and role_y0-d<monster_y0 and role_y0+d>monster_y0
        iii=0
    EndIf 
    If role_x0>monster_x0 and role_y0<monster_y0
        iii=1
    EndIf 
    If role_x0-d<monster_x0 and role_x0+d>monster_x0 and role_y0<monster_y0
        MoveTo 0 0
        iii=2
    EndIf 
    If role_x0<monster_x0 and role_y0<monster_y0
        iii=3
    EndIf 
    If role_x0<monster_x0 and role_y0-d<monster_y0 and role_y0+d>monster_y0
        iii=4
    EndIf 
    If role_x0<monster_x0 and role_y0>monster_y0
        iii=5
    EndIf 
    If role_x0-d<monster_x0 and role_x0+d>monster_x0 and role_y0>monster_y0
        iii=6
    EndIf 
    If role_x0>monster_x0 and role_y0>monster_y0
        iii=7
    EndIf 
    click_x=stand_x+fight(iii,0)
    click_y=stand_y+fight(iii,1)
    If iii=0
        // click_y=stand_x-20
    EndIf 
    If iii=2
        click_x=stand_x
        click_y=stand_y
    EndIf 
    MoveTo click_x click_y
    LeftClick 1
    Delay 500
    Goto 杀怪
EndIf 
//========================寻找小地图上怪物坐标===========================
VBSCall Call GetCursorPos(x,y)
VBSCall new_color=GetPixelColor(x,y)
Rem 找怪
VBSCall Call FindCenterColor(680,0,800,120,"0000FF",monster_x0,monster_y0)
//有怪
If monster_x0>=680 and monster_y0>=0
    If monster_x0<role_x0 and monster_y0<=role_y0
        //朝怪方向移动,怪在左上侧
        click_x=stand_x-50
        click_y=stand_y-50
    EndIf 
    If monster_x0<=role_x

提交回答

全部答案

    2012-12-28 12:31:43
  • 你的主要问题在于读书不多而想得太多,要多实践,多问,多找,祝你早日找到答案~!

    L***

    2012-12-28 12:31:43

相关推荐

正在加载...
最新问答 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):