PDA

View Full Version : Unable to set Auto-Attack using cli_execute or visit_url



muffins
12-30-2006, 04:54 PM
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.


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
12-30-2006, 10:30 PM
This is the method I use, which I think I lifted from one of cjswimmer's scripts:





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




Then to use it:



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


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

Nightmist
12-31-2006, 12:48 AM
This is the method I use, which I think I lifted from one of cjswimmer's scripts:

Be warned that this isn't a auto-attack if jump but a "keep using this attack in the whole battle".

muffins
12-31-2006, 09:23 AM
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.

efilnikufecin
12-31-2006, 03:27 PM
pasting

account.php?action=autoattack&whichattack=0
into the gcli results in the property:

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
01-06-2007, 08:06 PM
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?

holatuwol
01-08-2007, 11:46 AM
Nothing has changed.