Jump to content
This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

Matenia

Fightclass Framework for 2.4.3/3.3.5a and more

Recommended Posts

Posted (edited)

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

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Posted (edited)
		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 = [email protected]"
	            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

Share this post


Link to post
Share on other sites

There will be no updates for people who don't even own a wRobot license. Me telling you what to do to fix it was already generous. It's an incredibly easy fix in only 2 methods.

Share this post


Link to post
Share on other sites

This Framework is abolutely amazing. Everyone who spend some time to understand how it works will enjoy the Possibilities with this! Thx Matenia for this awesome Piece of Code!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...