Set auto attack: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
Created page with '{{ #vardefine:name|set_auto_attack}}{{ #vardefine:return_type|void}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| return_type={{#var:return_typ…'
 
imported>Bale
r17491 adds version with a string parameter
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
return_also={{#var:return_also}}|
return_also={{#var:return_also}}|
parameter1={{Param|int|setting}}|
parameter1={{Param|int|setting}}|
p1desc={{Pspan|setting}} is the KoL attack code|
p1desc={{Pspan|setting}} is the KoL attack code:  0 for disabled, 1 for attack with weapon, a [http://kol.coldfront.net/thekolwiki/index.php/Skills_by_number skillID] number, or a macroID number preceeded by 99.|
}}|
}}|


function_description=Sets your auto-attack. Possible values for {{pspan|setting}} are 0 for disabled, 1 for attack with weapon, a [http://kol.coldfront.net/thekolwiki/index.php/Skills_by_number skillID] number, or a macroID number preceeded by 99.|
function2={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
parameter1={{Param|string|setting}}|
p1desc={{Pspan|setting}} is the attack expressed as a string: "attack", "steal", "pickpocket", "pick pockey" or the name of a skill.|
}}|
 
function_description=Sets your auto-attack to the {{Pspan|setting}}. |


needscode=yes|
needscode=yes|
see_also={{SeeAlso|adventure|get_auto_attack}}|
see_also={{SeeAlso|get_auto_attack}}|
cli_equiv=The CLI command "autoattack" functions similarly.|
cli_equiv=The CLI command "autoattack" functions similarly.|
}}
}}
 
{{RFI|Does the CLI command allow macro setting?}}
[[Category:Adventuring]]
[[Category:Adventuring]]
{{RFI|Does the CLI command allow macro setting?}}

Latest revision as of 20:44, 8 December 2016

needs(code_samples);

Function Syntax

void set_auto_attack(int setting )

  • setting is the KoL attack code: 0 for disabled, 1 for attack with weapon, a skillID number, or a macroID number preceeded by 99.

void set_auto_attack(string setting )

  • setting is the attack expressed as a string: "attack", "steal", "pickpocket", "pick pockey" or the name of a skill.

Sets your auto-attack to the setting.

CLI Equivalent

The CLI command "autoattack" functions similarly.

See Also

get_auto_attack()


Attention KoLmafia Experts!

We need your help; some details of this function's operation are unknown or unclear.

The following specific question has been raised:

  • Does the CLI command allow macro setting?