49
edits
(removedapi, restore old docs.) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{ | {{wowapi|removed=3.0|replace=Behavior now controlled by the {{api|autoLootDefault|t=c}} CVar. Use {{api|GetCVar}}}} | ||
Returns the state of Auto Loot. | Returns the state of Auto Loot. | ||
== Returns == | local state = GetAutoLootDefault() | ||
== Parameters == | |||
=== Returns === | |||
* state (onenil) - 1 if auto loot is enabled, nil if disabled. | |||
== Example == | == Example == | ||
This toggles Auto Loot on and off when used in a macro spot. | |||
/script if (GetAutoLootDefault()) then SetAutoLootDefault(false); message("Auto Loot is off."); else SetAutoLootDefault(true); print("Auto Loot is on."); end; | |||
or (easier to change if the need arises) | or (easier to change if the need arises) | ||
/script local onOff = {["1"] = "on",["nil"] = "off"}; SetAutoLootDefault(not GetAutoLootDefault()); print("Auto Loot is "..onOff[tostring(GetAutoLootDefault())].."."); | |||
;Result | |||
Pops up a window informing the user of the state of Auto Loot. Very useful for toggling Auto Loot on the fly. | |||
== Notes == | |||
* Removed in patch 3.0. Use {{api|autoLootDefault|t=c}} | |||