Need some help on targeting a PC's pet.

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

skysurf
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Aug 15, 2003 1:54 am

Need some help on targeting a PC's pet.

Post by skysurf » Sat Dec 13, 2003 11:29 pm

I am working on a really cool PL script for a 63 shaman I have, and in a group that im PLing right now, there are 2 necro's and they want my shaman to me able to buff their pets.

So far im using keywords from tells such as heal, regen, shield etc. to trigger my shaman to cast those spells on the person who sends the tell.

My question is is there a way to target an PC's pet in macroquest.

For example if say Noob1 sends a tell "regenpet"

I would like code to fire such as

/if "@Param1"=="Noob1" /if "@Param2"~~"regenpet" /call Cast_Regen_Pet_Groupyone

Sub Cast_Regen_Pet_Groupyone
/stand
/traget (this is where I need code to return Noob1's pet)
/delay 2
/call Spellsub "Chloroplast"
/sit
/return

Thanks in advance, and sorry, I STILL haven't learned how to put code in the pretty yellow code window =/

Sky

P.S. This PL script for my Shammy is turning out to be really sweet. As soon as I add some more functionality it will get posted :)

skysurf
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Aug 15, 2003 1:54 am

Post by skysurf » Sun Dec 14, 2003 1:31 am

Nevermind, I got it figured out.

/target Noob1
/delay 2
/target pet
/call Spellsub OMGYOURUBERYOUFIGUREDITOUT!


Sky

skysurf
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Aug 15, 2003 1:54 am

Post by skysurf » Sun Dec 14, 2003 2:36 am

Bah, still need help.

Apparently the

/target pet

after the /target Noob1 just gets the nearest pet.

I need something to actuall get my targets pet and target it.


Sky

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Sun Dec 14, 2003 2:59 am

This is an interesting request ..I will have to look into it.

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Sun Dec 14, 2003 12:02 pm

Use this, fist

Code: Select all

/target pc "petmaster name"
or

Code: Select all

/target id "petmaster id"
then

Code: Select all

/target id $target(pet)
This will target the target pet for sure, if the target pet exist of course. You can control if target pet is alive using

Code: Select all

/if n $target(pet)!=0
where if $target(pet)==0 then pet do NOT exists.

NotSoCSharp
a ghoul
a ghoul
Posts: 85
Joined: Sat Oct 25, 2003 10:48 am

Post by NotSoCSharp » Mon Dec 15, 2003 8:02 am

Try:

Code: Select all

/target id $spawn($group(0),pet)