Finding spawns with light sources

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

User avatar
Leezard
a ghoul
a ghoul
Posts: 81
Joined: Wed Feb 04, 2004 12:54 pm

Finding spawns with light sources

Post by Leezard » Thu Feb 05, 2004 11:38 am

I've searched for it but I just cant find the info I need. I really need a starting point for this. I've tried $target(light) and it returns nothing. $spawn(light) returns false even when there is a light src. $char(light) also returns NONE when i know there is one. If someone could set me on the right path for this I'd appreciate it.

Eventually, id like to have to target shardwurms untill it finds one with a light and then target that one. I just need a starting point, thanks for any help you guys can offer. :D
Death is merely a doorway, for a god!

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Thu Feb 05, 2004 2:11 pm

It will only work if the item is actually a "held item". If the light source is a drop then it wount work. I believe they are holding it though, seq shows it so its not inventory.

$char(option [,"param")

so

/echo $char(held,left|right|shield|holding)

could try that.

Bob

User avatar
Leezard
a ghoul
a ghoul
Posts: 81
Joined: Wed Feb 04, 2004 12:54 pm

Post by Leezard » Thu Feb 05, 2004 4:32 pm

hmm, that may work, but i was actually thinking more along the lines of the fact that light info has to be sent to the client, as discussed in this post.
Death is merely a doorway, for a god!

GD
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jun 29, 2002 11:57 pm

Post by GD » Thu Feb 05, 2004 10:04 pm

/target id $searchspawn(light)
Opinions are like assholes, everyone has one, but most of them stink.

User avatar
Leezard
a ghoul
a ghoul
Posts: 81
Joined: Wed Feb 04, 2004 12:54 pm

Post by Leezard » Fri Feb 06, 2004 10:34 am

Perfect GD! Thanks so much!
Death is merely a doorway, for a god!

DyvimTvar
orc pawn
orc pawn
Posts: 16
Joined: Wed Oct 22, 2003 1:21 pm

Just saw ...

Post by DyvimTvar » Fri Feb 06, 2004 4:11 pm

GD wrote:/target id $searchspawn(light)
This is great, and perfectly timed, I have tried to figure out how to target just a. lets say williwisp, with a light by using:

Code: Select all

/target id $searchspawn("willowwisp",npc,light)
and various other combinations of the same, but can't seem to get a way to filter the search to a specific type of mob. Any ideas?

Update:

After some time in IRC, target id $searchspawn(npc,race:wurm,light) works if there is one, but $searchspawn(options) returns 0 if nothing is found and target id 0 targets closest, which in a crowded are can be hard to figure out if you are not smart.

If anyone wants a short macro snippet to find the closest thing with a lightsource, let me know and I'll post it to snippets.
DyvimTvar

GD
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jun 29, 2002 11:57 pm

Post by GD » Fri Feb 06, 2004 10:35 pm

Code: Select all

/declare SpawnID global
/varset SpawnID $searchspawn(npc,class:wurm,light)
/if n @SpawnID>0 {
   /target id @SpawnID
   /delay 5
   /face
}
Opinions are like assholes, everyone has one, but most of them stink.

lestor
orc pawn
orc pawn
Posts: 16
Joined: Sat Jan 10, 2004 6:31 am

Post by lestor » Mon Feb 09, 2004 7:29 am

$spawn(light) is working great for me.. here's the code I've been using...

Code: Select all

$spawn($searchspawn("shardwurm"),light)!=NONE /call TargetWurm

masacist
orc pawn
orc pawn
Posts: 11
Joined: Tue Jan 27, 2004 10:40 am

Complete code

Post by masacist » Thu Feb 12, 2004 5:10 pm

Heya guys, this's looking quite neat, but i just wondered, is it possible to get the full code you guys are using plz.

i cut and pasted a few things into a mac but they dont seem to be working for me, plz help, ty.
"Theres only 10 types of people who understand Binary - and them who read Binary for Dummies"

masacist
orc pawn
orc pawn
Posts: 11
Joined: Tue Jan 27, 2004 10:40 am

Anyone plz???

Post by masacist » Sat Feb 14, 2004 12:38 pm

n/t
"Theres only 10 types of people who understand Binary - and them who read Binary for Dummies"