发新话题
打印

[发表插件] ShortKey 4.21 全能动作按键绑定

另一个例子,在所有职业中,“X”键都被我用来放置主要控制技能,我用ShortKey把“X”键绑定到一个特定的按钮上去,代码如下:

ShortKey.Config[1] = {
        --通用
        {Key = "X", Type = "command", Value = "ACTIONBUTTON8"},
}

这样,不管我用哪个职业只要把这个职业的主要控制技能放到主动作条的8号按钮上就可以了。在使用QS时,我把“惩戒”放在了8号按钮上,由于“惩戒”CD时间很长,我希望在它CD时这个按键可以实现其他的功能,所以我为这个按键编写了一段宏代码“/castsequence 惩戒,圣光术,无;”,如果我把这段代码做成宏放在这个按钮上,那么当我去别的地方使用时如果没有拷贝配置文件的话,这个按钮将显示为“空”,比如去网吧。这个时候我用ShortKey专门建立了一套配置,代码如下:

ShortKey.Config[2] = {
        --通用
        Class = "圣骑士",
        Character= "石头的尸体",
        {Key = "X", Type = "macro", Value = "/castsequence 惩戒,圣光术,无;"},
}

这样,如果我使用ShortKey的话,这个QS的“X”键会是一段宏代码,如果我没有使用ShortKey(比如在网吧),"X"键至少还会放出“惩戒”技能。但由于同一按键不同类型会有冲突,所以要想让这段代码正常工作得改成如下样式:

ShortKey.Config[2] = {
        --通用
        Class = "圣骑士",
        Character= "石头的尸体",
        {Key = ",", Type = "command", Value = "ACTIONBUTTON8"},
        {Key = ".", Type = "command", Value = "ACTIONBUTTON8"},
        {Key = "X", Type = "macro", Value = "/castsequence 惩戒,圣光术,无;"},
}
本帖最近评分记录
  • simonw 声望 +5 谢谢支持 2007-12-23 21:45

TOP

回复 181# 的帖子

to redv1981

先谢谢你一下子写了这么多!  谢谢你的支持.
我想你的意思是不是就是同一个按键如果冲突, 后面的(序号大的)应当覆盖前面的(序号小的)Config设置?  目前的逻辑应当是这样的, 如果不是应该是bug了, 最近争取抽空测试下.

TOP

是的,就是这个意思,我现在找到了一种解决方法,虽然还得多加一个配置,但是已经不用浪费按键了。

ShortKey.Config[2] = {
        --通用
        Class = "圣骑士",
        Character= "石头的尸体",
        {Key = "Q", Type = "command", Value = ""},
        {Key = "Q", Type = "macro", Value = "/use [flyable] 雪色狮鹫; 召唤战马;\n/dismount [mounted]"},
}
本帖最近评分记录
  • simonw 声望 +5 很强, 我都没有想到的方法. 2007-12-25 17:13

TOP

如果想设定中键作用在非框体上要怎么写?

{Key = "MiddleButton", Type = "macro", Value = "/stopcasting\n/cast 法术反制"},
不能对目标反制..应该只在框体作用..

TOP

回复 184# 的帖子

你只能直接绑定到鼠标滚轮上 Key = "MOUSEWHEELUP"

其他鼠标键则必须绑定在框体上.

TOP

经过测试,还是不支持xperl

TOP

回复 186# 的帖子

很快就会支持了

TOP

有个疑问,如果定义小队的XPERL 要用""的话 没用吧应该?
XParty = {"XPerl_party1, XPerl_party2, XPerl_party3, XPerl_party4"},
还能用吗,都成了字符变量了,好像不能发挥作用了

TOP

XParty = {"XPerl_party1", "XPerl_party2", "XPerl_party3", "XPerl_party4"},
这样

TOP

不过还有一事不明,那XPERL的团队框体有有40个,难道要像XParty = {"XPerl_raid1", "XPerl_raid2", "XPerl_raid3", ................},
声明40个?
有没有好点的方法?

TOP

回复 190# 的帖子

没有, 你可以随便用个程序写个循环输出这个格式复制粘贴就行了

TOP

另外这样声明下来内存会不会占用很大啊

TOP

回复 192# 的帖子

不会, 你可以在使用前后查查你的内存变化. 最多多个0.x k

TOP

打算用下试试
想请问下2.4对这个没有影响吧?

TOP

{Key = "k", Type = "macro", Value = "/run local f=GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end"},
请问这个句子为什么会报错 该怎样应用? 在WOW里面直接用宏是正常的

(神了,我又把此句整个粘贴进去,这次居然好用了,令人惊奇啊)

TOP

我在用鼠标按键绑定队友时有效  队友框为PartyMemberFrameX
现在我想把鼠标按键绑定在从团队筐里拖出来的团队成员上
用插件看了他们的名字叫 RaidPullout1Button1  绑定后无效果   是不是因为他们不是Frame的原因啊

发下我的战士配置吧  貌似有人要
ShortKey.Config[5] = {
Class = "战士",
----Character = "恨天无名",


        {Key = "E", Type = "spell", Value = "压制", Target = "target", Condition = "stance-1"},
        {Key = "E", Type = "spell", Value = "战斗姿态", Target = "player", Condition = "stance-2"},
        {Key = "E", Type = "spell", Value = "战斗姿态", Target = "player", Condition = "stance-3"},
        {Key = "F", Type = "spell", Value = "防御姿态", Target = "player", Condition = "stance-1"},
        {Key = "F", Type = "spell", Value = "盾牌格挡", Target = "player", Condition = "stance-2"},
        {Key = "F", Type = "spell", Value = "防御姿态", Target = "player", Condition = "stance-3"},
        {Key = "R", Type = "spell", Value = "狂暴姿态", Target = "player", Condition = "stance-1"},
        {Key = "R", Type = "spell", Value = "狂暴姿态", Target = "player", Condition = "stance-2"},
        {Key = "R", Type = "spell", Value = "拳击", Target = "target", Condition = "stance-3"},
        {Key = "1", Type = "macro", Value = "/startattack\n/cast 致死打击", Target = "target",},
        {Key = "2", Type = "macro", Value = "/startattack\n/cast 撕裂", Target = "target", Condition = "stance-1"},
        {Key = "2", Type = "macro", Value = "/startattack\n/cast 撕裂", Target = "target", Condition = "stance-2"},
        {Key = "2", Type = "macro", Value = "/startattack\n/cast 旋风斩", Target = "target", Condition = "stance-3"},
        {Key = "3", Type = "macro", Value = "/startattack\n/cast 断筋", Target = "target", Condition = "stance-1"},
        {Key = "3", Type = "macro", Value = "/startattack\n/cast 缴械", Target = "target", Condition = "stance-2"},
        {Key = "3", Type = "macro", Value = "/startattack\n/cast 断筋", Target = "target", Condition = "stance-3"},
        {Key = "4", Type = "macro", Value = "/startattack\n/cast 英勇打击", Target = "target", Condition = "stance-1"},
        {Key = "4", Type = "macro", Value = "/startattack\n/cast 复仇", Target = "target", Condition = "stance-2"},
        {Key = "4", Type = "macro", Value = "/startattack\n/cast 狂暴之怒", Condition = "stance-3"},
        {Key = "5", Type = "macro", Value = "/startattack\n/cast 雷霆一击", Condition = "stance-1"},
        {Key = "5", Type = "macro", Value = "/startattack\n/cast 雷霆一击", Condition = "stance-2"},
        {Key = "5", Type = "macro", Value = "/startattack\n/cast 英勇打击", Target = "target", Condition = "stance-3"},
        {Key = "Q", Type = "macro", Value = "/startattack\n/cast 冲锋", Target = "target", Condition = "stance-1"},
        {Key = "Q", Type = "macro", Value = "/startattack\n/cast [target=target,help]援护;[target=targettarget,help]援护", Condition = "stance-2"},
        {Key = "Q", Type = "macro", Value = "/startattack\n/cast 拦截", Target = "target", Condition = "stance-3"},
        {Key = "BUTTON3", Type = "spell", Value = "血性狂暴"},
        {Key = "SHIFT-BUTTON3", Type = "spell", Value = "感知"},       
        {Key = "MOUSEWHEELUP", Type = "spell", Value = "投掷", Target = "target"},
        {Key = "MOUSEWHEELDOWN", Type = "spell", Value = "刺耳怒吼", Target = "target"},
        {Key = "SHIFT-MOUSEWHEELUP", Type = "macro", Value = "/use 13", Target = "player"},
        {Key = "SHIFT-MOUSEWHEELDOWN", Type = "macro", Value = "/use 14", Target = "player"},
        {Key = "ALT-MOUSEWHEELUP", Type = "spell", Value = "死亡之愿", Target = "target"},
        {Key = "ALT-MOUSEWHEELDOWN", Type = "spell", Value = "破胆怒吼", Target = "target"},
        {Key = "Z", Type = "spell", Value = "乘胜追击", Target = "target"},
        {Key = "~", Type = "spell", Value = "猛击", Target = "target"},
        {Key = "X", Type = "spell", Value = "顺劈斩", Target = "target"},       
        {Key = "C", Type = "macro", Value = "/stopcasting\n/use [nocombat]黑色军用座虎缰绳\n/cast [combat,stance:1]斩杀\n/cast [combat,stance:3]斩杀\n/cast [combat,stance:2]狂暴姿态", Smart = ture},
         {Key = "SHIFT-C", Type = "item", Value = "黑色军用座虎缰绳", Target = "player"},
  {Key = "T", Type = "spell", Value = "挫志怒吼", Target = "target"},       
  {Key = "G", Type = "macro", Value = "/cast [nostance:3]法术反射\n/cast [stance:3]防御姿态", Smart = ture},
        {Key = "ALT-1", Type = "item", Value = "厚灵纹布绷带", Target = "player"},
        {Key = "SHIFT-R", Type = "spell", Value = "战斗怒吼", Target = "player"},
        {Key = "SHIFT-F", Type = "spell", Value = "命令怒吼", Target = "player"},       

}
本帖最近评分记录
  • simonw 声望 +5 有价值的内容 2008-6-18 12:18

TOP

回复 196# overskay 的帖子

你把你如何写的发下, 只有是button和checkedbutton类型才能被绑定, 不过看起来应该是button类型, 你再验证下. 也可能是游戏载入后运行时动态生成的窗体, 用/sk ;配置代码 调试技巧试试看.

TOP

楼主回的真快啊
用调试了  也不行
你看看代码对吗
ShortKey.ExtFrame = {
        --自定义小队窗体名称
        Party = {PartyMemberFrame1,PartyMemberFrame2,PartyMemberFrame3,PartyMemberFrame4},
        --自定义目标窗体名称
        Target = {TargetFrame},
        --自定义XPerl头像插件玩家窗体名称, 非blz默认的第三方插件窗体最好使用引号引住窗体名称
        XPerlPlayer = {"XPerl_Player"},
        --自定义团队窗体名称--
        Raid = {RaidPullout1Button1,RaidPullout1Button2,RaidPullout1Button3},
}

----------------------------牧师部分---------------
ShortKey.Config[2] = {
        Class = "牧师",
        --Character = "恨天无间道",

        --在小队头像上按鼠标左键会为该小队成员施放"快速治疗"法术,
        {Key = "LeftButton", Type = "spell", Value = "快速治疗", TargetFrames = ShortKey.ExtFrame.Raid},
        {Key = "MiddleButton", Type = "spell", Value = "真言术:盾", TargetFrames = ShortKey.ExtFrame.Raid},
  {Key = "RightButton", Type = "spell", Value = "驱散魔法", TargetFrames = ShortKey.ExtFrame.Raid},
        }

TOP

回复 198# overskay 的帖子

Raid = {"RaidPullout1Button1","RaidPullout1Button2","RaidPullout1Button3"}, 都用引号引住.

然后把raid窗口调出来, 然后聊天窗口执行
/sk {Key = "LeftButton", Type = "spell", Value = "快速治疗", TargetFrames = ShortKey.ExtFrame.Raid}

应该可以的.

TOP

这个好像不太适合我这样的懒人用啊,要放在4年前我肯定会去弄一弄,现在连PITBULL我都快懒得去设置了……

TOP

发新话题