Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Trouble With use_familiar()

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    7

    Default Trouble With use_familiar()

    Trying to change my familiar from the Baby Sandworm to the Llama Lama once I have 5 agua. This is in the script that runs Between adventures:

    Code:
    if(!use_familiar($familiar[Llama Lama])){
       print("Error trying to change familiar to Llama Lama.", "red");
       exit;
    }
    I got "Your Llama Lama can't wear a string of dingle balls" and it kicks me out of my overall script.

    What am I doing wrong? The Llama is wearing the Zen Motorcycle in storage and the Sandworm is wearing the Dingleballs.

  2. #2
    Junior Member
    Join Date
    Oct 2008
    Posts
    7

    Default

    OK, I give up, I'm not sure whether I broke some rule or what. What do I need to do differently in order to get some assistance on this?

  3. #3
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    944

    Default

    It's not clear from what you have posted why that would happen. If you go to Preferences > Automation, do you have anything listed as "Familiar Script"? If so, is what you have listed possibly trying to equip your Lama with the wrong equipment?

    Else, you'll need to provide more details, (e.g. more of the code you are using) in order for anyone to help you figure it out.

  4. #4
    Junior Member
    Join Date
    Oct 2008
    Posts
    7

    Default

    Thank you for the reply. In Automtion, other than log in and log out scripts, I have a post-adventure script. Here is the extent of that script:

    Code:
    void main(){
    	item   familiar_equipment;
    	// don't allow this script in Ronin
    	if(!can_interact()){
    	   exit;
    	}
    	
    	// familiar management
    	// ** replace Sandworm with Llama when we have 5 agua
       if(my_familiar() == $familiar[Baby Sandworm]){
       	// count agua
       	if(get_property("_aguaDrops") == 5){
       		// use LLama
       		if(!use_familiar($familiar[Llama Lama])){
       			print("Error trying to change familiar to Llama Lama.", "red");
       			exit;
       		}
       	}
       }
       
    	// ** replace Llama with Jumpsuited Hound Dog when we have 5 gongs
       if(my_familiar() == $familiar[Llama Lama]){
       	// count gongs
       	if(get_property("_gongDrops") == 5){
       		// use Hound Dog
       		if(!use_familiar($familiar[Jumpsuited Hound Dog])){
       			print("Error trying to change familiar to Jumpsuited Hound Dog.", "red");
       			exit;
       		}
       	}
       }
    }

  5. #5
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    944

    Default

    Hmmm. I assume that the sandworm is already wearing the dingle balls when this happens?

    My next advice would be to use the sandworm with the dingle balls and 5 aqua drops.

    Go to the Help menu. Click "Start Debug Log".

    Run your post-adventure script (and trigger the error).

    Help > "Stop Debug Log"

    Find the debug log in your mafia directory and attach it to a post here. Hopefully, someone more knowledgeable than me will come along and interpret it for you.

  6. #6
    Junior Member
    Join Date
    Oct 2008
    Posts
    7

    Default

    Tried that. Unfortunately, I didn't get the error when I ran the script. I'm not sure what is going on.

  7. #7
    Junior Member
    Join Date
    Oct 2008
    Posts
    7

    Default

    Strange, the error seems to be happening after the script ends. I guess...

    Finished ASH script: kmBetween.ash
    Your Jumpsuited Hound Dog can't wear a string of dingle balls
    Autorecovery failed.

  8. #8
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    944

    Default

    OK...making progress, but it's still a mystery.

    Start the debug log, do whatever you need to do to make the error happen. After the error occurs, stop the debug log. Post it here so someone can see what is actually going on.

  9. #9
    Developer
    Join Date
    Apr 2010
    Posts
    5,050

    Default

    Not something I’ve played with, but is familiar item locked on gear changer?

  10. #10
    Developer
    Join Date
    Aug 2009
    Posts
    2,861

    Default

    The OP is trying to do this via betweenBattleScript. Isn't there something that checkpoints your equipment before said script and tries to restore it when adventuring resumes?

Posting Permissions

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