LUACN论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
热搜: YJWOW MagicStone BoL
查看: 2056|回复: 5

[综合] 写了个射击LR的脚本但是。。。

[复制链接]
发表于 2014-11-6 20:33:37 | 显示全部楼层 |阅读模式
本帖最后由 leelee56 于 2014-11-6 20:36 编辑

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



  1. if select(3, UnitClass("player")) == 1 then
  2. -- Rotation
  3. function MarkHunter()
  4.         if Currentconfig ~= "Marksmanship" then
  5.                 MarkConfig();
  6.                 MarkToggles();
  7.                 Currentconfig = "Marksmanship";
  8.         end

  9.             --本地变量
  10.             local Focus = UnitPower("player")
  11.             local FocusRegen = GetPowerRegen()
  12.             local php = getHP("player")
  13.             local thp = getHP("target")
  14.             local bhp = getHP("pet")
  15.             local tarDist = getDistance2("target");
  16.                 --检测GH是否启动
  17.                 if GodHand_data['Power'] == 0 then
  18.                         ChatOverlay("|cffFF0000GodHand 停止", 0);
  19.                         return;
  20.                         else ChatOverlay("|cffFF0000GodHand 启动", 0);
  21.                 end        
  22.         --战斗处理
  23.                 if isInCombat("player") then
  24.                         --保命模块
  25.                         --脱战
  26.             if php<=10 then
  27.                 if castSpell("player",5384,true,false)then return;
  28.                 end
  29.             end
  30.             --糖
  31.             if php<=40 and isInCombat("player")then
  32.                if canUse(5512) then
  33.                UseItemByName(tostring(select(1,GetItemInfo(5512))))
  34.                end
  35.             end  
  36.             --威慑
  37.             if php <= 35 and Focus>20 and isInCombat("player") and not siBuff and siCharge>0 then
  38.                 if castSpell("player",19263,true,false) then return;
  39.                 end
  40.             end
  41.             --治疗宠物
  42.             if bHP<70 and not isBuffed("pet",136) then
  43.                     if castSpell("pet",136,true,false)then return;
  44.                     end
  45.             end
  46.             --战斗模块
  47.             --打断模块
  48.             if canInterrupt("target") and tarDist<=43 then
  49.                 if castSpell("target",147362,false,false) then return;
  50.                 end
  51.             end
  52.             --AOE模块
  53.             
  54.             if getEnemies("target",8)>=2 then
  55.                     --陷阱发射器
  56.                 if not getBuffRemain("player",77769) then
  57.                     if castSpell("player",77769,true,false) then return;
  58.                     end
  59.                 end
  60.                 --奇美拉射击
  61.                 if Focus>35 then
  62.                     if castSpell("target",53209,false,false) then return;
  63.                     end
  64.                 end
  65.                 --夺命射击
  66.                 if thp<=20 then
  67.                     if castSpell("target",53351,false,false)then return;
  68.                     end
  69.                 end
  70.                 --弹幕射击
  71.                 if Focus>60 then
  72.                     if castSpell("target",120360,false,false,true,false) then return;
  73.                     end
  74.                 end
  75.                 --夺命黑鸦-目标<6
  76.                 if getEnemies("target",8)<6 then
  77.                     if Focus>30 then
  78.                         if castSpell("target",131894,false,false,false,false) then return;
  79.                         end
  80.                     end
  81.                 end
  82.                 --爆炸陷阱
  83.                 if castGround("target",82939,43)then return;
  84.                 end
  85.                 --多重射击
  86.                 if Focus>15 and getBuffRemain("player",82921)>0 then
  87.                     if castSpell("target",2643,false,false)then return;
  88.                     end
  89.                 elseif Focus>40 and getSpellCD(53209)>4 then
  90.                         if castSpell("target",2643,false,false)then return;
  91.                     end
  92.                 elseif Focus>70 and getSpellCD(53209)>1.5 then
  93.                         if castSpell("target",2643,false,false)then return;
  94.                 end
  95.                 --稳固射击
  96.                 if getSpellCD(53209)>2 then
  97.                     if castSpell("target",56641,false,false,true,true)then return;
  98.                     end
  99.                 end  
  100.             end
  101.             --单体循环
  102.                 --急速射击
  103.                 if getSpellCD(3045) == 0 then
  104.                     if castSpell("player",3045,true,false)then return;
  105.                     end
  106.                 end
  107.                 --精确瞄准阶段
  108.                 if getBuffRemain("player",3045)>0 or thp>80 then
  109.                         --夺命射击
  110.                         if thp<=20 then
  111.                         if castSpell("target",53351,false,false)then return;
  112.                         end
  113.                     end
  114.                     --奇美拉射击
  115.                     if Focus>35 then
  116.                         if castSpell("target",53209,false,false) then return;
  117.                         end
  118.                     end
  119.                     --夺命黑鸦
  120.                     if Focus>30 then
  121.                         if castSpell("target",131894,false,false,false,false) then return;
  122.                         end
  123.                     end
  124.                     --凶暴野兽
  125.                     if castSpell("target",120679,false,false) then return;
  126.                     end
  127.                     --瞄准射击
  128.                     if Focus>60 and getSpellCD(53209)>1.5 then
  129.                         if castSpell("target",19434,false,false,true,true)then return;
  130.                         end
  131.                     end
  132.                     --稳固射击
  133.                     if getSpellCD(53209)>1.5 then
  134.                         if castSpell("target",56641,false,false,true,true)then return;
  135.                         end
  136.                     end  
  137.                 --非精确瞄准阶段
  138.                 --夺命射击
  139.                 elseif thp<=20 then
  140.                     if castSpell("target",53351,false,false)then return;
  141.                     end
  142.                 end
  143.                     --奇美拉射击
  144.                     if Focus>35 then
  145.                         if castSpell("target",53209,false,false) then return;
  146.                         end
  147.                     end
  148.                     --凶暴野兽
  149.                     if castSpell("target",120679,false,false) then return;
  150.                     end
  151.                     --夺命黑鸦
  152.                     if Focus >30 then
  153.                         if castSpell("target",131894,false,false,false,false) then return;
  154.                         end
  155.                     end   
  156.                     --瞄准射击
  157.                     if Focus>50 and getSpellCD(53209)>1.5 then
  158.                         if castSpell("target",19434,false,false,true,true)then return;
  159.                         end
  160.                     end
  161.                     --稳固射击
  162.                     if getSpellCD(53209)>1.5 then
  163.                         if castSpell("target",56641,false,false,true,true)then return;
  164.                         end
  165.                     end   
  166.                 end
复制代码



回复

使用道具 举报

发表于 2014-11-6 22:20:42 | 显示全部楼层
这个是买的吧,,写都会写你竟然不会 用。。。坑爹啊!!
肯定是一边写一边调试的啊!
回复 支持 反对

使用道具 举报

 楼主| 发表于 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就晕头转向了。
回复 支持 反对

使用道具 举报

发表于 2014-11-6 23:18:03 | 显示全部楼层
直接在 WOW\Interface\AddOns\GodHand\Rotations
目录下改啊。选择职业文件夹 在选择相应的 天赋 。吧里面--注释的删了,自己写  再用 /rl重载
回复 支持 反对

使用道具 举报

发表于 2014-11-17 12:36:22 | 显示全部楼层
哈哈 会写不会用 操蛋
回复 支持 反对

使用道具 举报

发表于 2016-12-30 19:23:46 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

小黑屋|手机版|Archiver|LUACN论坛

GMT+8, 2024-4-30 08:42 AM , Processed in 0.053563 second(s), 26 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表