萬歲爺 发表于 2015-11-24 09:22:41

【GC六段】速来大神给此函数加一个时间轴。

本帖最后由 小小沫涵 于 2015-11-26 00:23 编辑

function FHGetRangeRadianCastingUnit(jl,Degrees,spellName)

local name, rank, icon, castTime, minRange, maxRange, spellID = GetSpellInfo(SpellName)

            for i = 1, #FHenemiesTable do
                     local thisUnit = FHenemiesTable.unit
                  if FHObjectDistance("player",thisUnit) < jl and FHgetFacing(thisUnit,Degrees) == true and FHINSight(thisUnit) == trueand UnitIsDeadOrGhost(thisUnit) == false then


                        
                           --local spell, _, _, _, startTime, endTime, _, _, notinterrupt= UnitCastingInfo(thisUnit);
                           --local spell2, _, _, _, startTime2, endTime2, _, _, notinterrupt2= UnitChannelInfo(thisUnit);



                           if amSpellInterrupt(thisUnit) then
                               amrun(spellName,thisUnit);
                                       return true
                           end


                        --[[
                           if UnitCastingInfo(thisUnit) ~= nil and not notinterrupt then
                              local finish = (endTime/1000 - GetTime())/(startTime/1000 - endTime/1000)*100;

                              if finish <= 70 and amSpellCooldown(spellID) == 0 and amcd then
                                       --return thisUnit;
                                    --CastSpellByName(spellName,thisUnit);
                                       amrun(spellName,thisUnit);
                                       return true
                              end
                           end
                           if UnitChannelInfo(thisUnit) ~= nil and not notinterrupt2 then
                              local finish2 = (endTime2/1000 - GetTime())/(startTime2/1000 - endTime2/1000)*100;

                              if finish2 <= 70and amSpellCooldown(spellID) == 0 and amcd then
                                       --return thisUnit;
                                       --CastSpellByName(spellName,thisUnit);
                                       amrun(spellName,thisUnit);
                                       return true
                              end
                           end
                           ]]

                  end

            end
      return false
end

--------------------------求给上面这个函数加个时间轴。非当前目标读条50%时执行。

gungands 发表于 2015-11-24 09:29:08

这是什么高端玩具呀   看不明白

ggdove 发表于 2015-11-24 21:10:30

其实加个时间判断不是难事,但问题是找到现成的读条时间判断函数

萬歲爺 发表于 2015-11-24 22:09:31

ggdove 发表于 2015-11-24 21:10
其实加个时间判断不是难事,但问题是找到现成的读条时间判断函数

........自己写一个有困难?

小小沫涵 发表于 2015-11-26 00:22:50

写的FH?
页: [1]
查看完整版本: 【GC六段】速来大神给此函数加一个时间轴。