What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

The SequenceManager

bossland

Well-Known Member
Joined
Jan 15, 2010
Messages
14,883
Reaction score
259
I guess you all must have been annoyed that you weren't able to modify some of the 'inner'-core stuff in the bot, eh? Well, that changes now.

The SequenceManager allows you to override specific functions of the bot. That includes (but is not limited to):

  • Retrieving the corpse
    Releasing the spirit
    Mailing items
    Vendoring/repairing at the vendor
All these are defined in the 'Styx.Logic.Sequence' enum.
You will also find a more thorough explanation of the sequence in the XML summary of the enum member.
All you do is use the SequenceManager.AddSequenceExecutorOverride function. Here's a little snippet:

Code:
public CustomClass()
{
	SequenceManager.AddSequenceExecutorOverride(Sequence.ReleaseSpirit, MyReleaseSpirit);
}

private static void MyReleaseSpirit()
{
	List<string> hasSoulstone = Lua.LuaGetReturnValue("return HasSoulstone()", "hax.lua");
	if (hasSoulstone != null && hasSoulstone.Count > 0 && hasSoulstone[0].ToLower() != "nil")
	{
		Lua.DoString("UseSoulstone()");
		int tickCount = Environment.TickCount;
		while (!ObjectManager.Me.IsAlive && Environment.TickCount - tickCount < 7500)
			Thread.Sleep(100);
		if (ObjectManager.Me.IsAlive)
			return;
	}

	SequenceManager.CallDefaultSequenceExecutor(Sequence.ReleaseSpirit);
}
As you can see, you can call the default sequence executor if your own method doesn't work. In this case, I use SequenceManager.CallDefaultSequenceExecutor(Sequence.ReleaseSpirit) if I haven't returned from the function before that.

That's pretty much it. This class will be available in the next version of HB.

I have one question for you though; which functions would you like to see overridable?
 

Attachments

This looks nice, i'll take a look at possible overrides tomorrow when i'm not falling asleep, strangely I think you have most covered without exposing code you don't want to
 
One thing I would like to see, and I tried to code around before, is a optional CC

Basically a plugin that allows you to pick and choose what your CC for each class (uses default names if nothing is set), it would do the typical cycle through all the files, pick up the WoWClass and then generate a drop down list under each class in a config form... only problem is I dont think I was ever able to override the CC loaded, i'm happy to code this ofc just not sure I can as it stands

This means we can actually have multiple CC's in the CC dir and not have to force restart to load, if possible I would also push in a force recompile for updates, meaning this could be used to unload update (update button?) and then reload the CC, this is mainly for my use as i have to close HB, override my dll and then restart and I always get hit with the Session used up message which is a pain for 1-2 min wait ever rehash :/

Posting it here cus i don't know what is required for the override, so pretty much everything to do with that lol.

EDIT:

Actually it may be possible already give me 5 mins

EDIT2:

No... it's not
 
Last edited:
one of the main problems my CC's have is when doing AV a lot of the times theres npc's attacking in towers. and the whole area stays in combat till the towers are distroyed. the only way to get the bot moving again is to get the bot of out combat some way. ether die, or run out of the area. so i would like to see some way i can probe move to hotspot, even in combat. i should be able to tell the bot when im out of combat. just because you have the combat flag on dosnt mean your always in combat mostly in BG's.

also control over the mounting code. would be nice.
 
Using the sequence manger the only things you are override are:
  • BattlegroundRess
  • Loot
  • MailItems
  • MountUp
  • Pull
  • ReleaseSpirit
  • RetrieveCorpse
  • VendorItemsAndRepair
 
Error 1 The best overloaded method match for 'Styx.Logic.SequenceManager.AddSequenceExecutorOverride(Styx.Logic.Sequence, System.Action)' has some invalid arguments D:\My Dropbox\Progs\HonorBuddy\CustomClasses\DBWarlock\DBWarlock\DBWarlock.cs 83 13 DBWarlock

:(

Just copypasted and put mu soulstone logic.
The Function is ok, but the Method is not.
 
Wishlist for things to be overridable:
1. EVERYTHING :)
2. Check for Deserter debuff
3. Enqueue for BG
4. Levelbot's movement logic
5. Mounts supported by HB.
6. (if possible) check if WoW process is already taken (would make it possible to run GB and HB simultaneously for things like finding/killing/looting TLPD).
7. Customizable Sequence in general. If we had access to every step taken in HB it would allow for mass customization by developers. I realize this may seem like a large request, but considering a large portion of this programs success is due to its developing users you might as well allow us to enhance it more-so :)
 
If by override you mean replace then by all means everything should be replaceable. Targetting system, all raf methods - that would be something desirable for now:)
 
Can you add possibility change Styx.Logic.Common.Rest.Feed()? I want to improve this class.
 
I'd like to be able to override not attacking mounted players if they aren't moving or I have a way to knock them off.
 
So there's not currently a way to override combat through a plugin? Because I'm trying to make it run a flag, and most people don't attack anything when they run the flag back to their base.
 
Back
Top