any cmd for detecting pet? [solved]
Posted: 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?
MicroMacro home
https://www.solarstrike.net/phpBB3/
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
endthat is for your own egg pet, he means another character's eggpet.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
ohh well in that case we should fix rock's code lolbotje wrote:no, i actually mean my own pet, so i can enable it.
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