Jump to content

Fightclass Framework for 2.4.3/3.3.5a and more


Matenia

Recommended Posts

If you've seen my 1.12 fightclass framework, this is basically the much enhanced version.
It should work for WoW 2.4.3 and 3.3.5a, possibly many more expansions. The only thing you would have to do is adjust the way combatlog events are parsed, if paramters have changed in your expansion. Everything else should be handled by wRobot. 

Below you can find the GitHub repository. It also contains a very simple enhancement shaman fightclass as an example that you could change to fit your own needs.
This is for developers only. If you're a regular user, I recommend just buying my fightclasses. They are, in my opinion, fairly priced.


Features:
- checks with server if a spell was successful
- support for different types of spells 
- no more double casts of any sort (heals, debuffs, damage)
- possibility to ignore server responses
- easy offtarget handling
- performant caching and rotation handling
- possibility to use as a healing framework
- support for wanding
- multilanguage support
- dispel by debuff type
 


https://github.com/Schaka/wRobotFightclassFrameworkEnhanced

 

@Droidz would be nice if you could sticky/pin this thread

Edited by Matenia
Link to comment
Share on other sites

  • 2 months later...

Most advanced and fundamental fight class sample I've ever seen. Awesome work.

The only moment I still didn't get is wanding. Sometimes while wanding the bot is something like can't change rotation step. I mean for example i've got 10 steps in my rotation. Wanding has lowest priority. And if all conditions is fit for wanding he starts shoot. Everything is fine, but if he starts wanding, rotation step is not changing until I manually interrupt hes wanding process by pressing any movement key. Right after that rotation is working again as it should and bot continues rotate steps. Even other rotations spells with "force" enabled doesn't work.

This problem happens only when bot is wanding. For other spells everything is good.

My conditions for wanding:

new RotationStep(new RotationSpell("Shoot"), 10f, (s, t) => MeHaveWand() && !RotationCombatUtil.IsAutoShooting() && !Me.GetMove, RotationCombatUtil.BotTarget),
    private static bool MeHaveWand()
    {
        return ObjectManager.Me.GetEquipedItemBySlot(InventorySlot.INVSLOT_RANGED) != 0 ? true : false;
    }
		public static bool IsAutoShooting()
		{
			return Lua.LuaDoString<bool>("return IsAutoRepeatSpell('Shoot')");
		}		

Maybe some problems with spell verification. Wow vanilla.

 

Link to comment
Share on other sites

  • Droidz pinned this topic

If @Matenia could make a video tutorial detailing the process of creating a combat routine it would be very good. I would even pay for a course (udemy).

Link to comment
Share on other sites

4 hours ago, scsfl said:

Maybe some problems with spell verification. Wow vanilla.

Clearly says this isn't for 1.12. Also clearly even references the 1.12 framework. Also, what is it with people using the cracked version of wRobot coming here expecting help?


That being said, there can always be race conditions when you're technically on gcd from wanding which blocks other spells from being usable.

Edited by Matenia
Link to comment
Share on other sites

I don't really do anything differently for other languages than English. Except checking buffs (but you can do this yourself just using HaveBuff wRobot API offers).
There's probably some English language strings somewhere still. And I definitely don't have support for Chinese rank strings either.

Link to comment
Share on other sites

15 hours ago, Matenia said:

I don't really do anything differently for other languages than English. Except checking buffs (but you can do this yourself just using HaveBuff wRobot API offers).
There's probably some English language strings somewhere still. And I definitely don't have support for Chinese rank strings either.

I used the German test. Unable to cast skills continuously. English is normal

thank you for your sharing

 

ElementalShaman.7z

Link to comment
Share on other sites

		public string FullName()
		{
			return _rank != null ? ($"{_name}({RotationSpellbook.RankString} {_rank})") : _name;
		}

		public bool IsKnown()
		{
			return RotationSpellbook.IsKnown(_name, _rank ?? 1);
		}

Change these lines in RotationSpell. I guess I accidentally messed this up when merging two frameworks.
If you use Spell.NameInGame instead of _name, it should use the localized name.

 

if (spell.Spell.Name == "Shoot" && IsAutoRepeating("Shoot"))
			{
				return true;
			}

//IsAutoRepeating should use spell.Name.NameInGame

As far as I can tell, everything else already uses the localized name. 

 

There is also one more issue with something not localized (shouldn't matter too much):
 

// this error is not found through casting or combatlog events because it's caused by the client checking IsSpellInRange when using CastSpellByName
			// we could technically execute this check ourselves in CombatLogUtil but usually the client-side range check (memory based GetDistance) is enough) and cheaper!
			// therefore we're listening to error messages and executing this check lazily
			if (id == "UI_ERROR_MESSAGE" && (args[0] == "Out of range." || args[0] == "You are too far away!"))
			{
				RotationSpellVerifier.ClearIfOutOfRange();
			}

Also this should probably be reworked or use the non-Lua wRobot option:

public static bool CastingSpell(this WoWUnit unit, params string[] names)
		{
			return RotationCombatUtil.ExecuteActionOnUnit(unit, (luaUnitId) =>
			{
				string luaString = $@"
	            local isCastingSpell = false;
	    
	            local name = UnitCastingInfo(""{luaUnitId}"")
	            if {LuaOrCondition(names, "name")} then
	                isCastingSpell = true
	            end
	            return isCastingSpell;";
				return Lua.LuaDoString<bool>(luaString);
			});
		}

 

Edited by Matenia
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...