Results 1 to 6 of 6

Thread: in_multi_fight

  1. #1
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    463

    Default in_multi_fight

    I'm running free turns with Eldritch Attunement active, so I can max out my free fights.

    PHP Code:
        {
            if (
    have_familiar($familiar[machine elf]))
                {
                
    cli_execute("familiar machine elf");
                }
            {
            while (
    to_int(get_property("_machineTunnelsAdv")) < )
            
    adv1($location[The Deep Machine Tunnels],-1,"");
            }
        } 
    I'm getting this: You are currently in a multi-stage fight after every single fight today.

    I've added this to my script:
    PHP Code:
            if(in_multi_fight())
                {
                
    run_combat();
                } 
    Into the script here, so it looks like this now:
    PHP Code:
            while (to_int(get_property("_machineTunnelsAdv")) < )
            
    adv1($location[The Deep Machine Tunnels],-1,"");
            if(
    in_multi_fight())
                {
                
    run_combat();
                }
             } 
    I have also changed IF to WHILE, and get the same results. I'm getting this error only from this location. I don't have the (in_multi_fight()) anywhere else in my script.

    Can anyone help me with this?
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

  2. #2
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    463

    Default

    PHP Code:
        {
            if (
    have_familiar($familiar[machine elf]))
                {
                
    cli_execute("familiar machine elf");
                }
            {
            while (
    to_int(get_property("_machineTunnelsAdv")) < )
            
    adv1($location[The Deep Machine Tunnels],-1,"");
            }
        } 
    Originally Posted by Pazleysox View Post
    I think my error stems from having this whole thing inside "{}" I removed it from another location on the script, and have no issues, and don't have anything else like that. I'll have to check tomorrow when I have more free fights.

    EDIT: That might not be the issue. I think there's a problem with having the machine elf as your familiar. I had the same issue elsewhere when the script (had a bug) used the machine elf as my familiar. When it was fixed, it ran fine. Still... More into tomorrow when I can research it.
    Last edited by Pazleysox; 12-26-2018 at 02:18 PM. Reason: machine elf
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

  3. #3
    Senior Member
    Join Date
    Jun 2016
    Posts
    322

    Default

    The problem is actually a lack of curly bracers, to wrap the check into the while loop. If you don't follow a while or if statement with curly bracers it will only cover the first command right after, so right now, it's trying to visit the location repeatedly, and only after that while loop finishes, it will go and check to see if it's still in a multifight.

    My free fight script, for some examples/inspiration: https://pastebin.com/kzvL8DT2

    The relevant part for you, with comments:
    Code:
    void MachineElf() {
        if(have_familiar($familiar[Machine Elf]) && $familiar[Machine Elf].fights_today < $familiar[Machine Elf].fights_limit)
        {
            HeavyRains($familiar[Machine Elf].fights_limit-$familiar[Machine Elf].fights_today+1);
            if (have_effect($effect[Inside The Snowglobe])!=0)
                cli_execute("uneffect Inside The Snowglobe"); // My autoattack is setup to automatically run away if I have that effect in the deep machine tunnels, since it happens when I'm in there with my stomping boots
            FreeDrops("item, exp, 0.25 mainstat, 10000 max");
            use_familiar($familiar[Machine Elf]);
            while($familiar[Machine Elf].fights_today < $familiar[Machine Elf].fights_limit) { // <- Note this bracket
                adv1($location[The Deep Machine Tunnels], -1, "");
                while ( in_multi_fight() )
                    run_combat();
            } // <- And his brother over here
        }
    }
    Last edited by the dictator; 12-26-2018 at 09:31 PM.

  4. #4
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    463

    Default

    While fighting at the Snojo, I get You are currently in a multi-stage fight. I've run into this for a few days while running Eldritch Attunement. Today it happened after 7 snowmen fights. Once it was after 10 fights. I re-ran the script, and it ran fine after.

    Code:
    	if(to_boolean(get_property("snojoAvailable")) && get_property("_snojoFreeFights").to_int() < 10) 
    	{
    	print("Now were off to fight some snowmen.", "green");
    		if(get_property("snojoSetting") == "NONE")
    		visit_url("place.php?whichplace=snojo&action=snojo_controller");
    		while(get_property("_snojoFreeFights").to_int() < 10)
    				{
    				adv1($location[The X-32-F Combat Training Snowman], -1, "");
    				while(in_multi_fight())
    				run_combat();
    				}
    	}
    This is Bale's code for fighting at the snojo, with me adding only the in_multi_fight() lines.

  5. #5
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    878

    Default

    While fighting at the Snojo, I get You are currently in a multi-stage fight.
    Originally Posted by Pazleysox View Post
    Do you have something in a before- or after- adventure script that is trying to do something when you are in the middle of a fight?

  6. #6
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    463

    Default

    Do you have something in a before- or after- adventure script that is trying to do something when you are in the middle of a fight?
    Originally Posted by ckb View Post
    Augh! I didn't even think of that. I do have a script that runs through my familiars that drop items after combat. I will switch it to a before adventure, and see if that fixes it.
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

Posting Permissions

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