Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 36

Thread: Vlad's Familiar Changing Frankenscript

  1. #11
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    190

    Default

    I'll trim the list down tonight for a quick run-trough, to make sure the intergnat part works. Still not sure what to do about the ending error message, though... Try as he may, my intergnat just can't wear brass turkey knuckles. I tried a version that was supposed to equip their corresponding equipments, but it just returns the same error message after automation is stopped (either manually, or by running out of adventures). I'm beginning to just wonder if that's a result of switching familiars during automation...

  2. #12
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,656

    Default

    Checkpoint clear MIGHT fix it. Mafia makes implicit outfit checkpoints on adventuring and when something changes your familiar or its gear during that - such as purchasing using the travoltan trousers or something similar - it switches your gear back. Unfortunately that causes issues when switching familiars. Fortunately it doesn't make things not work - just gives a little informative "Hey, I'm still working! Just wanted you to know!" message that you can safely ignore.

    Alternatively, you could throw up a "clear" or "cls" to wipe the message off the screen if it really bugs you.

  3. #13
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    190

    Thumbs up

    Personally, I'll just be happy if the script works without breaking something important. That's the goal of the experiment. And quite honestly, Mafia turning red and tossing up an error message make me take notice more than it turning green at the end of adventuring, so I don't get too lazy about checking up on it.

    I just figured that if the error message could be prevented, then that would make anyone else wanting to use it happier. I ran out of adventures last night, so I can't test the new modifications until tonight. I'll let you know what works and what doesn't.

    If I can get rid of the error message, then I can figure out how to make a fake error show up that says their current familiar can't wear its own equipment, come next April...

    EDIT: Put this at the front of the code. Fixed the error.
    Code:
    cli_execute("checkpoint clear");
    Last edited by VladYvhuce; 05-17-2016 at 05:04 AM. Reason: new data

  4. #14
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,656

    Default

    Yeah, as I said, clearing the implicit checkpoint should take care of it. Does mean that if any other non-familiar gear got changed, it might get abandoned wrong. But... eh, it's your script, for you, and you know if/when you want your gear changed up. Hopefully.

  5. #15
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    190

    Default

    I can't say that I'll run into a problem with automated gear changing any time in the foreseeable future. I use the gear changer to switch between outfits, or modify one outfit into a new one. And that's usually done before daily deeds and food/spleen consumption. And sometimes the maximizer for in-ronin rollover equipment. This is more of a script for me to run when I'm sick or tired or have to go help someone with something in the middle of the night, or just want Mafia to auto-farm for me while I watch a movie or something, than one to persistently keep as a BBB script forever. Case in point: Now that I've got it fixed, I actually disabled it so I could stick with an attacking familiar to get through the sewers. And I may want to stick with certain familiars while gathering hobo nickles... But for general item farming, it's a wonderful addition, in my book.
    In KOL: VladYvhuce (#1798867)

  6. #16
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    190

    Default

    Hey, y'all! I've decided to try and make a companion script for this one, if I can. My intention is to get it to switch familiars (both active and bjornified) when they hit max weight. My only real problem is that I don't know what to check for, there, or how to make one become bjornified through scripting. Any and all help would be appreciated.

  7. #17
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,656

    Default

    > ashref weight

    int familiar_weight( familiar )
    int weight_adjustment( )

    > ashref throne

    boolean enthrone_familiar( familiar )
    familiar my_enthroned_familiar( )
    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...

  8. #18
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    190

    Default

    I'm going to need more instruction on how to use that stuff. What my script doesn't say is invalid (which is most of what you posted), is somehow incompatible with my variables. So, now, I have a completely broken script that makes Mafia yell at me whenever I try to fix it... Thank goodness for backup copies.

  9. #19

    Default

    I'm going to need more instruction on how to use that stuff. What my script doesn't say is invalid (which is most of what you posted), is somehow incompatible with my variables. So, now, I have a completely broken script that makes Mafia yell at me whenever I try to fix it... Thank goodness for backup copies.
    Originally Posted by VladYvhuce View Post
    What Theraze posted isn't code, it's the output of the CLI "ashref" command showing you what functions you're probably looking for. You can frequently take a guess or three at what words might be in the function you need and find it this way.

    I don't know exactly what your logic is in choosing your familiars, but this should get you started.

    Code:
    if( familiar_weight( my_familiar() ) >= 20 ) {
      // Familiar choosing logic goes here
      use_familiar( chosenfamiliar );
    }
    if( familiar_weight( my_enthroned_familiar() ) >= 20 ) {
      // Familiar throne choosing logic goes here
      enthrone_familiar( chosenfamiliar );
    }

  10. #20
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    190

    Default

    Ah. Shows what I know... I'll try it with the actual code, tonight.

    For choosing familiars, I simply have a list of ones that I'd like to use. I'm also working up a secondary list for the bjornified familiars I like to use.

    Now that I have a better idea of what I'm doing, it looks a lot less jumbled and confused in the code. So, hopefully, that'll translate into functionality.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •