AutoRoller
/action logic
Action can be none, need, greed, or disenchant
Logic can be any lua statement that evaluates to true or false
Add --
at the beginning of the line to disable:
--/need purple
Constants
poor | 0 |
common | 1 |
uncommon | 2 |
rare | 3 |
epic | 4 |
legendary | 5 |
artifact | 6 |
heirloom | 7 |
silver | 100 |
gold | 10000 |
Variables
raid | boolean | true if you are in a raid |
party | boolean | false if you are in a raid |
combat | boolean | true if you are in combat |
quality | number | 0 to 7, use constants above |
itype | string | Armor, Weapon, etc |
subtype | string | see http://www.wowwiki.com/ItemType |
ilvl | number | item level |
reqlvl | number | required level to equip |
name | string | name of item, case sensitive |
id | number | itemID |
boe | boolean | true if item is bind on equip |
bop | boolean | true if item is bind on pickup |
zone | string | current zone from GetZoneText() |
subzone | string | current sub zone from GetSubZoneText() |
value | number | vender cost of an item in copper |
green | boolean | true if uncommon |
blue | boolean | true if rare |
purple | boolean | true if epic |
need | boolean | true if you can roll need |
greed | boolean | true if you can roll greed |
disenchant | boolean | true if you can roll disenchant |
betterilvl | boolean | true if the item's ilvl is higher than equipped |
GearScore or GearScoreLite required
gearscore | number | gearscore of the item |
bettergs | boolean | true if item's gearscore is higher than equipped |
The following is the filter set I use on one of my alts.
/none (subtype == "Pet") or (subtype == 'Mount') /need (name == "Battered Hilt") /disenchant green /greed (name == 'Frozen Orb') or not (need or disenchant) /disenchant party and blue and (value < (7 * gold)) and not betterilvl /greed party and blue and not betterilvl
/none (subtype == 'Mount)
/need (id == '45912')
/disenchant party green or blue or purple
/greed (id == '43102') or not (need or disenchant)
if I have mor than two row's I can't click on the save-button, and with two lines I get the following error:
(first two lines):
[string "return (subtype == 'Mount)"]:1: unfinished string near '<eof>'
(last two lines):
[string "return party green or blue or purple"]:1: '<eof>' expected near 'green'
etc.
The following will work for battered hilt: /none (itype == "Quest")
The one I use is /need (name == "Battered Hilt")
Love this addon. But I ran in to a little "hitch". When running Pit of Saron a quest item dropped "Battered Hilt" and the addon rolled greed and ofc, I lost because all the others rolled need.
This was with standard settings. I was wondering if adding the lines /none purple or/and /none (subtype == "Quest")
Would help?
It would make it more convenient, but might not be possible. just throwing out an idea
Thanks for all your hard work! This addon is awesome!
I do have one major complaint though: the ability to only roll on bop items you can actually use seems like it should be included. I guess WoW still asks if you really want to roll though so...
Thanks again for the fantastic work you've done!
(bop and (quality >= 3) and (100 <= ilvl <= 226))
but the rule doesn't appear to be working. However, I have not grouped with an enchanter since i set up this rule, so im not sure if it isnt falling through properly or what...help please
Date: 2010-03-27 18:48:44
ID: -7
Error occured in: Global
Count: 1
Message: ..\AddOns\AutoRoller\AutoRoller.lua line 85:
attempt to index local 'rule' (a nil value)
Debug:
(tail call): ?
(tail call): ?
AutoRoller\AutoRoller.lua:85:
AutoRoller\AutoRoller.lua:66
(tail call): ?
[C]: ?
[string "safecall Dispatcher[1]"]:9:
[string "safecall Dispatcher[1]"]:5
(tail call): ?
...Ons\Accomplishment\Lib\AceAddon-3.0\AceAddon-3.0.lua:531: EnableAddon()
...Ons\Accomplishment\Lib\AceAddon-3.0\AceAddon-3.0.lua:621:
...Ons\Accomplishment\Lib\AceAddon-3.0\AceAddon-3.0.lua:607
[C]: LoadAddOn()
..\FrameXML\UIParent.lua:235: UIParentLoadAddOn()
..\FrameXML\UIParent.lua:258: CombatLog_LoadUI()
..\FrameXML\UIParent.lua:482:
..\FrameXML\UIParent.lua:454
Open the AutoRoller.lua
and replace the line 81
for i=1,#rules do
with
for i,rule in ipairs(rules) do
and delete the line 82
local rule = rules[i]
or comment it out by prefixing it with two minus (--)
--local rule = rules[i]
and while you are at it, delete (or comment out) the line 74
local profile = db.profile
because its used twice and there is no reason to.
I hope it works
If it doesn't work, just revert to version 1.2. Because the 1.9.1 has nothing new it just handle things differently internaly.
whil = with
[...] compared with the item (...) you are wearing, based [...]
Added the canNeed tag, not really difficult to implement because you use that for you fallback later yourself. If you are someone who wears cloth this could really save you some time whil a rule like "not canNeed" -> greed /EN
Two other tags I added are hasLowerGS and hasLowerilvl. That requires GearScore installed of course but that way the item you are rolling on is compared with the item (or items if weapon, ring or trinket) based on ilvl and GearScore. So if you are really overequipped you should never be asked to roll on daylies ;-)
The code for ilvl and GS comparsion is about 100 lines of code so i wont post it into comment. If you like it just say something and we think of a way to deliver it.