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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Illindar

New Member
Joined
Sep 29, 2015
Messages
15
I've been enjoying the crap out of using the Profile Bot's built in Routines to handle combat for me. Nothing makes me happier than initiating combat and letting the bot finish slaughtering my foe.

That said, I'd love to wander into an area and loose the bot on a general rampage. I've been going somewhat insane trying to utilize the Combat, Movement, and Targeting system/routines bundled with WildBuddy.

Although I'm certainly a scriptkiddy more than a programmer, the async tasks that are used makes my brain turn into jelly. My first mistake was not getting Visual Studio working out of the gate... BAD MOVE on my part.

Could I get an example or two using the DefaultRoutine to select the 'BestTarget'? Every time I do, even after sorting out how tho async and coroutine system, my code tosses a 'System.InvalidOperationException: Collection was modified; enumeration operation may not execute.' when I try to get the DefaultRoutine.Targeting.BestTarget' from the PerFrameCachedValue (both through the existing or a new function).

Further, although I think I have it, would anyone mind sharing the right way to move to the selected target and how to initiate combat? At present I intend to use CommonBehaviors.MoveWithin(Actor.Position, PullRange, true, true, false)' and GameManager.InputManager.KeyPress(InputAction.CastInnateAbility); unless someone has a better recommendation or approach.
 
i dont know half of what you are talking about.
Here is my thoughts tho, maybe it helps.

Coroutines run in the same thread. they basically rapidly pass "execution-time" to oneanother.
as far as i know in c# its implemented with IEnumerable and IEnumerator.
A function of IEnumerable can use yield keyword to "save" the current progress the function.
you can basically return in the middle of a function without completing it and start another one.
you kind of have a chopped up function, where each piece can be executed.
you get a list of chopped up functions and you just iterate over it with IEnumerator.

So if you change the collection - which means add or remove elements during iteration - it makes your IEnumerator invalid
and the next time you call IEnumerator.MoveNext()
you get an exception of type: System.InvalidOperationException

i have no idea what DefaultRoutine is, so i dont know what you are doing exactly.

this moves in straight line without pathfinding
Code:
Buddy.Wildstar.BotCommon.Navigator.PlayerMover.MoveTowards(Vector3,Vector3); //yourPos destinationPos

this uses navigation server
Code:
CommonBehaviors.MoveWithin(Actor.Position, PullRange, true, true, false)

casting your innate ability initiates combat?
Code:
Buddy.Wildstar.Game.SpellManager.GetSpell( name )
Spell.CanCast
Spell.Cast()
Spell.IsOnCooldown
GameManager.Actors.Values
Actor.Name
Actor.Disposition
Disposition.Hostile
Actor.Target()
GameManager.LocalPlayer.target

Code:
https://msdn.microsoft.com/en-us/library/system.collections.ienumerator(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/system.threading.tasks.task(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/hh156513.aspx
https://msdn.microsoft.com/en-us/library/hh191443.aspx
 
Last edited:
Back
Top