Unable to set Auto-Attack using cli_execute or visit_url

muffins

Member
I've had this problem for a while, I just can't figure out if it's something I'm not doing right, something that can be done in another way, or something that's broken, heh.

I've got a very basic "survival" script that I usually call manually. All it does is, if my HP is below a certain (scaling) number, it will adventure in place A to cast Salve to heal up, but if it is above the number, it will adventure in place B, the place I actually want to adventure in.

I figured that, in some areas, I might want to have auto-attack set (though not in place A, as I can usually 1-hit the monsters there), so I set it to change the auto-attack to one of my spells if I am about to adventure in place B, and disable it before adventuring in place A.

This is indeed just a snippet, but it's the only relevant part.

Code:
int HEAL = skill_to_int($skill[Saucy Salve]);
int STREAM = skill_to_int($skill[Stream of Sauce]);
int STORM = skill_to_int($skill[Saucestorm]);
int WAVE = skill_to_int($skill[Wave of Sauce]);
int GEYSER = skill_to_int($skill[Saucegeyser]);

visit_url("account.php?action=autoattack&whichattack=0");
visit_url("account.php?action=autoattack&whichattack=" + STORM);

I've also tried using cli_execute, and it still didn't change anything.

If anyone can try something like this and let me know if they get the same result, or if you have a fix/workaround for the time being, it'd be much appreciated!
 

Ethelred

Member
This is the method I use, which I think I lifted from one of cjswimmer's scripts:

Code:
void SetAttack(string AttackType)
{
	if ( get_property( "battleAction" ) != AttackType )
	{ 
		set_property( "battleAction", AttackType );
	}
}

Then to use it:

Code:
	SetAttack("attack");
	SetAttack("skill lunging thrust-smack");	
        SetAttack("skill Moxious Maneuver");

This seems to work for me. Hope you find it helpful.
 

Nightmist

Member
[quote author=Ethelred link=topic=674.msg3145#msg3145 date=1167521434]
This is the method I use, which I think I lifted from one of cjswimmer's scripts:
[/quote]
Be warned that this isn't a auto-attack if jump but a "keep using this attack in the whole battle".
 

muffins

Member
Yeah, to clarify, I don't need to change the "default" combat option, I need only to change the "auto-attack" as in "if I get the jump" option. I already have the during-combat-actions set either through a consult script or the regular CCS.
 
pasting
Code:
account.php?action=autoattack&whichattack=0
into the gcli results in the property:
Code:
defaultAutoAttack=0
being set in "prefs_username.txt" in your settings folder, and that is all that happens. The command never gets sent to kol's servers.
 

muffins

Member
Hmm... yeah... I've been too scared to test this again, since I'm still in the early levels of a new ascension, and not having the correct (get-the-jump)autoattack set might get me killed, heh. Can anyone test this to see if anything has been changed?
 
Top