leelee56 发表于 2014-11-6 20:33:37

写了个射击LR的脚本但是。。。

本帖最后由 leelee56 于 2014-11-6 20:36 编辑

我写了个 射击LR的 脚本
但是 在游戏里不能用啊
框架也不会写{:5_238:}
求大大搭救



if select(3, UnitClass("player")) == 1 then
-- Rotation
function MarkHunter()
      if Currentconfig ~= "Marksmanship" then
                MarkConfig();
                MarkToggles();
                Currentconfig = "Marksmanship";
      end

            --本地变量
            local Focus = UnitPower("player")
            local FocusRegen = GetPowerRegen()
            local php = getHP("player")
            local thp = getHP("target")
            local bhp = getHP("pet")
            local tarDist = getDistance2("target");
                --检测GH是否启动
                if GodHand_data['Power'] == 0 then
                        ChatOverlay("|cffFF0000GodHand 停止", 0);
                        return;
                        else ChatOverlay("|cffFF0000GodHand 启动", 0);
                end      
      --战斗处理
                if isInCombat("player") then
                        --保命模块
                        --脱战
            if php<=10 then
                if castSpell("player",5384,true,false)then return;
                end
            end
            --糖
            if php<=40 and isInCombat("player")then
               if canUse(5512) then
               UseItemByName(tostring(select(1,GetItemInfo(5512))))
               end
            end
            --威慑
            if php <= 35 and Focus>20 and isInCombat("player") and not siBuff and siCharge>0 then
                if castSpell("player",19263,true,false) then return;
                end
            end
            --治疗宠物
            if bHP<70 and not isBuffed("pet",136) then
                  if castSpell("pet",136,true,false)then return;
                  end
            end
            --战斗模块
            --打断模块
            if canInterrupt("target") and tarDist<=43 then
                if castSpell("target",147362,false,false) then return;
                end
            end
            --AOE模块
            
            if getEnemies("target",8)>=2 then
                  --陷阱发射器
                if not getBuffRemain("player",77769) then
                  if castSpell("player",77769,true,false) then return;
                  end
                end
                --奇美拉射击
                if Focus>35 then
                  if castSpell("target",53209,false,false) then return;
                  end
                end
                --夺命射击
                if thp<=20 then
                  if castSpell("target",53351,false,false)then return;
                  end
                end
                --弹幕射击
                if Focus>60 then
                  if castSpell("target",120360,false,false,true,false) then return;
                  end
                end
                --夺命黑鸦-目标<6
                if getEnemies("target",8)<6 then
                  if Focus>30 then
                        if castSpell("target",131894,false,false,false,false) then return;
                        end
                  end
                end
                --爆炸陷阱
                if castGround("target",82939,43)then return;
                end
                --多重射击
                if Focus>15 and getBuffRemain("player",82921)>0 then
                  if castSpell("target",2643,false,false)then return;
                  end
                elseif Focus>40 and getSpellCD(53209)>4 then
                        if castSpell("target",2643,false,false)then return;
                  end
                elseif Focus>70 and getSpellCD(53209)>1.5 then
                        if castSpell("target",2643,false,false)then return;
                end
                --稳固射击
                if getSpellCD(53209)>2 then
                  if castSpell("target",56641,false,false,true,true)then return;
                  end
                end
            end
            --单体循环
                --急速射击
                if getSpellCD(3045) == 0 then
                  if castSpell("player",3045,true,false)then return;
                  end
                end
                --精确瞄准阶段
                if getBuffRemain("player",3045)>0 or thp>80 then
                        --夺命射击
                        if thp<=20 then
                        if castSpell("target",53351,false,false)then return;
                        end
                  end
                  --奇美拉射击
                  if Focus>35 then
                        if castSpell("target",53209,false,false) then return;
                        end
                  end
                  --夺命黑鸦
                  if Focus>30 then
                        if castSpell("target",131894,false,false,false,false) then return;
                        end
                  end
                  --凶暴野兽
                  if castSpell("target",120679,false,false) then return;
                  end
                  --瞄准射击
                  if Focus>60 and getSpellCD(53209)>1.5 then
                        if castSpell("target",19434,false,false,true,true)then return;
                        end
                  end
                  --稳固射击
                  if getSpellCD(53209)>1.5 then
                        if castSpell("target",56641,false,false,true,true)then return;
                        end
                  end
                --非精确瞄准阶段
                --夺命射击
                elseif thp<=20 then
                  if castSpell("target",53351,false,false)then return;
                  end
                end
                  --奇美拉射击
                  if Focus>35 then
                        if castSpell("target",53209,false,false) then return;
                        end
                  end
                  --凶暴野兽
                  if castSpell("target",120679,false,false) then return;
                  end
                  --夺命黑鸦
                  if Focus >30 then
                        if castSpell("target",131894,false,false,false,false) then return;
                        end
                  end   
                  --瞄准射击
                  if Focus>50 and getSpellCD(53209)>1.5 then
                        if castSpell("target",19434,false,false,true,true)then return;
                        end
                  end
                  --稳固射击
                  if getSpellCD(53209)>1.5 then
                        if castSpell("target",56641,false,false,true,true)then return;
                        end
                  end   
                end


gdys01 发表于 2014-11-6 22:20:42

这个是买的吧,,写都会写你竟然不会 用。。。坑爹啊!!
肯定是一边写一边调试的啊!

leelee56 发表于 2014-11-6 23:04:42

本帖最后由 leelee56 于 2014-11-6 23:13 编辑

gdys01 发表于 2014-11-6 22:20
这个是买的吧,,写都会写你竟然不会 用。。。坑爹啊!!
肯定是一边写一边调试的啊!
GH2.0能在 游戏里写么?我是在 Sublime 里写的

1.几的gh还会用,到2.0就晕头转向了。

gdys01 发表于 2014-11-6 23:18:03

直接在 WOW\Interface\AddOns\GodHand\Rotations
目录下改啊。选择职业文件夹 在选择相应的 天赋 。吧里面--注释的删了,自己写再用 /rl重载

太阳神 发表于 2014-11-17 12:36:22

哈哈 会写不会用 操蛋

wdbw 发表于 2016-12-30 19:23:46

页: [1]
查看完整版本: 写了个射击LR的脚本但是。。。