Check for mobs in range?

Information how to write rotations, how specific functions work
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
5 posts Page 1 of 1
Athravan
Posts:1
Joined:16 Jul 2018, 20:32
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable


Hi there,

Loving the addon so far - looking to write my own rotations.

Is there a way to count the number of mobs in range to then use AOE spells? In both melee and at range?

Thanks
Ath
Kaminaris
Site Admin
Posts:435
Joined:25 Jun 2017, 03:45
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable


No, only pet classes has this ability. You can check how many targets are within your spell ability
Gekopt
Posts:6
Joined:26 Sep 2018, 15:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable


I have the same issue.
I'm writing a rotation for fury warriors and i want to know the mobs that are within my whirlwind range, so i can determine to use whirlwind or not (single vs multi)

I'm using the following

local mobcount = MaxDps:TargetsInRange(_Whirlwind);
print (mobcount);

But the mobcount is always 0
I would've at least expected 1 when i'm hitting a target :)
Kaminaris
Site Admin
Posts:435
Joined:25 Jun 2017, 03:45
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable


You cannot check how many mobs are within aoe ability, never.
BUT you can check how many mobs are within single target melee ability or some other short range single target ability. This works for melee classes well.
Gekopt
Posts:6
Joined:26 Sep 2018, 15:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable


hey,

Somehow i'm still not getting this right apparently (although i thought it worked before)
To get the count i've tried the targetsinrange of a single target melee spell. and that smartaoe function you provide
but this always results in a count of 0.
local abilities = 
{
	bloodthirst = 23881
};

	local mobcount = MaxDps:TargetsInRange(abilities.bloodthirst);
	local targets = MaxDps:SmartAoe();
	print(targets);
	print (mobcount);
Am i missing something here?


Update: Got it , it was because nameplates were turned OFF

Gr GeKopt
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
5 posts Page 1 of 1
drogie łóżka stolik kawowy stół dębowy rozkładany