Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using SPQR;
- using MySPQR;
- namespace SPQR.Engine
- {
- class Hunter : Engine.FightModule
- {
- public override string DisplayName
- {
- get { return "Hunter"; } //This is the name displayed in SPQR's Class selection DropdownList
- }
- internal enum Spells : int //This is a convenient list of all spells used by our combat routine
- { //you can have search on wowhead.com for spell name, and get the id in url
- SteadyShot = 56641,
- CobraShot = 77767,
- ExplosiveShot = 53301,
- ArcaneShot = 3044,
- ChimeraShot = 53209,
- BlackArrow = 3674,
- SerpentSting = 1978,
- AimedShot = 19434,
- KillCommand = 34026,
- GlaiveToss = 117050,
- Fervor = 82726,
- DireBeast = 120679,
- SilencingShot = 34490,
- KillsShot = 53351,
- }
- internal enum Auras : int //This is another convenient list of Auras used in our combat routine
- { //you can have those in wowhead.com (again) and get the id in url
- SerpentSting = 1978,
- }
- public override void CombatLogic() //This is the DPS / healing coutine, called in loop by SPQR all code here is executed
- {
- var TARGET = MySPQR.Internals.ObjectManager.Target;
- var ME = MySPQR.Internals.ObjectManager.WoWLocalPlayer;
- if(TARGET.HealthPercent < 20)
- CastSpellById((int)Spells.KillsShot);
- if(TARGET.IsCasting)
- CastSpellById((int)Spells.SilencingShot);
- if(TARGET.HealthPercent > 80)
- CastSpellById((int)Spells.DireBeast);
- if(ME.Focus < 15 && TARGET.HealthPercent > 45)
- CastSpellById((int)Spells.Fervor);
- if(TARGET.HealthPercent > 55)
- CastSpellById((int)Spells.GlaiveToss);
- if(TARGET.Position.Distance3DFromPlayer < 25)
- CastSpellById((int)Spells.KillCommand);
- CastSpellById((int)Spells.AimedShot);
- if(TARGET.HealthPercent > 75)
- CastSpellById((int)Spells.BlackArrow);
- if(!TARGET.HasAurabyId((int)Auras.SerpentSting))
- CastSpellById((int)Spells.SerpentSting);
- if(ME.Focus > 70)
- CastSpellById((int)Spells.ArcaneShot);
- CastSpellById((int)Spells.ExplosiveShot);
- CastSpellById((int)Spells.CobraShot);
- CastSpellById((int)Spells.SteadyShot);
- }
- public static void CastSpellById(int spellId) //This is a *usermade* function to evaluate if the given spell (spellId) can be cast
- {
- if (MySPQR.Internals.ObjectManager.Target.IsValid) /*return true if the Target is valid(exist) or not dead*/
- {
- if (MySPQR.Internals.ActionBar.CanCast(spellId)) /*return true if your char can use the spell (check cooldown and global cooldown*/
- {
- MySPQR.Internals.ActionBar.GetSlotById(spellId).Execute(); /*if all is ok, this will get the ActionBarSlot for your spell,
- and execute the right Keybind to cast it*/
- }
- }
- }
- public override void OnLoad() //This is called when the Customclass is loaded in SPQR
- {
- }
- public override void OnClose() //This is called when the Customclass is unloaded in SPQR
- {
- }
- public override void OnStart() //This is called once, when you hit CTRL+X to start SPQR combat routine
- {
- }
- public override void OnStop() //This is called once, when you hit CTRL+X to stop SPQR combat routine
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement