Jump to content

Apexx

Elite user
  • Posts

    332
  • Joined

Everything posted by Apexx

  1. How in c# can I test if the product loaded and running is Party and Healer mode?
  2. It is a bit redundant to sit to replenish mana or health while eating and drinking just when a buff falls off, and my player gets up mid-meal to buff again. Is there a check for this issue? Thanks!
  3. // Return Number of Hostile Units Attacking in Specified Range private int HostileUnitsInRange(float range) { int hostileUnitsInRange = ObjectManager.GetUnitAttackPlayer().Count(u => u.GetDistance <= range); return hostileUnitsInRange; } Try something like the following (Will check if no unit is attacking you within 30 yards): wManager.Events.FightEvents.OnFightEnd += delegate { if (HostileUnitsInRange(30) == 0) Buff(); };
  4. Maybe check for your buffs at the end of a fight? wManager.Events.FightEvents.OnFightEnd += delegate { Buff(); };
  5. Thanks for the reply @lonellywolf. When I started the FightClass from ground zero again, I managed to get it to work. Once I added a few more abilities, it stopped working as I intended it to. If I even clicked a hostile unit from a large distance gap (Say 50-100 yards away) and wait a second, you can see the Auto Attack button start flashing. It would be nice if it didn't automatically try to attack the unit, unless the player is within the Range value we set inside the C# class. When it was working, I could literally stand right on top of a hostile unit without it even attacking it unless I moved behind the target, then it opened with Shred. If I was not behind the target, it seemed that I would manually have to use an ability to open the rotation and have the script do the rest of the work. But yes, it is a bummer there is no real way to disable Auto Attack.
  6. I have tried to script the druid ability Shred while stealth and behind target. WRotation always toggles Auto-Attack and never allows time to cast Shred. It looks so bad when I pop out of stealth for auto-attack. Any solution to this behavior?
  7. Gentle Bump @Droidz. Is there any way to prevent the Logging.WriteDebug for the Return new spell for GetActiveStance? It's hard to debug my scripts with the endless spam while checking the player's current stance. Thanks!
  8. I did not see any option to add a thumbnail to my Fight Class submission inside the Wrath of the Lich King fight class listing. Is this possible?
  9. Yeah, I just found out that I had launched Demo Shout inside my Battle shout Buff routine! ugh!
  10. 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.
  11. 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?
  12. Thank you! Do you think you could share the list?
  13. Finding the different spell IDs might be a small hurdle, but I will give it a try.
  14. I have not tried with Spell IDs yet because I would like it to be adaptable with leveling and rank ups as you train.
  15. Thanks for the reply @arkhan. However, this is not checking for debuff on me, but rather ObjectManager.Target
  16. 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; }
  17. protected void UseSpell(Spell spell, bool stopMoving, bool faceTarget = false, float rangeCheck = 5) { if ( !player.IsMounted && spell.KnownSpell && spell.IsSpellUsable && spell.IsDistanceGood && // Not mounted | Spell Known/Usable/Good Distance player.TargetObject.IsAlive && player.TargetObject.IsAttackable && // Target is alive | attackable target.GetDistance <= rangeCheck // Target is within given range ) { if (faceTarget) { MovementManager.Face(player.TargetObject); } spell.Launch(stopMoving); } }
  18. protected void UseSpell(Spell spell, bool stopMoving, bool faceTarget = false, float rangeCheck = 5)
  19. Thanks Reapler, I already have functions to check hostile units in range, stunned units within range, etc. The issue is why does WRobot cast the ability twice in a row even though my health percent is above my threshold? if (player.HealthPercent <= 50 && HolyLightTimer.IsReady) { UseSpell(HolyLight, true, false, 30); HolyLightTimer = new Timer(3000); // Holy Light cast time = 2.5 seconds } The problem is, when casting and you take a hit, your cast bar subtracts value thus the timer is rendered useless. Let's say I pulled 3 hostile units and my health dropped to 48%. I will start to cast Holy Light as intended. However, the tigers are still attacking me during my heal. If my heal was almost done at 90%, the hostile unit attack from one unit will knock the 90% back down to say 85%. Then if I get hit by the second hostile unit, it will bump down from 85%, to 80%. The 3000 millisecond timer most likely is ready at this point, thus I cast Holy Light a second time, even though my Health percent = 90%.
  20. Original Thread Topic: I did not want to necro an old thread, but I have included a timer into the ability Holy Light from Paladin spellbook. However, I do not think that it works too well when you are being attacked while healing and it bumps your cast time backwards. If I pulled 3 mobs and wanted to check my fight class to heal at or below 50% health, and I am still being attacked by the mobs, my cast bar gets knocked backwards which increases the cast time. Is there any way to counter this issue? Thanks!
  21. Thanks! So guess something like the following will work alright? Thread.Sleep(_r.Next(300, 650)); Revenge.Launch();
  22. I am writing a protection warrior fight class, and there are no cast times. I was just wanted to delay abilities like Overpower, Execute, Revenge. Once the ability is usable, it casts it immediately which is really not human-like at all. I try to write my fight classes as human-like as I can, adding randomization, delays, etc. pseudo example: var _timer = new robotManager.Helpful.Timer(_r.Next(300, 650)); if (_timer.IsReady) { // use Revenge }
×
×
  • Create New...