August 2, 20178 yr I hit level 30 on my protection warrior and my fight class was working just fine until I trained Rank 2 of Demoralizing Shout. I am using string names for spell checks, and it just keeps spamming Demo Shout continuously. Spell string = "Demoralizing Shout" | Spell ID = 6190. Using a simple check: if (!target.HaveBuff("Demoralizing Shout")) { DemoralizingShout.Launch(); return; }
August 2, 20178 yr HI Quote if (!target.HaveBuff("Demoralizing Shout")) replace with !ObjectManager.Me.HaveBuff("Demoralizing Shout")
August 2, 20178 yr Author Thanks for the reply @arkhan. However, this is not checking for debuff on me, but rather ObjectManager.Target
August 2, 20178 yr Author I have not tried with Spell IDs yet because I would like it to be adaptable with leveling and rank ups as you train.
August 2, 20178 yr if is not working with string you could try with a list of id ( you put all rank id in the list)
August 2, 20178 yr Author Finding the different spell IDs might be a small hurdle, but I will give it a try.
August 2, 20178 yr if is on wotlk i can help you to get them in a minute Edit : the list for WOTLK public List<uint> DemoralizingShoutList = new List<uint>() {1160, 6190, 11554, 11555, 11556, 25202, 25203, 47437};
August 2, 20178 yr Hello, i can't directly test it, but you can try: var target = ObjectManager.Me.TargetObject; var spell = new Spell("Demoralizing Shout"); if (!spell.TargetHaveBuff) { spell.Launch(); } or you can find the problem by yourself if you lookup spell / target: //copy this in your fightclass, and run this with opening settings public void ShowConfiguration() { //effects are also included var spellName = "Demoralizing Shout"; Logging.Write("Get all ids of spell: "+spellName); foreach (var id in new Spell(spellName).Ids.Distinct()) { Logging.Write("\n"+id); } Logging.Write("Done."); Logging.Write("Get all buffs from current target:"); foreach (var id in ObjectManager.Me.TargetObject.GetAllBuff()) { Logging.Write("\nid: "+id.SpellId+" name: "+id.GetSpell.Name); } Logging.Write("Done."); } You can also search for the "HaveBuff()" method with a decompiler, you'll see that some checking are different. Usage(with demonstration video) of my prefered decompiler can be found here
August 3, 20178 yr Author Thanks for the replies. I am still not quite sure how I can check each different id to whichever spell id the player currently has (as per rank and level of training). Lower level warriors use spell id 1160, while rank 2 of Demoralizing shout uses 6190. If I run a for loop through each demoralizing shout id that each mob might have, I am wondering if this will be very efficient?
August 3, 20178 yr 1 hour ago, Apexx said: Thanks for the replies. I am still not quite sure how I can check each different id to whichever spell id the player currently has (as per rank and level of training). Lower level warriors use spell id 1160, while rank 2 of Demoralizing shout uses 6190. If I run a for loop through each demoralizing shout id that each mob might have, I am wondering if this will be very efficient? It's pretty fast. For a few ids, there's no need to care about (as i benchmarked, it took about 0,01789ms). But if you are going to iterate through thousands of entries, then another solution must be considered. You can read more about the performance of .net collections here. You might also try this: var spell = new Spell("Demoralizing Shout"); if (!ObjectManager.Me.TargetObject.HaveBuff(spell.Ids)) { Logging.Write("not active"); spell.Launch(); } else { Logging.Write("debuff active"); }
August 3, 20178 yr Author Hey @reapler Here's a the log file from one fight using your latest post example: 06:43:34 - [Fight] Player Attack Galak Windchaser (lvl 24) 06:43:35 - not active [F] 06:43:35 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:35 - not active [F] 06:43:35 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:36 - not active [F] 06:43:36 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:36 - not active [F] 06:43:36 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:37 - not active [F] 06:43:37 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) [F] 06:43:37 - [Spell] Cast Bloodrage (Bloodrage) [F] 06:43:38 - [Spell] Cast Rend (Rend) 06:43:38 - not active [F] 06:43:38 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:39 - not active [F] 06:43:39 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) [F] 06:43:39 - [Spell] Cast Mocking Blow (Mocking Blow) [F] 06:43:39 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:40 - debuff active 06:43:40 - debuff active 06:43:40 - debuff active 06:43:41 - debuff active [F] 06:43:41 - [Spell] Cast Thunder Clap (Thunder Clap) 06:43:41 - debuff active 06:43:42 - debuff active 06:43:42 - debuff active 06:43:42 - debuff active 06:43:43 - debuff active 06:43:43 - debuff active 06:43:44 - debuff active [F] 06:43:44 - [Spell] Cast Mocking Blow (Mocking Blow) 06:43:44 - debuff active 06:43:45 - debuff active 06:43:45 - debuff active 06:43:45 - debuff active 06:43:46 - debuff active [F] 06:43:46 - Galak Windchaser casting time remaining: 1.1 seconds. [F] 06:43:46 - Player interrupted with Shield Bash (Id found: 72, Name found: Shield Bash, NameInGame found: Shield Bash, Know = True, IsSpellUsable = False) 06:43:46 - debuff active [F] 06:43:46 - Galak Windchaser casting time remaining: 0.7 seconds. [F] 06:43:46 - Player interrupted with Shield Bash (Id found: 72, Name found: Shield Bash, NameInGame found: Shield Bash, Know = True, IsSpellUsable = False) 06:43:46 - debuff active [F] 06:43:46 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) [F] 06:43:47 - Galak Windchaser casting time remaining: 0.1 seconds. [F] 06:43:47 - [Spell] Cast Shield Bash (Shield Bash) [F] 06:43:47 - Player interrupted with Shield Bash (Id found: 72, Name found: Shield Bash, NameInGame found: Shield Bash, Know = True, IsSpellUsable = False) 06:43:47 - debuff active 06:43:48 - debuff active 06:43:48 - debuff active 06:43:48 - debuff active 06:43:49 - debuff active 06:43:49 - debuff active 06:43:50 - debuff active 06:43:50 - debuff active [F] 06:43:50 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:51 - debuff active 06:43:51 - debuff active 06:43:51 - debuff active 06:43:52 - debuff active 06:43:52 - debuff active 06:43:52 - debuff active [F] 06:43:53 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:43:53 - debuff active 06:43:53 - debuff active 06:43:54 - debuff active 06:43:54 - debuff active 06:43:55 - debuff active 06:43:55 - debuff active 06:43:55 - debuff active 06:43:56 - debuff active 06:43:56 - debuff active 06:43:57 - debuff active 06:43:57 - debuff active 06:43:57 - debuff active 06:43:58 - debuff active [F] 06:43:58 - [Spell] Cast Rend (Rend) 06:43:58 - debuff active 06:43:59 - debuff active 06:43:59 - debuff active 06:43:59 - debuff active 06:44:00 - debuff active [F] 06:44:00 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:44:00 - debuff active 06:44:01 - debuff active 06:44:01 - debuff active 06:44:02 - debuff active 06:44:02 - debuff active 06:44:02 - debuff active 06:44:03 - debuff active 06:44:03 - debuff active 06:44:04 - debuff active 06:44:04 - debuff active 06:44:04 - debuff active 06:44:05 - debuff active 06:44:05 - debuff active 06:44:05 - debuff active 06:44:06 - debuff active 06:44:06 - debuff active 06:44:06 - debuff active 06:44:07 - debuff active 06:44:07 - not active [F] 06:44:07 - [Spell] Cast Demoralizing Shout (Demoralizing Shout) 06:45:13 - [Apexx Protection Warrior v1.0] Stop in progress. Demoralizing Shout Debuff lasts for 30 seconds. I am not sure why it keeps reapplying it.
August 3, 20178 yr So far i can see it correctly detects the debuff. You may need to look-over if you have somewhere else used ".Launch()" for your "Demoralizing Shout", because in the snippet it must log "not active" before "[Spell] Cast Demoralizing Shout (Demoralizing Shout)" can appear(it can a bit delay). I guess you may also alter the ".Launch()" method aswell the conditions for the spell, since "waitIsCast" has an impact of your rotation: var spell = new Spell("Demoralizing Shout"); if (!ObjectManager.Me.TargetObject.HaveBuff(spell.Ids) && spell.IsSpellUsable && spell.IsDistanceGood) { Logging.Write("not active\n=> cast"+spell.Name); spell.Launch(false, false); } else { Logging.Write(spell.Name+" active"); }
August 3, 20178 yr Author Yeah, I just found out that I had launched Demo Shout inside my Battle shout Buff routine! ugh!
Create an account or sign in to comment