How do i return info for rampage Pet?

Joined
Jun 7, 2007
Messages
816
Reaction score
3
Points
18
Been wanting to tweek a macro of mine by waiting until my mage's rampage pet poofs gone before i pull the next mob with a non aggro spell.

Only thing is i can't seem to return back any info under normal methods.

Tried:

${Spawn[${Me.CleanName}'s pet].ID}

${Spawn[${Me.CleanName}'s pet]}

typing out my toon's name instead of using ${Me.CleanName}

All to no avail.... any insight is appreciated.

The reason I want to do this is because if rampage pet is still up when i pull next mob... if the mob is a caster and far away... rampage pet will go in immediately and attack it at that far distance before the mob enters the distance i like to use where i engage the mob....
 
target a pet and /echo ${Target}

see what it returns. i wanted to make a Me.SwarmPet TLO member but i didnt see it in the code as an option. Might take a look at it again if i get a chance.
 
You could probably do it as a close by spawn search in a small loop:

Untested:
Code:
/declare pNum int local 1
/declare pID int local 0
:start
   /varset pID ${Me.NearestSpawn[${pNum},PET radius 40].ID}
   /if (${pID} && ${Spawn[${pID}].Owner.ID}==${Me.ID}) {
      | This is a pet of yours, do something about it =P
   } else /if (!${pID}) {
      /goto :out
   }
   /varcalc pNum ${pNum} + 1
/goto :start
:out

I can't remember if PET works in the Spawn search or not (according to the wiki it does), if it doesn't you'd just change it to NPC and add to the If ${Spawn[${pID}].Type.Equal[PET]}

I'd have to look in game to figure out how to differentiate between a rampage pet and your normal pet. If the rampage pet doesn't show up under ${Me.Pet.ID} even when you don't have a pet summoned, you could simply add && ${pID}!=${Me.Pet.ID} in the /if statement there. Or you could just total up the number of pets that have you set as an Owner in the radius and if it's more than 1, you've got some kind of pet other than your primary out (assuming your primary isn't dead =p).

I also seem to remember when doing this like this in the past having to add something to make sure the pID wasn't the last pID or something like that, and if it was breaking out of the loop. Seems like once it got to the last match any number higher than it would return the last match or something like that (but I could be misremembering hehe).

But maybe that will give you something to go on before I have time to get in game to play with it further.

Dev

EDIT: realized I didn't put an out for the loop so if you used it just like that it would loop forever lol. So added an out if there isn't a pID, if this were in a subroutine instead of loops you could do a /return there instead of a /goto :eek:ut
 
Last edited:
Yes.. pet definately works in a spawn search.. just as MPC and PC and Merc do.

Thanks to pete and you dev.. i'll look into it now.


WOULD LOVE A TLO for this


You could probably do it as a close by spawn search in a small loop:

Untested:
Code:
/declare pNum int local 1
/declare pID int local 0
:start
   /varset pID ${Me.NearestSpawn[${pNum},PET radius 40].ID}
   /if (${pID} && ${Spawn[${pID}].Owner.ID}==${Me.ID}) {
      | This is a pet of yours, do something about it =P
   } else /if (!${pID}) {
      /goto :out
   }
   /varcalc pNum ${pNum} + 1
/goto :start
:out

I can't remember if PET works in the Spawn search or not (according to the wiki it does), if it doesn't you'd just change it to NPC and add to the If ${Spawn[${pID}].Type.Equal[PET]}

I'd have to look in game to figure out how to differentiate between a rampage pet and your normal pet. If the rampage pet doesn't show up under ${Me.Pet.ID} even when you don't have a pet summoned, you could simply add && ${pID}!=${Me.Pet.ID} in the /if statement there. Or you could just total up the number of pets that have you set as an Owner in the radius and if it's more than 1, you've got some kind of pet other than your primary out (assuming your primary isn't dead =p).

I also seem to remember when doing this like this in the past having to add something to make sure the pID wasn't the last pID or something like that, and if it was breaking out of the loop. Seems like once it got to the last match any number higher than it would return the last match or something like that (but I could be misremembering hehe).

But maybe that will give you something to go on before I have time to get in game to play with it further.

Dev

EDIT: realized I didn't put an out for the loop so if you used it just like that it would loop forever lol. So added an out if there isn't a pID, if this were in a subroutine instead of loops you could do a /return there instead of a /goto :eek:ut
 
Pete .... i targeted my summoned rampage pet... and did a return back of

/echo ${Target} once i got it targeted.


it returns back MyToonName's_pet00

if i have a 2nd one up.. its MyToonName's_pet01

its not pretty.. but at least i know what to look for....

A TLO for Me.SwarmPet would rock ..... seriously...
 
Last edited:
Using this in my code immediately before i call the pullmob sub i wrote.

Code:
|----------------------------------------------
| Wait for rampage pets to poof before pulling.
|----------------------------------------------
/for i 1 to 3
    /if (${Spawn[${Me.CleanName}`s_pet0${i}].ID}) /echo +++ My rampage pet is up: (${Spawn[${Me.CleanName}`s_pet0${i}].CleanName}|${Spawn[${Me.CleanName}`s_pet0${i}].ID}), HOLDING . . .
    :WaitOnRampagePets
    /delay 5
    /if (${Spawn[${Me.CleanName}`s_pet0${i}].ID}) /goto :WaitOnRampagePets
/next i




WORKS GREAT! (once i realized thats is a tilda before the s and not an apostrophe.. lol
 
Last edited: