Author Topic: mobile proximity  (Read 4242 times)

0 Members and 1 Guest are viewing this topic.

Offline smittyTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Activity:
    0%
  • Reputation Power: 1
  • smitty has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
mobile proximity
« on: June 29, 2016, 05:24:26 PM »
0
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 =]

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: mobile proximity
« Reply #1 on: June 30, 2016, 01:56:03 AM »
0
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..


Offline smittyTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Activity:
    0%
  • Reputation Power: 1
  • smitty has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: mobile proximity
« Reply #2 on: June 30, 2016, 03:08:18 PM »
0
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 =]

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: mobile proximity
« Reply #3 on: July 01, 2016, 02:07:35 AM »
0
I post you later why it is not working.. You should check what SDK do with scanner class

Tags: