#### VladYvhuce

##### Member

Nope... It just sits, there looking nice, but won't change familiars for me.

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter VladYvhuce
- Start date

Nope... It just sits, there looking nice, but won't change familiars for me.

Nope. enthrone only works with a crown of thrones, not a bjorn.Looks like you can use enthrone_familiar to do that. You can check your familiars weights, as well as the weight adjustment, to figure out when to shift them, so...

Edit: bjornify_familiar and my_bjorned_familiar work. But I still can't get the weight checking to work with the nice, neat listing function that my "change when the familiar reaches its drop limit" scripts use. I've had to go back to my archaic original design to get the script to work.

Last edited:

This is the code that works:

Code:

```
void main ()
//Familiars.
if (my_familiar() != $familiar[astral badger] && (familiar_weight($familiar[astral badger]) < 20))
use_familiar($familiar[astral badger]);
if (my_familiar() == $familiar[astral badger] && (familiar_weight($familiar[astral badger]) >= 20))
use_familiar($familiar[fist turkey]);
if (my_familiar() == $familiar[fist turkey] && (familiar_weight($familiar[fist turkey]) < 20))
use_familiar($familiar[fist turkey]);
if (my_familiar() == $familiar[fist turkey] && (familiar_weight($familiar[fist turkey]) >= 20))
use_familiar($familiar[space jellyfish]);
if (my_familiar() == $familiar[space jellyfish] && (familiar_weight($familiar[space jellyfish]) < 20))
use_familiar($familiar[space jellyfish]);
if (my_familiar() == $familiar[space jellyfish] && (familiar_weight($familiar[space jellyfish]) >= 20))
use_familiar($familiar[restless cow skull]);
if (my_familiar() == $familiar[restless cow skull] && (familiar_weight($familiar[restless cow skull]) < 20))
use_familiar($familiar[restless cow skull]);
if (my_familiar() == $familiar[restless cow skull] && (familiar_weight($familiar[restless cow skull]) >= 20))
use_familiar($familiar[baby sandworm]);
if (my_familiar() == $familiar[baby sandworm] && (familiar_weight($familiar[baby sandworm]) < 20))
use_familiar($familiar[baby sandworm]);
if (my_familiar() == $familiar[baby sandworm] && (familiar_weight($familiar[baby sandworm]) >= 20))
use_familiar($familiar[intergnat]);
//Bjorned Familiars
if (my_bjorned_familiar() != $familiar[galloping grill] && (familiar_weight($familiar[galloping grill]) < 20))
bjornify_familiar($familiar[galloping grill]);
if (my_bjorned_familiar() == $familiar[galloping grill] && (familiar_weight($familiar[galloping grill]) >= 20))
bjornify_familiar($familiar[li'l xenomorph]);
if (my_bjorned_familiar() == $familiar[li'l xenomorph] && (familiar_weight($familiar[li'l xenomorph]) < 20))
bjornify_familiar($familiar[machine elf]);
if (my_bjorned_familiar() == $familiar[machine elf] && (familiar_weight($familiar[machine elf]) >= 20))
bjornify_familiar($familiar[golden monkey]);
if (my_bjorned_familiar() == $familiar[golden monkey] && (familiar_weight($familiar[golden monkey]) < 20))
bjornify_familiar($familiar[bloovian groose]);
if (my_bjorned_familiar() == $familiar[bloovian groose] && (familiar_weight($familiar[bloovian groose]) >= 20))
bjornify_familiar($familiar[blavious kloop]);
if (my_bjorned_familiar() == $familiar[blavious kloop] && (familiar_weight($familiar[blavious kloop]) < 20))
bjornify_familiar($familiar[green pixie]);
```

This is my working "item drop switch" code, which I can't figure out how to modify to get it to switch with weight:

Code:

```
cli_execute("checkpoint clear");
familiar next_familiar() {
foreach f in $familiars[fist turkey, adventurous spelunker, machine elf, astral badger, baby sandworm, rogue program, green pixie, li'l xenomorph, llama lama, blavious kloop]
if (have_familiar(f) && f.drops_today < f.drops_limit)
return f;
if (have_familiar($familiar[intergnat])) return $familiar[intergnat];
return my_familiar();
}
void main() {
familiar next = next_familiar();
if (next != my_familiar()) use_familiar(next);
}
```

Code:

```
boolean setfam = false;
foreach f in $familars[astral badger, fist turkey, space jellyfish, restless cow skull, baby sandworm]
{
if (have_familiar(f) && familiar_weight(f) < 20)
{
if (my_familiar() != f) use_familiar(f);
setfam = true;
}
}
if (!setfam && have_familiar($familiar[intergnat] && my_familiar() != $familiar[intergnat]) use_familiar($familiar[intergnat]);
```

If that'll get the job done, then I'll be quite happy. I wasn't aware that "setfam" was a thing. I'll overhaul one of my "item drop" scripts and see how it works, tonight.Code:`boolean setfam = false; foreach f in $familars[astral badger, fist turkey, space jellyfish, restless cow skull, baby sandworm] { if (have_familiar(f) && familiar_weight(f) < 20) { if (my_familiar() != f) use_familiar(f); setfam = true; } } if (!setfam && have_familiar($familiar[intergnat] && my_familiar() != $familiar[intergnat]) use_familiar($familiar[intergnat]);`

Nope. That script just makes the familiars cycle and then not use a familiar.

Code:

```
boolean setfam = false;
foreach f in $familars[astral badger, fist turkey, space jellyfish, restless cow skull, baby sandworm]
{
if ([COLOR="#FF0000"]!setfam && [/COLOR]have_familiar(f) && familiar_weight(f) < 20)
{
if (my_familiar() != f)
use_familiar(f);
setfam = true;
}
}
if (!setfam && have_familiar($familiar[intergnat] && my_familiar() != $familiar[intergnat])
use_familiar($familiar[intergnat]);
```

Ok. I'll give that a shot.

Behold!

Code:

```
//Fam
boolean setfam = false;
foreach f in $familiars[astral badger, fist turkey, space jellyfish, restless cow skull, baby sandworm, rogue program, robortender, bark scorpion, el vibrato megadrone]
{
if (!setfam && have_familiar(f) && familiar_weight(f) < 20)
{
if (my_familiar() != f) use_familiar(f);
setfam = true;
}
}
if (!setfam && have_familiar($familiar[robot reindeer]) && my_familiar() != $familiar[robot reindeer]) use_familiar($familiar[robot reindeer]);
//Bjorn
boolean setbjorn = false;
foreach f in $familiars[unconscious collective, golden monkey, grim brother, bloovian groose, baby mutant rattlesnake, blavious kloop, galloping grill, rockin' robin, optimistic candle]
{
if (!setbjorn && have_familiar(f) && familiar_weight(f) < 20)
{
if (my_bjorned_familiar() != f) bjornify_familiar(f);
setbjorn = true;
}
}
if (!setbjorn && have_familiar($familiar[piano cat]) && my_bjorned_familiar() != $familiar[piano cat]) bjornify_familiar($familiar[piano cat]);
```

Finally! A working script that will change both regular familiar and bjornified familiar! Many thanks for the help, y'all.

Is there an SVN, or a file we can download? I would like to try this, but I'm not exactly sure which part of the code I'm supposed to use.

Oh, wow. I didn't expect anyone would care about my tinkering with other people's script to get them to do my bidding... These scripts work best if used as pre-adventure scripts. You'll want to customize them to fit with your own familiars.Is there an SVN, or a file we can download? I would like to try this, but I'm not exactly sure which part of the code I'm supposed to use.

"famchanger" is the one what will change the familiars based on weight. I've added a section so that now it covers familiar, bjorned familiar, and enthroned familiar. If you lack a bjorn and/or a crown of thrones, then comment out or delete the part you don't need. It assumes you have both a bjorn and a crown equipped.

"DropFams" is the one what changes familiars once they reach their daily item drop limits, and then switches to one without drop limits, if you have adventures to spare after farming. It's a lot simpler than "famchanger".

View attachment DropFams4-6.ashView attachment famchanger1-1.ash

This is the right place. I'm just surprised that someone actually cared about them, is all.FYI, if you're posting for your own interest and not meaning it to be released, Scripting Discussion would be the place for those questions. The Repository is where you keep scripts that you want people to use.

No thanks. I think they're in the right place.VladYvhuce, would you like me to move the thread from the Repository to Discussion?

I used part of Vlad's script on a script that I'm using. It's designed to look for things that can still be done.

I added all familiars that have item drops.

"Miniature Sword & Martini Guy" isn't recognized by mafia.

I get the error: Bad familiar value: Miniature Sword & Martini Guy

but if I remove the "Martini Guy", Mafia says to use "Miniature Sword & Martini Guy", and continues on with the script anyways

Doesn't look like there's a good way to use the full familiar name, so that's a mafia issue.