Equip all familiars Script please?

Criswell

New member
I'd like to see a script to equip all familiars with their specific special equipment. I spend a lot of time clicking to put all of those items on them. Does someone already have something like this? I wrote a set specific for my characters, but found I had to keep modifying it when I got new familiars or equipment. TIA - Criswell
 
[quote author=Criswell link=topic=247.msg1235#msg1235 date=1151604844]
but found I had to keep modifying it when I got new familiars or equipment. TIA - Criswell
[/quote]

Unfortunately, that will always be true... Well... If you aren't updating it, someone will be.
 

Tirian

Member
Well, it might depend. If Criswell is buying the IotM every month, then it will require regular maintenance. But if Criswell is a more novice player who is adding long-existing familiars like the bonus mushrooms or the NPZR, then a comprehensive list that is several months out of date could be quite useful.

I've been of the mind for a while now to split TirianLib.ash so as to divide the basic functions from the collections of maps, and to make the latter more of an "open-source" file that people would be encouraged to publicly correct as the need arose. My main reservation is that it would be pretty ugly having the Scripts drop-down menu filled with header files that would have no executable functionality. Maybe if I bake Holatuwol a batch of cookies he can set up a special extension for ASH headers that would be excluded from the menu list. :D
 

holatuwol

Developer
Tirian said:
My main reservation is that it would be pretty ugly having the Scripts drop-down menu filled with header files that would have no executable functionality.  Maybe if I bake Holatuwol a batch of cookies he can set up a special extension for ASH headers that would be excluded from the menu list.
If you prefix the name of your script with a "." (in other words, ".TirianLib.ash" instead of "TirianLib.ash"), it will be ignored in the scripts dropdown.  Also, if you add either a ~ or a .bak to the end of a script's filename, it'll be considered a backup file and therefore not be included in the menu list.  Finally, if you go into your preferences and start configuring your scriptbar to only include files you use, and even go so far as go into the Login configuration and ask that the scriptbar always appear on the main panel, then you won't even need to look at the script menu.

I'm a huge fan of oatmeal raisin cookies.
 

macman104

Member
That would probably because some of those functions have changed (like familiar_to_item) and some may not be there anymore. If you could be more specific about "wigging out" we might be able to help you use the script correctly.
 

Veracity

Developer
Staff member
Yeah, yeah. Well, OK.

I fixed the button in revision 5589. It will now pull familiar items from the closet or storage, as needed, to equip all of your familiars.
 

hippymon

Member
[quote author=Veracity link=topic=247.msg6759#msg6759 date=1200935222]
Yeah, yeah. Well, OK.

I fixed the button in revision 5589. It will now pull familiar items from the closet or storage, as needed, to equip all of your familiars.
[/quote]

Woot, that would be helpful if I played. Thanks!

EDIT: That is helpful, thanks!
 

macman104

Member
[quote author=hippymon link=topic=247.msg6771#msg6771 date=1200972788]Woot, that would be helpful if I played. Thanks![/quote]What? You brought up the issue, but now you say you don't play? I'm confused?
 

th3y

Member
I fixed the button in revision 5589. It will now pull familiar items from the closet or storage, as needed, to equip all of your familiars.


Necro/feedback: I wouldn't mind if it tried the clan stash, and/or mall purchase (subject to built-in price limit) for familiar items unavailable in inventory/closet/storage...

-That's what TH3Y think
 

Veracity

Developer
Staff member
It would do that automatically, if I used the built-in "acquire" technology, but I tried to be efficient and bulk-move items from storage, rather than getting them one at a time.

I could add stash and mall as sources. But, since I already own all the items for all of my familiars, I wouldn't ever use it or be able to test it.
 

Bale

Minion
Huh? What? Why should we need to use mafia's familiars.txt file? This is way too easy. Thanks to a recently added feature I can do this whole script in a few lines and be certain it will always be updated to use mafia's current information about familiars.

Code:
void main() {
   item pet_toy;
   foreach pet in $familiars[]
      if(have_familiar(pet)) {
         pet_toy = familiar_equipment(pet);
         if(familiar_equipped_equipment(pet) != pet_toy) {
            retrieve_item(1, pet_toy);
            use_familiar(pet);
            equip($slot[familiar], pet_toy);
         }
      }
}
 
Last edited:

zarqon

Well-known member
Small edit to save server hits:

Code:
void main() {
   item pet_toy;
   foreach pet in $familiars[]
      if(have_familiar(pet)) {
         pet_toy = familiar_equipment(pet);
         if(familiar_equipped_equipment(pet) != pet_toy) {
            retrieve_item(1, pet_toy);
            if (pet == my_familiar()) equip($slot[familiar], pet_toy);
              else visit_url("familiar.php?pwd&action=equip&whichfam="+to_int(pet)+"&whichitem="+to_int(pet_toy));
         }
      }
}
 

Bale

Minion
Yeah, well, if I'd been serious about this script I could have figured out the php for that line also. It just didn't seem worth the trouble for such a minor script that I rattled off in a few minutes just to make a point about not needing to parse familiars.txt.

Bloody perfectionist.
 

zarqon

Well-known member
What's this, a lapse in Bale's OCD?

I was actually kind of happy to finally find something to fix in your code. I think usually it's the other way around. :)
 
Top