Lootoption addon w/filter
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Lootoption addon w/filter
Ok so i made a loot addon. It is in alpha/beta stages b/c I am trying to incorporate the Lootomatic table into this addon so... also thinking of adding a logfile of what was thrown out.
Load in onload section or in profile startLootstuff()
disable it when switching WP or WP files with stopLootstuff()
can add filter through editing the .lua or using Lootstuffadd() or Lootstuffremove()
i.e. Lootstuffadd("link rune") would not toss out link runes
Lootstuffremove("link rune") would esp. toss out link runes even if over 5 stacked or looted
By default will not toss out stacked or looted items over 5.
This addon is not limited by receiving items by completion of events.
i.e if u recieve a "Wild Lilly" from a player it will also toss it out immediatly unless u have a stack of more than 5
This addon is meant to completely loot the bodies and immediatly toss out what was just looted.
For the most part it works, filter is untested but 5 items stacked has been tested as it won't toss out.
Update: I added a Lootomatic check and a option to loot by gold value above 1000 gold NOW IN BETA
if it doesn't work maybe i can call the saved varriables file through the in game functions frame.
BETA has code but hasn't been tested and needs the addon file
alpha/beta works but doesn't have Lootomatic check and option to loot by gold value
It seems to work but hasn't been tested b/c i have a ping of 6000ms
Note: this needs the D303fix or something to produce os.time
Load in onload section or in profile startLootstuff()
disable it when switching WP or WP files with stopLootstuff()
can add filter through editing the .lua or using Lootstuffadd() or Lootstuffremove()
i.e. Lootstuffadd("link rune") would not toss out link runes
Lootstuffremove("link rune") would esp. toss out link runes even if over 5 stacked or looted
By default will not toss out stacked or looted items over 5.
This addon is not limited by receiving items by completion of events.
i.e if u recieve a "Wild Lilly" from a player it will also toss it out immediatly unless u have a stack of more than 5
This addon is meant to completely loot the bodies and immediatly toss out what was just looted.
For the most part it works, filter is untested but 5 items stacked has been tested as it won't toss out.
Update: I added a Lootomatic check and a option to loot by gold value above 1000 gold NOW IN BETA
if it doesn't work maybe i can call the saved varriables file through the in game functions frame.
BETA has code but hasn't been tested and needs the addon file
alpha/beta works but doesn't have Lootomatic check and option to loot by gold value
It seems to work but hasn't been tested b/c i have a ping of 6000ms
Note: this needs the D303fix or something to produce os.time
- Attachments
-
- userfunction_Lootoption.lua
- alpha/beta
- (3.21 KiB) Downloaded 226 times
Last edited by Romplayer on Thu Feb 23, 2012 2:00 pm, edited 10 times in total.
Re: Lootoption addon w/filter
Also i found that item preview has a table that allows u to read the item's worth so maybe i might try to incorporate tossing out items less than 1k gold.
Re: Lootoption addon w/filter
item preview has a table that i don't know how to read from
ItemPreview_ListData = {
[227628] = {
["zones"] = {
[21] = 18,
},
["tip"] = {
["left"] = {
[6] = "Worth: 7,222 Gold",
[2] = "Tier 4",
[3] = "Requires Level 68",
[1] = "Plate Armor of the Ruins",
[4] = "Plate",
[5] = "Physical Defense 1005",
},
["right"] = {
[4] = "Upper Body",
[5] = "Magical Defense 704",
},
},
["mobs"] = {
["Thieving Ronin"] = 2,
["Thieving Handyman"] = 2,
["Trailing Chupura"] = 9,
["Thieving Spy"] = 5,
},
["date"] = "02/17/12",
["text"] = "Plate Armor of the Ruins",
["lvl"] = 68,
["id"] = 227628,
["color"] = "00ff00",
},
}
would i = ItemPreview_ListData[id]["tip"]["left"][6] give me i = "Worth: 7,222 Gold"
edit: yes it does.. This just might work
therefore Lootomatic_Settings["ItemFilter"]["name"] would yeild if the name is in item filter and Lootomatic_Settings["ItemFilter"]["loot"] would yeild action taken. 2 don't loot and 3 would loot
i sure hope i can access these variables from rombot
ItemPreview_ListData = {
[227628] = {
["zones"] = {
[21] = 18,
},
["tip"] = {
["left"] = {
[6] = "Worth: 7,222 Gold",
[2] = "Tier 4",
[3] = "Requires Level 68",
[1] = "Plate Armor of the Ruins",
[4] = "Plate",
[5] = "Physical Defense 1005",
},
["right"] = {
[4] = "Upper Body",
[5] = "Magical Defense 704",
},
},
["mobs"] = {
["Thieving Ronin"] = 2,
["Thieving Handyman"] = 2,
["Trailing Chupura"] = 9,
["Thieving Spy"] = 5,
},
["date"] = "02/17/12",
["text"] = "Plate Armor of the Ruins",
["lvl"] = 68,
["id"] = 227628,
["color"] = "00ff00",
},
}
would i = ItemPreview_ListData[id]["tip"]["left"][6] give me i = "Worth: 7,222 Gold"
edit: yes it does.. This just might work
therefore Lootomatic_Settings["ItemFilter"]["name"] would yeild if the name is in item filter and Lootomatic_Settings["ItemFilter"]["loot"] would yeild action taken. 2 don't loot and 3 would loot
i sure hope i can access these variables from rombot
Last edited by Romplayer on Wed Feb 22, 2012 2:31 pm, edited 1 time in total.
Re: Lootoption addon w/filter
i came up with this general function to use with the ItemPreview ADDon not sure if it really works but i use ItemPreview-v1.17 not sure if the global variable is accessable by rombot
Code: Select all
function getValue(id)
local valuestring = ItemPreview_ListData[id]["tip"]["left"][6]
if valuestring ~= nil then -- checks if there is something there
local v1, v2 = string.find(valuestring, "Gold")
local v3, v4 = string.find(valuestring, "Worth:")
if v1 then
local value = string.sub(valuestring, v4+2, v1-2)
end
if v1 == nil then -- finds value if weapon or shield
valuestring = ItemPreview_ListData[id]["tip"]["left"][7]
if valuestring then
v1, v2 = string.find(valuestring, "Gold")
v3, v4 = string.find(valuestring, "Worth:")
value = string.sub(valuestring, v4+2, v1-2)
end
end
local v5, v6 = string.find(value, ",")
if v5 then -- removes the comma in thousands value as no item is over 9999
local value1 = string.sub(value, v5+1, v5+3)
local value2 = string.sub(value, v5-1, v5-1)
value = value2,value1
end
else
value = "false"
end
return value
endRe: Lootoption addon w/filter
Code: Select all
id = 207582
local value = RoMScript("getValue("..id..")")
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Lootoption addon w/filter
whats wrong? did it not work? it should work... im incorporating it into a rom addon so i can use it for the userfunctionlisa wrote:Code: Select all
id = 207582 local value = RoMScript("getValue("..id..")")
Re: Lootoption addon w/filter
i'll test out the Beta with the addon as soon as i finish downloading Rift... only 17 hrs to go 
Re: Lootoption addon w/filter
I posted code that would access the function using rombot.not sure if the global variable is accessable by rombot
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Lootoption addon w/filter
I donno if this will work.... I tested it once today and looted 3 items but it threw out a completely different item and only that one item. This will need lots of work... I'll try to tweak it this weekend
Ok it seems to work fine now... BETA that is
Note: I disabled the loot drop by value function b/c i was having problems of it freezing the whole Micromacro window.
one thing i notice is that it will drop the item multiple times on occasion... but other than that it works for multiple loots too
UPDATE: it works now!!! testing the loot drop by value < 1000
Ok it seems to work fine now... BETA that is
Note: I disabled the loot drop by value function b/c i was having problems of it freezing the whole Micromacro window.
one thing i notice is that it will drop the item multiple times on occasion... but other than that it works for multiple loots too
UPDATE: it works now!!! testing the loot drop by value < 1000
- Attachments
-
- getvariables.rar
- UPDATED ADDON TO WORK
goes in interface\addons - (705 Bytes) Downloaded 181 times
-
- userfunction_Lootoption.lua
- BETA
- (5.63 KiB) Downloaded 173 times
Re: Lootoption addon w/filter
Im not sure if the loot drop by value works... I think i need to find another way to get the tooltip info.........
From the looks of it ItemPreview uses a SOL addon to get frames info text and stuff sooooo idk looks like i have to spend hours trying to find the code..
But the rest works! ESP with Lootomatic ... Soon i might remove the stack of 5 limitation.
hmm seems it doesn't work... I think RoMScript only can return numbers so i guess i'll have to edit my addon code.
seems i can send a variable thru RoMScript....
i donno anymore... filtercheckd = RoMScript('getfilter(name);') keeps giving me a nil
I think im gonna give up. at most this will filter items u specify aww well
i donno i might have fixed it needed a ; somewhere
From the looks of it ItemPreview uses a SOL addon to get frames info text and stuff sooooo idk looks like i have to spend hours trying to find the code..
But the rest works! ESP with Lootomatic ... Soon i might remove the stack of 5 limitation.
hmm seems it doesn't work... I think RoMScript only can return numbers so i guess i'll have to edit my addon code.
seems i can send a variable thru RoMScript....
i donno anymore... filtercheckd = RoMScript('getfilter(name);') keeps giving me a nil
I think im gonna give up. at most this will filter items u specify aww well
i donno i might have fixed it needed a ; somewhere
Last edited by Romplayer on Thu Feb 23, 2012 8:46 pm, edited 4 times in total.
-
BillDoorNZ
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
Re: Lootoption addon w/filter
hmm....I just use Lootfilter++, modded it a bit to make it easier to add/remove from picklist and droplist and added in a 'clear' option to reset it. Then I just send a sendMacro("/lf add "..itemname..")");
but then, that doesn't solve the problem of throwing out the trash - for that I use the CleanBag userfunction that botje wrote:
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2849
but then, that doesn't solve the problem of throwing out the trash - for that I use the CleanBag userfunction that botje wrote:
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2849
Re: Lootoption addon w/filter
how can i set by category...??? i wanted to throw all that item... because i only using backpack I,II
i mean all runes I,II,III
and also all production runes
arrows..
other ammunition
recipes
armors and weapon
i mean all runes I,II,III
and also all production runes
arrows..
other ammunition
recipes
armors and weapon
Re: Lootoption addon w/filter
by default it throws out everything looted... as long as it isn't stacked 5 or more... or u can write specific names in the .lua file to throw out in the mustDelete variable use " " and a comma so "Link Rune",
the names in mustDelete will ignore the stack of 5.
I can't get the rom addon to work right now with the userfunction i think it has to do with non caps. So it should work without the Rom addon...
the names in mustDelete will ignore the stack of 5.
I can't get the rom addon to work right now with the userfunction i think it has to do with non caps. So it should work without the Rom addon...
Re: Lootoption addon w/filter
OK! this beta works with lootomatic and itempreview
need the new rom addon and userfunction
Note: i think i had to use caps on the function in the Rom addon and had to tripple check my RoMScript syntax
Note: Fully Functional with some erroneous code
Safe to use in profile <onload> section just insert startLootstuff() I do..
need the new rom addon and userfunction
Note: i think i had to use caps on the function in the Rom addon and had to tripple check my RoMScript syntax
Note: Fully Functional with some erroneous code
Safe to use in profile <onload> section just insert startLootstuff() I do..
- Attachments
-
- userfunction_Lootoption.lua
- BETA newest and working. Works without addon also if u don't have Itempreview or Lootomatic
- (5.86 KiB) Downloaded 175 times
-
- getvariables.rar
- RoM addon need for Lootomatic and Itempreview checks goes in RoM folder interface\addons
- (716 Bytes) Downloaded 169 times
Re: Lootoption addon w/filter
If I understand correctly, you have the event monitor running every 2 seconds. Even though I wrote the event monitor code, I never liked using it because it uses RoMScript to check the in game event log. RoMScripts are very slow so I wouldn't be surprised if it interferes a bit with the smooth running of the bot; maybe causing it to pass waypoints, not stop running when it's supposed to, etc. Maybe it needs to be every 2 seconds but I'm just a bit worried about this. Seeing as you get loot from killing stuff, maybe you could just run it after combat?
You should probably put the addon in folder in the compressed file. Not everyone will know to make a folder to put it in.
You should probably put the addon in folder in the compressed file. Not everyone will know to make a folder to put it in.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Lootoption addon w/filter
Ok this version is almost perfect..
Changes: I removed the Itempreview need and made my own tooltip check (requires SOL which is included in the addon .rar) So it is now able to check value all the time. It still does the Lootomatic check if u have it and not drop stacks of 5 or greater.
I'll name this version V .8 b/c it is working as intended and almost ready for V 1.0 which will be the final version.
Note: I had problems with Romscript synatax so i moved around the functions for value checking (a lot) finally, i figured out the syntax and got it working but not to what i originally had it at. Thus, V .8 and not V .9
V .9 would be when i set the functions back to original state and V 1.0 will be when i remove all the unneeded lines from major Debuging.
So without adue I give u fully functional V .8
*Update* I noticed that the Lootomatic function when called by RoMscript always gave me a false negative so im working on it will post V .8 when done
Well at least i got the values finally working... fix one and notice the other don't work right...*sheesh*
Changes: I removed the Itempreview need and made my own tooltip check (requires SOL which is included in the addon .rar) So it is now able to check value all the time. It still does the Lootomatic check if u have it and not drop stacks of 5 or greater.
I'll name this version V .8 b/c it is working as intended and almost ready for V 1.0 which will be the final version.
Note: I had problems with Romscript synatax so i moved around the functions for value checking (a lot) finally, i figured out the syntax and got it working but not to what i originally had it at. Thus, V .8 and not V .9
V .9 would be when i set the functions back to original state and V 1.0 will be when i remove all the unneeded lines from major Debuging.
So without adue I give u fully functional V .8
*Update* I noticed that the Lootomatic function when called by RoMscript always gave me a false negative so im working on it will post V .8 when done
Well at least i got the values finally working... fix one and notice the other don't work right...*sheesh*
Re: Lootoption addon w/filter
i dont effing get it.. the addon works in game but my RoMscripts call is crap for syntax... RoMScript("ValueTxt('"..name.."');"); finally got it to work but RoMScript('GettFilter("..name..");'); doesn't seem to work nor will RoMScript("GettFilter('"..name.."');"); <-- this one won't even function at all it freezes the MM window and the other one just spits out the same thing but if i check it in game it gives me a correct value
wth i hate this crap it'll take me at least another day to figure this crap out
wth i hate this crap it'll take me at least another day to figure this crap out
Re: Lootoption addon w/filter
ok im gonna give up i touched the one and it stopped working.. im not sure but its def.. a RoMscript problem
i give up i tried all possible combinations using " and ' in different places in RoMScript( ... ) some would work but spit out a incorrect number meaning it isn't using the function properly. Sometimes it will invalidate the next use of RoMScript and making my last day of work fault which makes me nervous. I don't think i'll release the version until this gets ironed out.
It makes me mad... reminds me when i failed my C programming class in highschool.
i give up i tried all possible combinations using " and ' in different places in RoMScript( ... ) some would work but spit out a incorrect number meaning it isn't using the function properly. Sometimes it will invalidate the next use of RoMScript and making my last day of work fault which makes me nervous. I don't think i'll release the version until this gets ironed out.
It makes me mad... reminds me when i failed my C programming class in highschool.
Re: Lootoption addon w/filter
Ok so first question, is it GettFilter or GetFilter ? lolRomplayer wrote: RoMScript('GettFilter("..name..");'); doesn't seem to work nor will RoMScript("GettFilter('"..name.."');");
What is the in game function you want to call, exactly?
GettFilter("Link Rune")
?
If so do this
Code: Select all
RoMScript("GettFilter(\""..name.."\");");Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Lootoption addon w/filter
OMG.. Lisa u are some kinda genius.. how did u know slashes.... I didn't even think of slashes.... Now that i think about it this was one part of my C class i always failed at.. that and not studying... but studying doesn't help when u don't understand it so it is like looking at junk and memorizing doesn't help..
U are AMAZING!!! BTW it works now.
and yes it is Gettfilter cuz i didn't want to accidentally call any Get* from the rom api
I still don't understand why the other function works like it does but doesn't work with the Gettfilter one b/c im still just sending the same string or whatever who cares now it works!
Uploading the Full version V .8
Note: V .8 prints out debug info a 1 or 0 if in Lootomatic + the value of the item looted And it should all work as intended. Thanks so much Lisa
U are AMAZING!!! BTW it works now.
and yes it is Gettfilter cuz i didn't want to accidentally call any Get* from the rom api
I still don't understand why the other function works like it does but doesn't work with the Gettfilter one b/c im still just sending the same string or whatever who cares now it works!
Uploading the Full version V .8
Note: V .8 prints out debug info a 1 or 0 if in Lootomatic + the value of the item looted And it should all work as intended. Thanks so much Lisa
- Attachments
-
- userfunction_Lootoption.lua
- V .8 userfunction goes in scripts\userfunctions
- (7.22 KiB) Downloaded 147 times
-
- getvariables.rar
- V .8 rom addon goes in interface\addons folder
- (26.71 KiB) Downloaded 171 times