comparing stats of items

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

comparing stats of items

#1 Post by lisa » Wed Jan 19, 2011 12:33 am

Anyone have anything that compares stats of items?
In the end I want to compare stats and then equip item with better/higher stats.
If the bot can check stats for autosell then it should be able to also do this.

I had a good browse through equipitem.lua, inventory.lua and item.lua. From what I can gather the stats autosell is checking come straight from the memory when looking at the item?
I got a little lost after that lol

Anything like this out there already or anyone have any ideas on how to impliment it?
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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#2 Post by jduartedj » Wed Jan 19, 2011 7:10 am

I know what your doing and it aint easy, it'a a lot of compares because it'a a lot of diff stats and classes! But I guess that if item already reads stats comparing ain't much harder.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#3 Post by lisa » Wed Jan 19, 2011 7:44 am

Yeah if I can get the stat from items then I easy make up a function to give each item a "statscore" with values entered into a database, so each class has diff value for int and so on.
After the calculation is done you get 1 number which would sum up overall benefit of the item to that class, can even add in a comparison for 2nd class, just in case.
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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#4 Post by jduartedj » Wed Jan 19, 2011 7:45 am

seems groovie! ;)
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#5 Post by jduartedj » Wed Jan 19, 2011 8:24 am

Here I hope this helps, don't use too big of a range otherwise it spamms MM.

Code: Select all

checkitems(min,max)
prints the tooltips from min to max slot nrs. (bag I 60-90, etc...)

all you must do now is filter and extract only the stats.

EDIT: OH OH, try this instead!!!
Attachments
addon_checkitems.lua
filters STATS!!!
(592 Bytes) Downloaded 140 times
addon_checkitems.lua
(471 Bytes) Downloaded 112 times
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#6 Post by jduartedj » Wed Jan 19, 2011 8:40 am

I think you should compare Levels (and colors/rarity), then Dura, then Stats. until lvl 45 then Stats might be more meaningful than Levels so Dura,Stats, Level(and colors/rarity).
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#7 Post by lisa » Wed Jan 19, 2011 9:48 am

well it has deff given me a starting point, to give you an idea.

Code: Select all

Durability 110/111
Power Modifier |cff00ff00+20percent|r
 
Cape
Magical Defense 44.9
 
Stamina I
Mist I
Spirit I
Energy X
Stamina X
Intellect X
thats from first one you posted

Code: Select all

Stamina I
8
Mist I
9
Spirit I
10
Energy X
11
Stamina X
12
Intellect X
13
thats from second, exact same item.

The i value seems to be just the line number, I added it into your first 1 and was playing around trying to get the stats from left side of item too. Like magic damage and such. I kinda suck and failed at it though.
This could take me a while lol

EDIT: second one only posted stats with I and X in them, I get that bit atleast now lol
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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#8 Post by jduartedj » Wed Jan 19, 2011 6:23 pm

It was suppose to print anything with "I" "V" or "X" in the name. easiest way I found....
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#9 Post by lisa » Wed Jan 19, 2011 6:49 pm

I must have been tired last night.

Code: Select all

function CItem:getGameTooltip(_place)
-- _place = Left | Right
I'll test it out using both left and right, I am guessing left will give me the stats on left side, slaps forehead.
I should be able to do what I want to now, might take me a bit of working out though lol
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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#10 Post by jduartedj » Thu Jan 20, 2011 8:54 am

:O

ofc I saw that but never thought of that xD
it was commented out never knew why.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#11 Post by lisa » Thu Jan 20, 2011 10:48 am

Seems to me the commented out bit was to explain some of the usage of the function. A bit further down it has

Code: Select all

= RoMScript("igf_GetTooltip('Right',"..self.BagId..")");
I changed the Right to Left and get values from left side.
I did change 'Right' to _place which gave the value between the () but it was also around the same time I updated MM and rombot and thats when things got messy. Had a few issues to deal with to get it going again.
Haven't had a chance to test it further been busy all day.
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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#12 Post by jduartedj » Thu Jan 20, 2011 10:59 am

ok nice!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#13 Post by lisa » Thu Jan 20, 2011 12:00 pm

I've been noticing a slight flaw in the plan so far, it doesn't seem to be refreshing after each usage. Some stats are still there from last item 'scanned'.

I added an item update into the userfunction, seems to be doing the job.

Code: Select all

		for i,v in ipairs(t) do
		item:update();
Tried inventory update but it didn't seem to have any affect on the results.


EDIT: spoke to soon, still getting residue stats from previous item.
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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#14 Post by jduartedj » Thu Jan 20, 2011 3:55 pm

try wiping table t:

Code: Select all

t = {}
... who knows...
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#15 Post by lisa » Thu Jan 20, 2011 8:35 pm

I spent some time testing out where the stats were coming from today. The extra stats being output are from the last item to be moused over, so actually coming from the last tooltip. I can't see any way to determine what is and isn't on the actual item I am 'scanning'.
So it doesn't appear to be anything to do with the rombot functions themselves, I'm starting to think this is a pipe dream. It might be possible to do this idea as a game addon itself but I doubt I can get it reliable as a userfunction for 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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: comparing stats of items

#16 Post by jduartedj » Thu Jan 20, 2011 9:26 pm

I guess I could run some tests, but it still think it is possible.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: comparing stats of items

#17 Post by rock5 » Thu Jan 20, 2011 11:08 pm

lisa wrote:I spent some time testing out where the stats were coming from today. The extra stats being output are from the last item to be moused over, so actually coming from the last tooltip.
This means you can't use the game and have to igf_GetTooltip return correct values but if the game is left alone while botting it should work ok.

Of course the big issue with igf_GetTooltip is that it is severely affected by the 255 character limit sometimes only returning 8 or 9 lines.

There needs to be better in game functions or a way to return more data from the game.
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#18 Post by lisa » Fri Jan 21, 2011 1:02 am

to give you an idea, I moused over my wings and then did the UF to get tooltip for some shoulders.

Code: Select all

Durability 110/111
Durability 74/75
 
Shoulders
Magical Defense 34
Back
Energy IV
Mist I
Strike II
Energy X
Stamina X
Intellect X
So it posted "back" and the extra durability from the Wings.

I've also noticed if I last moused over a skill it posts the cooldown for the skill.

Code: Select all

Cooldown: 5 Minute(s)
I really think making this work is beyond my capabilities.
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: comparing stats of items

#19 Post by rock5 » Fri Jan 21, 2011 1:34 am

I don't think there's a problem with the function like that. I suspect more likely there is a bug in your implementation. Any chance of seeing the code you use?
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: comparing stats of items

#20 Post by lisa » Fri Jan 21, 2011 2:36 am

Just found this in igf

Code: Select all

	GameTooltip:ClearLines();			-- seems not to work, still sometimes old values there ???

I used mainly what jd added near top of topic but changed things here and there when testing. Last post I used this.

In profile onload I have

Code: Select all

		checkitems(61,61)

player:sleep();
userfunction file has

Code: Select all

---stat checker
if( settings == nil ) then
	include("settings.lua");
end


function checkitems(minr,maxr)

--	local t = {}
	if not minr then minr = 60 end
	if not maxr then maxr = 90 end
	
	for slot=minr,maxr do
		local item = inventory.BagSlot[slot] --get item
		local t = item:getGameTooltip(); -- get tooltip
		cprintf(cli.blue,item.Name.."\n")


		for i,v in ipairs(t) do

			if (v ~= " " or v ~= "" or v ~= "  ") then

			printf(string.gsub(v,"%%","percent").."\n");  -- print all tooltips


	filename = getExecutionPath() .. "/stats.xml";

	file, err = io.open(filename, "a+");
	if( not file ) then
		error(err, 0);
	end

file:write(v .. "\n");

file:close();
			
			end
		end

	end

	
end

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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests