View Full Version : Get Target - Hate List
Kilralpine
01-22-2009, 05:21 PM
What is the best way to do the following...
Get Highest Hate List Target, And Cast a Spell on him
I basically want to move Vyzh`dra The Exileds Deathtouch to a Perl timer; that will cast it on the main tank every 5 minutes...
Basically the only part I am not sure of is how to get the target, and how to cast a spell to that specific target
joligario
01-22-2009, 08:29 PM
Wouldn't the top of the hate list already be targetted? Not sure if you could just cast the spell on the timer without specifying the target. Then again, there's probably a $npc->GetTarget() type of command anyways.
ChaosSlayer
01-22-2009, 11:51 PM
I like to expand this question and add that I am looking for a simular way to work with Hate list.
Basicly some sort of a comand that allows me to select random or even sort the hate list for various purposes.
For exmaple:
-select random person on hate list
-select specific person on hate list (like 6th)
-reverse hate list (the 1st becomes last and vice-verse)
-find specific class on hate list (like cleric)
-find specific race
-find a pet
etc
and things like that. IMHO we could use a whole new build in comand which specificly accesses and works with mobs Hate list for us =)
AndMetal
01-28-2009, 04:25 PM
What is the best way to do the following...
Get Highest Hate List Target, And Cast a Spell on him
You should be able to use the quest object (http://www.eqemulator.net/wiki/wikka.php?wakka=QuestObjects) $mob->GetHateTop() to get the player that's on the top of the hate list. You could do something like this to have the NPC cast it on whomever's on the top of the hate list:
$npc->CastSpell($mob->GetHateTop(),12345)
You may have to cast $mob->GetHateTop() to the Entity List ID (GetID() maybe?), but that should do the trick.
I like to expand this question and add that I am looking for a simular way to work with Hate list.
Basicly some sort of a comand that allows me to select random or even sort the hate list for various purposes.
For exmaple:
-select random person on hate list
-select specific person on hate list (like 6th)
-reverse hate list (the 1st becomes last and vice-verse)
-find specific class on hate list (like cleric)
-find specific race
-find a pet
1) $mob->GetHateRandom()
2) In a roundabout way, you could probably cycle through the entity list in combination with $mob->GetHateAmount(tmob, is_dam= false) to generate the hate list, but I think it might be better (read: fewer CPU cycles) to create a new command (maybe GetHateList()?) to output the hate list as an array that you can then work with.
3) If we create a GetHateList() command, we can just reorder the array without actually changing the hate list.
4-6) Again, if we create a GetHateList() command, we can use $mob->GetClass(), $mob->GetRace(), and $mob->GetPetID() (or add $mob->IsPet()) to create a secondary or tertiary "filtered" list to select from.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.