xsol
Member
- Joined
- Nov 7, 2011
- Messages
- 503
- Reaction score
- 12
This is again a request for info or help with http://www.thebuddyforum.com/demonbuddy-forum/plugins/57588-plugin-mybuddy-local-k-follow-me.html
The four banners that are around the waypoint(s) in each act are always there; they are only made visible or invisible and there is no way to tell which banner is which or visible (that I can find)
Please not that when using LINQ there are errors so I handle iteration myself.
This code "works", but it needs tweaks and it attempts to click hidden banners and your own banner.
I don't really like asking for aid, but at this point, short of Apoc taking the time to help me out, I don't have many other options beyond asking for a second set of eyes/ideas
Anyone who helps solve this will be credited (of course)
The four banners that are around the waypoint(s) in each act are always there; they are only made visible or invisible and there is no way to tell which banner is which or visible (that I can find)
Please not that when using LINQ there are errors so I handle iteration myself.
This code "works", but it needs tweaks and it attempts to click hidden banners and your own banner.
Code:
if(ZetaDia.Me.IsInTown)
{
Logging.Write("Searching for banner.");
ie = ZetaDia.Actors.ACDList.GetEnumerator();
while (ie.MoveNext())
{
if (null != ie.Current)
{
ACD acd = (ACD)ie.Current;
if (acd.Name.Contains("Banner") && acd.ActorType == Zeta.Internals.SNO.ActorType.Gizmo)
{
int ri = r.Next(5, 8);
Logging.Write("Found a banner.");
//move
ZetaDia.Me.UsePower(SNOPower.Walk, acd.Position - new Vector3(2, 2, 0), ZetaDia.Me.WorldDynamicId, -1);
//wait
BotMain.PauseFor(System.TimeSpan.FromSeconds(ri));
System.Threading.Thread.Sleep(r.Next(ri*1000));
//interact
ZetaDia.Me.UsePower(SNOPower.Axe_Operate_Gizmo, acd.Position, ZetaDia.Me.WorldDynamicId, acd.ACDGuid);
//wait
ri = r.Next(2, 3);
BotMain.PauseFor(System.TimeSpan.FromSeconds(ri));
System.Threading.Thread.Sleep(r.Next(ri * 1000));
//try again?
if (!ZetaDia.Me.IsInTown) break; //basically we want to loop all banners until we skip ours and find a good one
//need a way to test if the damn banner is visible
}
}
}
ie = null;
I don't really like asking for aid, but at this point, short of Apoc taking the time to help me out, I don't have many other options beyond asking for a second set of eyes/ideas
Anyone who helps solve this will be credited (of course)