Any way to determine id# by name?

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Any way to determine id# by name?

Post by DeathSpiral » Mon Sep 30, 2002 6:51 am

Howdy-
Was looking over the new $spawn function that Plaz gave us in the latest IRC release, and its looking right nice and useful. I was wondering, however, if anyone knew of a way to get the id# (for use with $spawn) from a name? The only way I can think of to do it would be to /target, but then I have all the info on $target() as I would from $spawn anyways. I took a look at $id and while $id does return an ID when I supply it with a name, it does -not- return the ID of the name I provided. :) Which makes sense, seeing as how when I look at the docs $id returns the ID of the nth spawn. So... any ideas on how I can get an ID from a name without /target'ing? Did I overlook something really stupid / simple? Many thanks...
-DS
I am orc pawn, hear me yell for centurians...

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Mon Sep 30, 2002 4:57 pm

I can add this to $id() I suppose, return the ID of the closest spawn matching the name...
- Plazmic