Spawn logging?

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

User avatar
SimpleMynd_01
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu May 08, 2003 3:16 pm

Spawn logging?

Post by SimpleMynd_01 » Tue May 18, 2004 10:25 am

What I'd like to do is just write a simple macro that would log all spawns in a zone. Name, class, level, and loc. (Hmmm, can we get spawntime too?) Just a simple run into a zone, and log data for a couple days. Seems simple enough when I first though about doing it, but I don't know how I'd check to make sure I got all new spawns and not overlap with the old ones. I'm not a macro novice so it seems like I should be able to figure it out.

I'm sure somehow I need to use LastSpawn and keep track of it, but somehow the exact logic is escaping me. How would I deal with multiple spawns happening at once? If that's the case I can't just check every 1s and log the last one, but I'm sure that's kinda close.

I've just never used LastSpawn and Spawn.Prev and Spawn.Next so I'm looking for some direction. But this seems simple enough that any example that someone could give me on how to use these commands would pretty much be the whole macro anyway. :)

I guess the next step after logging all the spawns is to log their deaths to see if there is any pattern to some of those rares out there. (Quillimane, AC, Pyzjn, or any other pseudo-random rare.) That should be easy to code once I have a basic example of keeping track of a zonewide spawnlist.

Thanks for any help!

-SimpleMynd

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Tue May 18, 2004 10:31 am

Intresting idea, good luck.
Smokey the Lax says only you can prevent reproduction.

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Tue May 18, 2004 12:19 pm

As far as double checking to make sure you do don't have dupes in the spawn names, that's easy. I'd suggest using the Spawn[].ID member to keep track of what spawn you are logging since that number is unique to each spawn in the zone. Then maybe just doulbe check then you arent logging the 48 differentn snow bunnies?

Anyway, next question. Next and Previous members return exactly what they say. If you do something like this:

Code: Select all

  /echo ${Spawn[npc].ID} - ${NearestSpawn[npc].next.ID}
You'll get, for example, 604 and 607. Those are the two closest spawns to you. To move out from #607 you'd just use a loop and search for spawns by the last ID you found.

Code: Select all

  :MyLoop
    /if (${NearestSpawn.[${IDHere}].Next.ID}) {
      /varset IDHere ${NearestSpawn.[${IDHere}].Next.ID}
      /echo Next Spawn Name/ID: ${Spawn{$IDHere}.CleanName} ${Spawn[${IDHere}].ID}
      /goto :MyLoop
    }
Only answer I can't give you is what .Next does when it hits the end of the spawn table. Or rather, when there isn't another .Next.

User avatar
SimpleMynd_01
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu May 08, 2003 3:16 pm

Spawn.ID

Post by SimpleMynd_01 » Tue May 18, 2004 4:22 pm

Thanks for the info Preocts!

I guess a better question would be, Is ${Spawn.ID} unique per mob for the entire duration the zone is up? (i.e. a spawn id of 604 will only ever appear once per server/zone bounce.) Or can the spawn id be reused after the mob is either killed or despawns, or maybe even a function of that plus time. (i.e. spawn id 604 won't be used again until the first 604 dies/despawns and 2 hours (or whatever) elapses.)

If it's the former then I can just keep track via spawn id and just check to see if I've logged that particualr spawn or not. (yea I know it'll be a long slow search after a while (i.e. 2 days!), but it'll work.

If it's the latter then I need to keep track of all sorts of things. :)

Hmm... Another question, Are spawnids always just incremented by 1? If I get the max spawn id of the zone, and it's 604, will 605 spawn next? That would make things pretty easy to code...

-SimpleMynd

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Tue May 18, 2004 4:51 pm

Spawn IDs are unique numbers to the spawns currently in the zone. If you kill 602, from my understanding, the next respawn will be ID'ed as 602. Could be wrong. I actually don't know if spawn.ID is an EQ or MQ value. Could be something written into MQ to allow for spawn handling.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Tue May 18, 2004 5:03 pm

easy way to check would be to /target id 1, kill it and see when the next mob with id of 1 pops. i assume that when you kill a mob, the next respawn would take the lowest id number that's not being used at the time, but who knows!

rootmoth
orc pawn
orc pawn
Posts: 27
Joined: Fri Oct 04, 2002 9:27 pm

Post by rootmoth » Tue May 18, 2004 7:56 pm

The spawn ids are constantly incrementing. However, they eventually "wrap" and start over at 1.