Small question about SpawnSearch

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

DeeGee
a ghoul
a ghoul
Posts: 116
Joined: Wed Sep 22, 2004 4:51 pm

Small question about SpawnSearch

Post by DeeGee » Fri Nov 12, 2004 8:07 am

Suppose it's more a question about syntax, but I wanted to make sure that I didnt miss something in TFM.

Macro I have made relies heavily on

Code: Select all

/if (${NearestSpawn[1,npc zradius 30].Distance}<=100) /dothis
which is repeated many times during the macro.

Problem with that is if there is nothing that matches my search, it returns NULL which is apparently <=0. My work around was to make it say

Code: Select all

/if (${NearestSpawn[1,npc zradius 30].Distance}<=100 && ${NearestSpawn[1,npc zradius 30].Distance}>0) /dothis
but it seemed like unneccesary coding. I tried

Code: Select all

/if (${NearestSpawn[1,npc zradius 30].Distance}<=100 && >0)
but it crashed and said invalid integer or something to that effect, I assumed tht I improperly used &&.

Ok, simple question I guess, can you say <=100 and >0 in one statement? TFM mentions Numeric Operators and lists them, but not how to use them in conjuction with Logical Operators, if that is even possible.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Fri Nov 12, 2004 8:34 am

When I want to check if the nearest spawn is within a certain distance I usually use another filter in the spawn search, such as:

Code: Select all

/if (${NearestSpawn[1,npc radius 100 zradius 30].ID) /dothis
This will return the id of the first mob within a radius of 100, no further check is necessary.

DeeGee
a ghoul
a ghoul
Posts: 116
Joined: Wed Sep 22, 2004 4:51 pm

Post by DeeGee » Fri Nov 12, 2004 8:41 am

Ok, thanks, I see how that would work better, I will try that when I get home.

townsenda
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Dec 16, 2004 11:18 am

Post by townsenda » Thu Jan 06, 2005 8:18 pm

Hmm regarding NearestSpawn... if I use variables for the spawnsearch:

Code: Select all

/echo found (variables) ${Me.NearestSpawn[${innerCounter},npc radius ${MaxRadius} zradius ${MobMinMaxZ} "${Mob[${mobCounter}]}"].ID}   MobMinMaxZ is ${MobMinMaxZ}
I get NULL
but if I use hardcoded numbers for the radius and zradius search it returns the a mob (not sure if it REALLY is the nearest.. it's hard to tell).

I have declared the variables as floats and ints and neither appear to work. Does anyone know what is required to use variables instead of literal numbers?

FrankJScott
naggy
naggy
Posts: 2382
Joined: Sun Feb 19, 2023 7:11 am

Consultant For Best Mastiff Dog Info

Post by FrankJScott » Sun Feb 26, 2023 4:20 am

To the man talking about french mastiff breeders near me, pictures of bullmastiff puppies, purebred tibetan mastiff, the italian mastiff, check out this Spanish mastiff breed, click for Pyrenean Mastiff, I highly suggest this read more for recommended mastiff breed details or british bull mastiff, Korean Mastiff Dosa Mastiff site, english mastiffs puppies for sale, neapolitan mastiff similar breeds, british mastiff dog, Perro de Presa Canario Canary Mastiff blog, on top of this this post for great mastiff dog info not to mention tbtn mastiff dog, loose skin on dog after weight loss info, napoli mastiff, American Mastiff breed top advice, best dog food for bullmastiff puppies, asiatic mastiff and the pug, and don't forget this read what he said for top mastiff breed info not to mention neapolitan mastiff dog breed, best mastiff breeds facts, Tosa Inu Japanese Mastiff article, discover more Kangal Turkish Mastiff breed, mastiff cross labrador, fila mastiff, on top of this full article for new mastiff dog site tibet dog price, why is my dog's skin so loose info, dogs with extra skin on neck, portuguese mastiff, peruvian mastiff, chinese tibetan mastiff puppies for sale, on top of this great post to read for updated mastiff breed site and don't forget mastiff dog for sale near me, apricot brindle mastiff, why is my dog's skin so loose tips, Perro de Presa Canario Canary Mastiff facts, blue grey tibetan mastiff, dogs with saggy face info, on top of read this post here for high rated mastiff breed details which is also worth a look. I also suggest this these details for great mastiff breed details as well as bullmastiff breed article, bullmastiff cross breeds, picture of a bullmastiff, mastiff story viewer see recommendation, north american mastiff puppies for sale near me, best dog bed for shih tzu, not to mention this enquiry for high rated mastiff dog tips on top of Iranian Sarabi Mastiff top info, bullmastiff breed details, training mastiffs, english masters dogs, strongest mastiff breed, harlequin mastiff, as well as sources tell me for good mastiff breed details and don't forget mastiff breeds list, Iranian Sarabi Mastiff home page, asian mastiff, bandogge mastiff for sale, american bandogge mastiff puppies for sale near me, pit mastiff puppies for sale, which is also great. Finally, have a look at this home page for useful mastiff dog advice with chow chow and tibetan mastiff, italian mastiff puppy, spanish mastiff dog, best mastiff breed top info, tibetan mastiff is dangerous, lion mastiff, for good measure. Check more @ Right Here For Great Mastiff Breed Info 6b3ce3c

FrankJScott
naggy
naggy
Posts: 2382
Joined: Sun Feb 19, 2023 7:11 am

Updated Product Guide

Post by FrankJScott » Fri Aug 18, 2023 6:47 pm

Why don't you Google it! before you post

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 5:18 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 5:55 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 5:56 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 5:57 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 5:59 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 6:00 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 6:01 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 6:02 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Small question about SpawnSearch

Post by xyilla » Thu Feb 27, 2025 6:03 am