any cmd for detecting pet? [solved]

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

any cmd for detecting pet? [solved]

#1 Post by botje » Wed Dec 12, 2012 11:04 am

is there anything i can use to see if my alt has a pet, so i can enable pet assist accordinly?
Last edited by botje on Thu Dec 13, 2012 8:18 am, edited 3 times in total.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any cmd for detecting pet?

#2 Post by rock5 » Wed Dec 12, 2012 11:21 am

You can use the eggpet class. This checks the first 3 slots.

Code: Select all

local pet
for i = 1,3 do
    pet = CEggPet(i)
    if pet.EggId ~= 0 then
        break
    end
end
if pet.EggId == 0 then
    settings.profile.options.EGGPET_ENABLE_ASSIST = false
else
    settings.profile.options.EGGPET_ENABLE_ASSIST = true
    settings.profile.options.EGGPET_ASSIST_SLOT = i
end
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: any cmd for detecting pet? [solved]

#3 Post by botje » Wed Dec 12, 2012 11:27 am

very nice ^^

im always amazed how easy you pull these things out of your hat xd

thanx rock :)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any cmd for detecting pet?

#4 Post by rock5 » Wed Dec 12, 2012 11:37 am

Well it helps that I wrote the eggpet class and I know the options. :D
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: any cmd for detecting pet?

#5 Post by botje » Wed Dec 12, 2012 11:57 am

true true xd

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: any cmd for detecting pet? [solved]

#6 Post by botje » Wed Dec 12, 2012 4:10 pm

hmm. does'nt work O.o

keeps printing cant find id etc

i used it in onload profile

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any cmd for detecting pet?

#7 Post by lisa » Wed Dec 12, 2012 5:17 pm

rock5 wrote:You can use the eggpet class. This checks the first 3 slots.

Code: Select all

local pet
for i = 1,3 do
    pet = CEggPet(i)
    if pet.EggId ~= 0 then
        break
    end
end
if pet.EggId == 0 then
    settings.profile.options.EGGPET_ENABLE_ASSIST = false
else
    settings.profile.options.EGGPET_ENABLE_ASSIST = true
    settings.profile.options.EGGPET_ASSIST_SLOT = i
end
that is for your own egg pet, he means another character's eggpet.

If you know the name of it's pet you could do a "scan" of objects for it's name I guess. Not sure if there is any indicator for who the pet belongs to, maybe the name also says the owner in memory?

<Joes pet Shadow>
Joe being character's name, Shadow being pet's name. Worth checking out.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: any cmd for detecting pet? [solved]

#8 Post by botje » Wed Dec 12, 2012 6:37 pm

no, i actually mean my own pet, so i can enable it.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any cmd for detecting pet? [solved]

#9 Post by lisa » Wed Dec 12, 2012 8:35 pm

botje wrote:no, i actually mean my own pet, so i can enable it.
ohh well in that case we should fix rock's code lol

Code: Select all

local pet
for i = 1,3 do
    pet = CEggPet(i)
    if pet.EggId ~= 0 then
        break
    end
end
if pet.EggId == 0 then
    settings.profile.options.EGGPET_ENABLE_ASSIST = false
else
    settings.profile.options.EGGPET_ENABLE_ASSIST = true
    settings.profile.options.EGGPET_ASSIST_SLOT = pet.EggSlot
end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any cmd for detecting pet?

#10 Post by rock5 » Wed Dec 12, 2012 10:14 pm

As usual. :D :oops:
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: any cmd for detecting pet?

#11 Post by botje » Thu Dec 13, 2012 3:09 am

thanx :P

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests