ScriptUO

Scripting Resources & Utilities => Stealth Client => Topic started by: smitty on June 29, 2016, 05:24:26 PM

Title: mobile proximity
Post by: smitty on June 29, 2016, 05:24:26 PM
Hello! i feel like a crazy person with all these posts I be posting hehe. Anyways, I am working on something that will auto wither
heres my code:

Code: [Select]
for (int i = 0; i < Rail.Count(); i++)
            {
                if (Player.Hits != Player.MaxHits)
                {
                    healSelf(Player);
                }
                advancePosition(Player, Rail.ElementAt(i));
                SDK.Initialize();
                Stealth.Client.SetFindDistance(2);
                Stealth.Client.SetFindVertical(0);
                somethings = Scanner.Find<Something>(0x0, false).OrderBy(x => x.Distance).ToList();
                foreach (Something m in somethings)
                {
                   Player.Cast("Wither");
                   Thread.Sleep(1000);
                   if (Player.Hits != Player.MaxHits)
                   {
                      healSelf(Player);
                   }
                }
                if(somethings.Count == 0)
                {
                    continue;
                }
            }

dont judge if this is terribly wrong! im learning =]
Title: Re: mobile proximity
Post by: Crome969 on June 30, 2016, 01:56:03 AM
Code looks good, casting i may would had solved differently..
I would make a global profile for player that stores states like
"Busy" "Casting" and other things so multiple threads could run simoultanous and checking states.
Another variant could be queues : "Cast, Heal" with priority management.. You add Wither Action and Heal into queue and then let them handle as action based on trigger and what should be pulled first.

But thats not easy..

Title: Re: mobile proximity
Post by: smitty on June 30, 2016, 03:08:18 PM
Oooo! all of that sounds fun =] I think after i get the script running like i want it to, Ill add multi threading (dont know how to do that just yet). I actually forgot to post my question about the auto wither thing above. My character will cast wither as soon as Somethings name is on the screen. I dont know how to lower the search radius. I thought i did with
Code: [Select]
Stealth.Client.SetFindDistance(2);
Stealth.Client.SetFindVertical(0);
but it doesnt seem to change search area.

Also, I have SDK.Initialize(); happening for every point in a rail that i made. Should i change that? Something tells me that SDK.Initialize(); should happen once, But hey im still learning =]
Title: Re: mobile proximity
Post by: Crome969 on July 01, 2016, 02:07:35 AM
I post you later why it is not working.. You should check what SDK do with scanner class