本帖最后由 醉骚 于 2015-12-14 11:42 编辑
写了一段函数 能解决你的问题
- function msGetRangeRadianAuraUnit(jl,debuff,spellName,hp,debuffT)
- local nums=GetObjectCount ()
- for i = 1, nums do
- local obj = ObjectWithIndex(i)
- local ObjectName2 = ObjectName(ObjectPointer(obj))
- local unit=ObjectPointer(obj)
-
-
- if ObjectIsType(obj,ObjectTypes.Unit)
- and UnitCanAttack ("player", unit)
- and msGBT(debuff, unit, "player", nil)<=debuffT
- and msGD("player",unit) <= jl
- and UnitHealth(unit)>hp
- and FHINSight(unit)
- --and AutoFaceTarget2(unit)
- then
-
- if msISC(spellName,unit) then
-
- msRun(spellName,unit,0,true);
-
- end
-
- else
- end
- end
- end
- msGetRangeRadianAuraUnit(40,"腐蚀术","腐蚀术",10,3) --用法
复制代码
|