These 2 ASH functions are returning incorrect/random values for non-standard or no familiar equipment, but work fine with the default familiar equipment. and i don't know why.
The code snippet below explains the core problem i am having. I ran it with the Mosquito equipped with the ant hoe. The script first returns saying i have the hypo equipped, which is just not so! I then manually unequipped the ant hoe and ran the script again, with the same results. Earlier it said i had nothing equipped. It almost seems random, unless the default item is equipped.
Anyone have any ideas? Thanks!
Results:
The code snippet below explains the core problem i am having. I ran it with the Mosquito equipped with the ant hoe. The script first returns saying i have the hypo equipped, which is just not so! I then manually unequipped the ant hoe and ran the script again, with the same results. Earlier it said i had nothing equipped. It almost seems random, unless the default item is equipped.
Anyone have any ideas? Thanks!
Code:
void test() {
print("Familiar= " + my_familiar() );
item ito = equipped_item( $slot[ familiar ]);
print("*** Initially Equipped_Item= " + ito );
if (have_equipped(to_item("ant hoe"))) {
cli_execute("unequip " + "ant hoe");
ito = equipped_item( $slot[ familiar ]);
}
print("----Equipped_Item= " + ito );
}
void main() {
test();
}
Results:
Code:
> call scripts\3testundress_pets.ash
Familiar= Mosquito
*** Initially Equipped_Item= hypodermic needle
----Equipped_Item= hypodermic needle