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

Combat overriding TreeStart hook?

Ipo

New Member
Joined
Jun 13, 2012
Messages
24
Reaction score
1
I'm trying to add some overall(rather complex) behavior that I want evaluated constantly, in-game, out-of-game, in-combat, etc. TreeStart seems like the right place to put this, based on the description:
TreeStart: The very start of the logic tree. Just behind any scheduling events. If you wish to implement full bot logic, use this hook to insert into. Return RunStatus.Success as the last composite to ensure no logic after this runs.

However, it appears that when the bot enters combat, it ignores the TreeStart-hook until combat concludes. This seems at-odds with the in-bot description of the TreeStart hook. Is this expected behavior? Is there anywhere else I can hook in to ensure my code is evaluated *always*?
 
It's true that I can decorate the Combat-hook, but that is not entirely without its issues as well. Trinity, for example, completely replaces the Combat-hook, among others, so if I want to use my plugin in conjunction with Trinity I would have to make sure I decorate the Combat-hook *after* Trinity has replaced it.

It also leaves hook-behavior poorly defined. The TreeStart-hook doesn't behave as described. What other hooks do I need to decorate as well, to be sure my behavior is evaluated consistently? Loot? VendorRun?

I'll decorate all hooks after an initial delay, that seems to be the only alternative, as you said.
 
Combat in Trinity will always return RunStatus.Running - meaning: the same Tree node is always returned to until it returns a RunStatus of Success or Failure.

Trinity returns RunStatus.Running because otherwise the bot would attempt to run all the other hooks (profile behaviors, death, vendorrun, etc) before combat is finished. In other words, it will make your bot spaz out :)
 
You're right, I hadn't considered that. That makes sense, thanks.
 
Back
Top