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

Compare two WoWPoints with each other...

  • Thread starter Thread starter weischbier
  • Start date Start date
W

weischbier

Guest
How do I compare two WoWPoints with each other?

I want to compare my current location with this WoWPoint (-9050.78, 1682.264, 22.60818).

greetz

Weischbier
 
How do I compare two WoWPoints with each other?

I want to compare my current location with this WoWPoint (-9050.78, 1682.264, 22.60818).

greetz

Weischbier
to get what? they're both wow points so in that sense there is no difference. what are you trying to do?
 
WoWPoint.DistanceTo(me.CurrentLocation)
?
 
to get what? they're both wow points so in that sense there is no difference. what are you trying to do?

Code:
        private static bool _PlaceToBe()
        {
            if (StyxWoW.Me.Location != WoWPoint.WoWPoint(-9050.78, 1682.264, 22.60818))
                return false;
            return true;
        }

WoWPoint.WoWPoint(-9050.78, 1682.264, 22.60818) that part of API does not work anymore.

I want to do me a plugin to check if I'm at the right spot to farm some units and i don't want to get too far into a special area. So before fight go to that point, beat the crap out of them and then loot.

greetz

Weischbier
 
i think this is what you wanna use.
Code:
        public static bool NearArea(WoWPoint Location, int Distance)
        {
            if(Me.Location.Distance(Location) > Distance)
            {
                return false;
            }
            return true;
        }
 
i think this is what you wanna use.
Code:
        public static bool NearArea(WoWPoint Location, int Distance)
        {
            if(Me.Location.Distance(Location) > Distance)
            {
                return false;
            }
            return true;
        }

Sry, but how should I use it with -9050.78, 1682.264, 22.60818?
I tried it but its complaining about its being invoked with 3 arguments :(
 
you need to define a new wowpoint.
Code:
WoWPoint MyPoint = new WoWPoint(x goes here!, y goes here!, z goes here!);

then call the method by going.
if(NearArea(MyPoint, 20))
{
do stuff here because im in 20 yards of my wow point.
}
 
you need to define a new wowpoint.
Code:
WoWPoint MyPoint = new WoWPoint(x goes here!, y goes here!, z goes here!);

THAT was what I'm looking for!

I tried this:

Code:
        public static bool NearArea(double x, double y, double z)
        {
            if (StyxWoW.Me.X != x && StyxWoW.Me.Y != y && StyxWoW.Me.Z != z)
                return false;
            return true;
        }

Thanks a lot! Like everytime :)
 
THAT was what I'm looking for!

I tried this:

Code:
        public static bool NearArea(double x, double y, double z)
        {
            if (StyxWoW.Me.X != x && StyxWoW.Me.Y != y && StyxWoW.Me.Z != z)
                return false;
            return true;
        }

Thanks a lot! Like everytime :)
you'll wanna stick with my original implementation, not that a EXACT 1 for 1 wow point is bad, but having that padding to work with even if its 1 yard is better then a single fixed point.
 
you'll wanna stick with my original implementation, not that a EXACT 1 for 1 wow point is bad, but having that padding to work with even if its 1 yard is better then a single fixed point.

Yeah, I was worried right about that.

I'll let you know with the result.

greetz

Weischbier
 
Back
Top