小小沫涵 发表于 2014-11-14 00:43:52

刚才看着 大腿们的教程帖子,仿照了一个生存猎人的UI和LUA为什么不能用呢


这个应该是UI界面
if currentConfig ~= "生存猎PVE—晚枫月初落" then
                ClearConfig();
                thisConfig = 0;
                imDebugging = false
    -- 面板标题
   CreateNewTitle(thisConfig,"生存猎-|cff00ccff晚枫月初落");
       
       
               
               
        --保命选项组合
                CreateNewWrap(thisConfig,"【保命模块】");--(CreateNewWrap-他的意思就是开一个新的面板,下面可以有很多选项CreateNewCheck)

        --糖
      CreateNewCheck(thisConfig,"Healthstone");
      CreateNewBox(thisConfig, "Healthstone", 0, 100, 5, 50, "|cffFFBB00低于 |cffFF0000%HP|cffFFBB00 使用 |cffFFFFFF治疗石");
      CreateNewText(thisConfig,"糖");
               
        --控制与打断
                CreateNewWrap(thisConfig,"【控制与打断】");
        --震荡射击
                CreateNewCheck(thisConfig,"ConcussiveShot","勾选则使用震荡射击,焦点仅冰冻前振荡,你懂的");
                CreateNewText(thisConfig,"震荡射击(焦点+目标)");       
        --爆炸陷阱
                CreateNewCheck(thisConfig,"TrapLauncherExplosive","勾选则使用爆炸陷阱");
                CreateNewText(thisConfig,"爆炸陷阱");       
        --冰冻陷阱
                CreateNewCheck(thisConfig,"TrapLauncherFreezing","勾选则使用冰冻陷阱");
                CreateNewText(thisConfig,"冰冻陷阱(焦点)");
        --束缚射击
                CreateNewCheck(thisConfig,"BindingShot","勾选则使用束缚射击");
      CreateNewText(thisConfig,"束缚射击");
        --反制射击
                CreateNewCheck(thisConfig,"CounterShot","勾选则自动使用反制射击");
                CreateNewText(thisConfig,"反制射击");
    --照明弹
      CreateNewCheck(thisConfig,"Flare","勾选则自动使用照明弹,仅限目标为DZ");
      CreateNewText(thisConfig,"照明弹");
        --驱散与自由
                CreateNewWrap(thisConfig,"【驱散与自由】");
        --宁神射击
                CreateNewCheck(thisConfig,"TranquilizingShot","勾选则自动使用宁神射击");
                CreateNewText(thisConfig,"宁神射击");
    --主人的召唤
      CreateNewCheck(thisConfig,"MastersCall","勾选则自动使用主人的召唤");
      CreateNewText(thisConfig,"主人的召唤");       
        --单体战斗
                CreateNewWrap(thisConfig,"【单体战斗】");
        --爆炸射击
                CreateNewCheck(thisConfig,"ExplosiveShot","勾选则使用爆炸射击");
                CreateNewText(thisConfig,"爆炸射击");
        --奥术射击
                CreateNewCheck(thisConfig,"ArcaneShot","勾选则使用奥术射击");
                CreateNewText(thisConfig,"奥术射击");
        --黑箭
                CreateNewCheck(thisConfig,"BlackArrow","勾选则使用黑箭");
                CreateNewText(thisConfig,"黑箭");       
        --眼镜蛇射击
                CreateNewCheck(thisConfig,"CobraShot","勾选则使用眼镜蛇射击");
                CreateNewText(thisConfig,"眼镜蛇射击");               
        --夺命黑鸭
                CreateNewCheck(thisConfig,"AMurderOfCrows","勾选则使用夺命黑鸭");
                CreateNewText(thisConfig,"夺命黑鸭");               
               
               
        --AOE选项组合
                CreateNewWrap(thisConfig,"【群攻】");

        --智能AoE
                CreateNewCheck(thisConfig,"AutoAoE","勾选则满足满足AoE计数时启动AoE模块");
                CreateNewText(thisConfig,"智能AoE");

        --AoE计数
      CreateNewBox(thisConfig, "NumOfAoE", 1, 25, 1, 3, "|cffFFBB00至少 |cffFF0000N个|cffFFBB00 敌人 |cffFFFFFF在近战范围内 ");
      CreateNewText(thisConfig,"AoE计数");
               
               
               
    --杂项组合
                CreateNewWrap(thisConfig,"【杂项】");   
       
        --骑乘选项
      CreateNewCheck(thisConfig,"Mount","勾选则骑乘状态下不运行");
      CreateNewText(thisConfig,"骑乘状态不运行");
               
               
               
        CreateGeneralsConfig();
    WrapsManager();
        end--option结束




这个是生存猎LUA


if select(3, UnitClass("player")) == 3 then
function SurvHunter()

if Currentconfig ~= "Survival Avery" then
        SurvConfig();
--        SurvToggles();
        Currentconfig = "Survival Avery";
      end
      local NL = UnitPower("player");
      local myHP = getHP("player");
--检测GH是否启动
                if GodHand_data['Power'] == 0 then
                        ChatOverlay("|cffFF0000GodHand 停止", 0);
                        return;
                        else ChatOverlay("|cffFF0000GodHand 启动", 0);
                end
--骑乘状态不运行
                if isChecked("Mount") then
                        if UnitIsDeadOrGhost("player") or UnitInVehicle("Player") or IsMounted("player") then return false; end
                end       
--目标打断模块
      if isChecked("CounterShot") and canInterrupt("target") then
            if castSpell("target",147362,true,false) then return; end
      end
--顺发反制射击
      if isChecked("CounterShot") and canInterrupt("focus") then
            if castSpell("focus",147362,true,false) then return; end
      end
--振荡焦点
      if isChecked("ConcussiveShot") and getSpellCD(60192)<2 and not castingUnit("player") and UnitIsPlayer("focus") then
            if castSpell("focus",5116,false,false,true) then return; end
      end
--冰冻陷阱
      if isChecked("TrapLauncherFreezing") and (not castingUnit("player") and UnitIsPlayer("focus")) then
            if castGround("focus",60192,30) then return; end   
      end
--战斗处理
      if isInCombat("player") then
--AOE
      if isChecked("AutoAoE") and useAoE(8) then
                          ChatOverlay("AoE判定启动");


--单体射击
   
       --奥术射击
      if isChecked("ArcaneShot") and isInCombat("player") and not castingUnit("player") then
            if castSpell("player",3044,true,false,1) then return; end



新手求助为什么看不到UI界面,脚本也完全不起作用


小小沫涵 发表于 2014-11-14 00:47:18

沙发是不能给别人的- -

求大腿带

~~~~~~~

话说下个版本生存猎有希望咩

jay454865 发表于 2014-11-14 07:05:43

你比我强啊^_^

鬼谷子* 发表于 2014-11-14 09:24:32

鬼谷子* 发表于 2014-11-14 09:30:06

小小沫涵 发表于 2014-11-14 10:26:19

鬼谷子 发表于 2014-11-14 09:24
UI不显示,并不完全是UI的语句错误,输出循环LUA脚本有错误,UI照样出不来。

粗略看了一下:


谢谢鬼谷先生的解答~{:5_250:}

玄月无尘 发表于 2014-11-14 11:25:12

鬼谷子 发表于 2014-11-14 09:24
UI不显示,并不完全是UI的语句错误,输出循环LUA脚本有错误,UI照样出不来。

粗略看了一下:


我当时也是看到少一堆end,就无力回复了。。。

水发冬菇 发表于 2014-11-14 14:29:07

进来学习的,看着真心头晕,呵呵

太阳神 发表于 2014-11-17 12:35:03

楼主辛苦了{:5_248:}

wdbw 发表于 2016-12-30 20:49:13

页: [1]
查看完整版本: 刚才看着 大腿们的教程帖子,仿照了一个生存猎人的UI和LUA为什么不能用呢