[quote author=efilnikufecin link=topic=82.msg271#msg271 date=1145148125]
I am wanting to think I saw a have_familiar command somewhere. If that is an actual command, then:
Code:
if(have_familiar($familiar[leprechaun]))
{
equip_familiar($familiar[leprechaun]);
}
I haven't tested this though.
[/quote]
If it is, it is undocumented. I suppose I could check the source....
Still, I don't have any trouble using equip_familiar without having it abort the script. You can check out my "dressing your familiar" script
here where I have, in part, the following:
Code:
boolean dress_pet(familiar pet)
{
item it;
it = familiar_to_item(pet);
if (item_amount(it)==0) return false;
if (!equip_familiar(pet)) return false;
if (!equip(it)) return false;
if (item_amount(it)>0) sell_item(item_amount(it), it);
return true;
}
And this works no matter whether I own the familiar or not.
Thinking out loud without doing any testing, I wonder if the difference is that I am using the function in a boolean context. That is, if
equip_familiar(pet); aborts the script, maybe
if (!equip_familiar(pet)) council(); wouldn't.