adding to INV_AUTOSELL_IGNORE in onLoad, keep failing
Posted: Tue Sep 28, 2010 6:15 pm
Ok, so to make using waypoint files smoother for my characters I wanted to add the ignore info to the waypoint file's onLoad but I can't seem to get it right. Here's what I've got so far:
If anyone know how I can concatenate or add the info please let me know. This would make using my waypoint files sooo much easier.
Edit: Oh yea, my reason for doing this. If I can add this info then I don't have to keep updating the profiles with all the different things to ignore. I can reinitialize profile info and have this info added by reloading the new waypoint files. Would make everything so much smoother if I could dicatate this info in the waypoint file.
Code: Select all
local currentIgnoreList = settings.profile.options.INV_AUTOSELL_IGNORE
if not currentIgnoreList then
settings.profile.options.INV_AUTOSELL_IGNORE = "Sweet Home Alabama"
end
if settings.profile.options.HEALING_POTION then
settings.profile.options.INV_AUTOSELL_IGNORE = currentIgnoreList .. ",Spirit Herb,Infinite Herb"
currentIgnoreList = settings.profile.options.INV_AUTOSELL_IGNORE
end
if settings.profile.options.MANA_POTION then
settings.profile.options.INV_AUTOSELL_IGNORE = currentIgnoreList .. ",Elemental Spirit Stone,Infinite Elemental Stone"
currentIgnoreList = settings.profile.options.INV_AUTOSELL_IGNORE
end
if settings.profile.options.ARROW_QUIVER then
settings.profile.options.INV_AUTOSELL_IGNORE = currentIgnoreList .. ",Gunpowder Arrow, Kerl's Mechanical Arrow"
currentIgnoreList = settings.profile.options.INV_AUTOSELL_IGNORE
end
if settings.profile.options.THROWN_BAG then
settings.profile.options.INV_AUTOSELL_IGNORE = currentIgnoreList .. ",Assasin's Blade,Iron Rose"
currentIgnoreList = settings.profile.options.INV_AUTOSELL_IGNORE
end
if settings.profile.options.POISON then
if player.Class1 == "ROGUE" then
settings.profile.options.INV_AUTOSELL_IGNORE = currentIgnoreList .. ",Poison Bottle"
elseif player.Class1 == "DRUID then
settings.profile.options.INV_AUTOSELL_IGNORE = currentIgnoreList .. ",Poison Powder"
end
currentIgnoreList = settings.profile.options.INV_AUTOSELL_IGNORE
endEdit: Oh yea, my reason for doing this. If I can add this info then I don't have to keep updating the profiles with all the different things to ignore. I can reinitialize profile info and have this info added by reloading the new waypoint files. Would make everything so much smoother if I could dicatate this info in the waypoint file.