StatRating: Better Equipment Swapper

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: StatRating: Better Equipment Swapper

#41 Post by rock5 » Thu Mar 13, 2014 10:31 am

I had another go at getting all the needed info from memory and I think I can do it. I can get the ghost stats and I found that I can get the base stats from named stats too. And, now that we can get quest reward ids using questlogclass, we can also rate quest rewards via memory. So I'm at the point now where I could use some help deciding how to rate items. What I need is a table that values each stat for each class. I don't think I have the patience for it. :mrgreen:

The main stats I need rated for each class are;
  • Physical Defense
    Magical Defense
    Physical Damage
    Magical Damage
    Strength
    Stamina
    Intelligence
    Wisdom
    Dexterity
    Maximum HP
    Maximum MP
    Physical Attack
    Magical Attack
I think they're the main ones. We could add more later if we wanted to.
  • 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: StatRating: Better Equipment Swapper

#42 Post by lisa » Thu Mar 13, 2014 6:59 pm

If it is mainly used while leveling,
then I would ignore
p def
m def
wis (only good for healing)

On weapon, damage (m or p) as priority, can ignore other stats.
Need to have list of weapons each class can use.


On armor, accessories.

I would do a calc of Stam to give a HP amount, so you compare HP and stam amounts against each other.
I would do a calc of int,dex,str to give 1 amount to compare, calc for each class.

(Stam//HP) --> Attack (p,m) --> (int//dex//str)

This table has the benefits for each attribute for each class, maybe use it?
http://runesofmagic.gamepedia.com/Attributes


So casters
(mage/priest/druid/warlock) = Int

Rest are melee = str,dex

1 stam = 5HP across all chars


For leveling purposes I would probably always go HP/stam over all other stats regardless of how much int or dex an item has.


Probably going to need an "ignore" list and maybe a check how many stats an item has, so if it has 3+ then it is user made and to keep it regardless.
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: StatRating: Better Equipment Swapper

#43 Post by rock5 » Thu Mar 13, 2014 10:03 pm

lisa wrote:If it is mainly used while leveling,
then I would ignore
p def
m def
wis (only good for healing)
Well it would only be useful for lower level characters before you start stating gear. I envision it being used in 1-10 leveling scripts and such. Mainly when selecting quest rewards but also for looking through your bags for better looted items.

I don't know if I would ignore those stats. They always have some value. If you have equipped an item that has no values and you get another that has extra p def you would want to switch. wis gives you extra MP so has some use for mana users other than healing.
lisa wrote:On weapon, damage (m or p) as priority, can ignore other stats.
Need to have list of weapons each class can use.
Again I don't think we can ignore stats altogether. Yes they would have less value but imagine you have a lower level weapon with some stats example
  • Fine Long Sword + 8
    DPS 22.3
    +77 Physical Attack
    +3 Stamina
If you got a weapong that does 23 DPS but no other stats, would you switch? Then the question becomes how much damage would be worth stats score? I think the only stats we can really ignore totally are the ones that are useless to a particular class, eg. Magical Attack for a melee class.
lisa wrote:On armor, accessories.

I would do a calc of Stam to give a HP amount, so you compare HP and stam amounts against each other.
I would do a calc of int,dex,str to give 1 amount to compare, calc for each class.

(Stam//HP) --> Attack (p,m) --> (int//dex//str)

This table has the benefits for each attribute for each class, maybe use it?
http://runesofmagic.gamepedia.com/Attributes
I thought about that but I thought it would be easier to just rate stam knowing how much hp and def it gives. But with that table I could still do it. I always thought that that table might not be up to date.
lisa wrote:So casters
(mage/priest/druid/warlock) = Int
int would certainly be the most important but you can't ignore other stats. Which item is better? An item with 100 Int (200MA,100MP) or an item with 50 Int(100MA,50MP), 300 MA and 100 MP?
lisa wrote:Probably going to need an "ignore" list and maybe a check how many stats an item has, so if it has 3+ then it is user made and to keep it regardless.
If items are correctly rated then if a user stated item is better than a looted item then it should have a higher score. If a looted item is better than the user stated item, shouldn't it be equipped? An option could be added but the user could do it beforehand too if they don't want to upgrade stated gear, eg. if 3 >= #weapon.Stats then lookForUpgrade() end

I'll start messing with that table and see what I can come up with.
  • 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: StatRating: Better Equipment Swapper

#44 Post by lisa » Thu Mar 13, 2014 11:35 pm

rock5 wrote:some stats exampleFine Long Sword + 8DPS 22.3+77 Physical Attack+3 Stamina
Good example as you get the upgraded weapon in the bag but you won't get a weapon with more damage until lvl 12+

For lvls 1-10 I think you are overthinking things.
rock5 wrote:nt would certainly be the most important but you can't ignore other stats. Which item is better? An item with 100 Int (200MA,100MP) or an item with 50 Int(100MA,50MP), 300 MA and 100 MP?
You won't get any looted or quest items even close to those stats lvl 1-10


If you were looking at bigger picture and using it lvl 1-50 then for sure more indepth checking would be required but lvl 1-10 I think HP/stam is all you pretty much need. With lvl 1-50 though I would look at different priorities for different ranges, so 1-10 HP, 10-20 HP aswell as int/dex, 20-40 more focus on int, less on dex, 40-50 HP then Int/Dex/Str.
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: StatRating: Better Equipment Swapper

#45 Post by rock5 » Fri Mar 14, 2014 12:35 am

lisa wrote:Good example as you get the upgraded weapon in the bag but you won't get a weapon with more damage until lvl 12+
Doesn't matter what level you get it, eventually you will get a weapon that does just a bit more damage than this and the question is, would you ignore the p att stat and switch?
lisa wrote:For lvls 1-10 I think you are overthinking things.
I wasn't only considering for 1-10, that was just an example. As long as you haven't started stating gear for your character, this could be used.
lisa wrote:With lvl 1-50 though I would look at different priorities for different ranges, so 1-10 HP, 10-20 HP aswell as int/dex, 20-40 more focus on int, less on dex, 40-50 HP then Int/Dex/Str.
Hm... that might be true but I think it's too much work. I think I would start by having set values for stats then later on we can consider changes like that if necessary.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: StatRating: Better Equipment Swapper

#46 Post by rock5 » Fri Mar 14, 2014 9:04 pm

I need to do some thinking out loud.

For starters I'm planning to have 2 data collection functions. 1 for reward items which will be based on BaseItemAddress data. This would accept an id as an argument, eg. GetRateDataById(id). And the other on actual items like you find in your bag or have equipped. I'm not sure what this will accept as an argument. It could accept the address or an item class object, eg. GetRateDataByItem(item) I started off by making sub tables, eg. tmp.Stats, tmp.GhostStats, tmp.Runes but I think it makes more sense to just record all the attributes together. So just total the attributes, eg. Int, Dex, Matt, Pdef, etc.

Then the actual rating function would take the data from one of these functions and, depending on the class, convert the Int, Dex, Str, Wis and Sta into their base effects and rate it to end up with a rating. I see it using the current class by default but I think it should accept the class as an argument if a user wants to specify it, for example if choosing a reward for your alt class. You might also want to specify a level argument if you don't want to choose a reward if it's beyond your level. Of course you might want to select it anyway for use later but there should be an option for it, eg. RateItem(data, class, level). Hm... maybe I can have it accept an id or an item table so it can just use the appropriate data function itself, then rate it.

Next, how will it be used? I see only 2 uses for this. 1 for choosing rewards and 2 for looking for better looted equipment in your bags.

We could hook into CompleteQuestByName so it can override existing uses of the function but I think it would be better if it is only used where you want to use it. You wouldn't want it to automatically select the wrong reward where you specifically chose a different reward for some reason. So I suggest something like this.

Code: Select all

choice = GetBestChoice(questid, class, level) -- where class and level are optional
CompleteQuestByName(questid,choice)
Hm... If the quest is a string it can look it up in the quest log to get the id but it will need to distinguished between 'normal', 'daily' and 'public'. On second thought you only need to choose a reward on normal quests.

Of course it's safe to select a reward, ie. it's no big deal if you select the wrong reward. The big deal is when you equip gear, you don't want that done automatically. So we could still hook into CompleteQuestByName if we wanted to, to have it work with existing files. But it could only use the default for class and level. If you wanted to select based on another class you would still have to edit the file.

Looking for looted items, I see 2 possibilities. A function that looks for upgrades for all your equipment and/or a function that looks for an upgrade for 1 equipped item. If we go for an all equipment function, it's been mentioned it would be good to have options to omit certain equipment. I'm not sure I like the idea of an ignore list because you might need a different list for different characters so a waypoint file couldn't be used as is for all characters. Of course you could add the ignore list to the characters profile. But I still prefer something like the "no more than 3 stats" option as it's universal with no options needed to be set except of whether to use the option or not.

I think that's it. Except for 1 last thing that occurred to me. Even though reward items don't have dura it is possible that they will. So we might have to add dura to reward items so you rate it as the best item you might get. Then if it turns out not to be high dura, so not good enough to equip, then you just don't equip it.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: StatRating: Better Equipment Swapper

#47 Post by rock5 » Sat Mar 15, 2014 11:49 am

Damn. I'm working on the item stats and I'm stuck on the plus values. I was quite pleased when I found the type of attribute added and the start value (+1 Value) but I can't find the pattern with which it increases with each level. Seems like every item has it's own pattern. Grrrr.

The plus value can be found like this.

Code: Select all

item = inventory:findItem("item name")
plusid = memoryReadInt(getProc(), item.BaseItemAddress+0x3B0)
plusbaseaddress = GetItemAddress(plusid)
Then the attribute type, eg. 1 for str, 3 for stam, etc., is offset by 0x9C

Code: Select all

attributetype = memoryReadInt(getProc(),plusbaseaddress + 0x9C)
The start value is offset by 0xC0

Code: Select all

startvalue = memoryReadInt(getProc(),plusbaseaddress + 0xC0)
I suspect the pattern is stored somewhere else and there is just some sort of pointer pointing to the pattern.
  • 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: StatRating: Better Equipment Swapper

#48 Post by lisa » Sat Mar 15, 2014 7:44 pm

Maybe check how Item Preview addon does the + values.
They are a set value per item/level.

--=== Added ===--

NVM IP just changes the itemlink and then the game itself does the calculation.
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: StatRating: Better Equipment Swapper

#49 Post by rock5 » Sat Mar 15, 2014 8:29 pm

Yeah, I checked IP. It was too hard to follow but I could see it worked with item links. You can't get links for reward items.

Hold on a sec, I don't need links for reward, only for items. I believe items do have links so I might be able to get the info from that. I'll look into it.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: StatRating: Better Equipment Swapper

#50 Post by rock5 » Thu Mar 20, 2014 8:45 am

I finally nailed the plus info in memory! Whoop!

As I said before I could find an id at the baseItemAddress area that gave some info on what is plussed and the +1 amounts. It just occurred to me that if that is the +1 info maybe the +2 info is stored at another id location. Then I thought, why not try just adding the plus value to the id and look that up. And sure enough I found the +2, +3 etc. info.

Now I'll just code that in and see if I'm missing anything.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: StatRating: Better Equipment Swapper

#51 Post by rock5 » Sat Mar 22, 2014 10:29 pm

Here's the work I've done so far. So far it just has 2 functions for getting the values that we need to rate. It doesn't rate yet. The 2 functions are getRaterDataById() mainly for rating quest reward, and getRaterDataByItem() for rating existing equipment in your bags or worn. They get all info from memory and take into account all bonuses except for crafted +quality bonuses. I couldn't figure those out. Feel free to try it out and see if the print outs are the same as what you get from StatRating, if you have it installed.

Example:

Code: Select all

Command> getRaterDataByItem(inventory:findItem(213369))
=========================================
Forsaken Staff, Id 213369, BaseItemAddress 25C22300
-----------------------------------------
Address 9F33B0
        Object types    Weapons Staves  Staves
        Required level  65
        Value   41418
        Speed   3.5
        Effects:
                +59.4   Defense
                +40.2   Physical Attack
                +241.2  Magical Defense
                +482.4  Maximum MP
                +1705.2 Magical Damage Points
                +1236   Damage
                +198    Maximum HP
                +508.8  Magical Attack
Command>
Attachments
userfunction_rater.lua
(7.06 KiB) Downloaded 151 times
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: StatRating: Better Equipment Swapper

#52 Post by ZZZZZ » Sun Mar 23, 2014 2:11 am

Code: Select all

Command> getRaterDataByItem(inventory:findItem(222865))
=========================================
Little Devil's Wings, Id 222865, BaseItemAddress 47502A00
-----------------------------------------
Address 9F4B74
        Object types    Armor   Back
        Required level  nil
        Value   nil
        Effects:
onLoad error: ...romacro/scripts/rom/userfunctions/userfunction_rater.lua:237: b
ad argument #1 to 'pairs' (table expected, got nil)
That's on stated/runed wings. I know that as a bot they wouldn't get those but say if you sent an alt some wings, would still want it to equip those if they are there.

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

Re: StatRating: Better Equipment Swapper

#53 Post by lisa » Sun Mar 23, 2014 2:48 am

my guess is inventory:findItem(222865) returned nil

did you have the wings in your bag or still wearing them ?

Except it did have the name and Id, so hmmmm, you may need to wait for rock.
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: StatRating: Better Equipment Swapper

#54 Post by lisa » Sun Mar 23, 2014 3:02 am

SAme issue on same item, yeah rock will have to have a look.

Code: Select all

Command> table.print(inventory:findItem(222865))
table: 037FB9D8
Id:     222865
ObjSubType:     7
InUse:  false
Stats:  table: 03873600
        1:      table: 03873678
                Name:   Oppression X
                Id:     511169
        2:      table: 038736C8
                Name:   Force X
                Id:     511149
        3:      table: 03873718
                Name:   Fang X
                Id:     510849
ItemShopItem:   true
Bound:  true
Available:      true
MaxDurability:  100
Color:  4289225896
Range:  0
ItemCount:      1
ItemLink:       |Hitem:36691|h|cffa864a8[Little Devil's Wings]|r|h
CoolDownTime:   0
LastMovedTime:  0
Worth:  0
BagId:  98
Address:        10438996
BaseItemAddress:        1132108288
Value:  0
LastTimeUsed:   0
BoundStatus:    32
Quality:        8
MaxStack:       1
SlotNumber:     118
Icon:
RequiredLvl:    1
Location:       inventory
Runes:  table: 03873628
Durability:     89.72
CanBeSold:      false
ObjSubSubType:  -1
Empty:  false
Name:   Little Devil's Wings
ObjType:        1

Command> getRaterDataByItem(inventory:findItem(222865))
=========================================
Little Devil's Wings, Id 222865, BaseItemAddress 437A9A00
-----------------------------------------
Address 9F4954
        Object types    Armor   Back
        Required level  nil
        Value   nil
        Effects:
onLoad error: ...o/scripts/romglobal/userfunctions/userfunction_rater.lua:237: bad argument #1 to 'pairs' (table expected, got nil)

May just be wings, other items seem fine.

Code: Select all

Command> getRaterDataByItem(inventory:findItem(231921))
=========================================
Water Fire Necklace, Id 231921, BaseItemAddress 3E124600
-----------------------------------------
Address 9F4228
        Object types    Armor   Accessories     Accessories
        Required level  80
        Value   22000
        Effects:
                +0      Defense
                +258    Magical Attack
                +296.7  Magical Defense
                +774    Maximum MP
Command> getRaterDataByItem(inventory:findItem(231922))
=========================================
Water Fire Ring, Id 231922, BaseItemAddress 3E124D00
-----------------------------------------
Address 9F459C
        Object types    Armor   Accessories     Accessories
        Required level  80
        Value   22000
        Effects:
                +232.2  Defense
                +645    Maximum MP
                +645    Maximum HP
                +296.7  Magical Defense
Command> getRaterDataByItem(inventory:findItem(231923))
=========================================
Water Fire Earrings, Id 231923, BaseItemAddress 3E125400
-----------------------------------------
Address 9F426C
        Object types    Armor   Accessories     Accessories
        Required level  80
        Value   22000
        Effects:
                +154.8  Physical Attack
                +296.7  Magical Defense
                +645    Maximum MP
                +0      Defense
                +25.8   Maximum HP
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: StatRating: Better Equipment Swapper

#55 Post by rock5 » Sun Mar 23, 2014 3:32 am

I figured you would rate items you would get as loot or quest rewards so I excluded back. It could be added but I don't really see the point. You wouldn't bot equiping items you get by mail or gifts. You would look them over yourself and decide if you want to equip.
  • 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: StatRating: Better Equipment Swapper

#56 Post by lisa » Sun Mar 23, 2014 3:41 am

Except if you are just going through inventory at points in waypoint just before vendoring or cleaning bags and just comparing at that point you would go through all items in bags to compare to what you are wearing.


Even using the objtype as 1 or 0 , (armor or weapon) it still errored on the wings as they are armor.

Code: Select all

Command> for slot = 61, 120 do item = inventory.BagSlot[slot] if item.ObjType ==
 0 or item.ObjType == 1 then getRaterDataByItem(item) end end

Adding in check for back seemed to go through fine though with that.

Code: Select all

Command> for slot = 61, 120 do item = inventory.BagSlot[slot] if item.ObjType == 0 or ( item.ObjType == 1 and item.ObjSubType ~= 7) then getRaterDataByItem(item) end end
After I added 1 more line anyway.

Code: Select all

if item.Id == 0 then print("no item") return end
Because item.ObjType defaults to 0, so if there is an issue with item then just checking the ObjType being 0 wouldn't be enough.
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: StatRating: Better Equipment Swapper

#57 Post by rock5 » Sun Mar 23, 2014 4:22 am

The functions assume the item is a valid one which is fine because these functions are not really supposed to be used by the end user. So just make sure you are trying to rate a valid item. Later when we make a function that searches your bags for possible better gear and equip it, it will do checks to make sure they are valid items.
  • 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: StatRating: Better Equipment Swapper

#58 Post by lisa » Sun Mar 23, 2014 6:37 am

well it seemed to run fine through bags once I added in some checks.

I did have 1 issue but I don't know if it is related to userfunction or not. It was constantly erroring at a certain point, so I added some checks for bagslot before the error occured and it was an empty slot, I already added a check for empty slots which was working.

I restarted MM several times and it was still there, I ended up moving an item into the empty slot and then it no longer errored, so I'm not sure exactly what was going on. Only thing I can come up with is the game itself was bugging on me.

So yeah anyway the prints work fine for armor and weapons (not wings) I don't have the addon so I couldn't compare the values against anything.
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: StatRating: Better Equipment Swapper

#59 Post by rock5 » Sun Apr 27, 2014 3:10 am

I've been thinking about this again the last few days. It's doing my head in. I think it's time to think out load again to see if I can organize my thoughts. I might be repeating some of my earlier musings.

So, I already have to the data collection functions for ids and items which can be used to rate quest rewards and items. There will likely be some functions along the way but the 2 functions I see the user using are "find the best reward" which compares the rewards with equipped gear, and "find a replacement for equipment in your inventory" which compares your inventory items with your equiped gear.

Problems I see with the "find reward" function:
  • - If comparing with your current class we can develop a rating method that involves the currently equipped gear. If trying to choose for a different class such as your secondary class there is no way to be sure what gear to compare the rewards with. The only way I can see it working, at least for classes other than your primary, is to compare the rewards with your equipped and inventory items. Hm... might also be useful for your primary class if you are already holding on to an item whose level is too high, so it gets included in the compare. So the "find reward" function will have to find the rewards that will make the most improvement to your gear unlike the "search inventory" function which will just be searching for the item with the highest rating score.
    - How to integrate it with createpaths. An idea I had was to change createpaths so when it comes to choosing a reward, if you type 0, then it pops up the MM console and asks for what you want to enter as the reward choice. At this point you can enter a variable name or the "find reward" function itself. Createpaths then enters that as the reward choice. This means it wont be able to select the reward automatically for you like it does now because userfunctions are not loaded in createpath. I don't see this as a problem. If you enter a number it can select it for you but if you enter 0, to enter something else, it doesn't select if for you, you do it manually.
    - How to protect items for later use. The only time I can see the need to protect items is in autosell. So I'm thinking of adding an AUTOSELL_IGNORE_SLOT_LIST option. The function that looks for and equips better gear from your inventory can add slot numbers to the list if it can't be equipped yet and autosell will ignore those slots. Of course users could also add that option to their profile to add some initial slots to the list. The slot numbers would have to be removed under certain conditions such as if the item is moved or used or equipped.
Problems I see with the "find in inventory" function:
  • - As mentioned before if a higher level is specified and a higher level item is found then it needs to be added to the autosell ignore list. It should probably only add the highest scoring items of each type to the ignore list. Hm... what if you specify a level 2 levels above your characters level and you have a better item 1 level above and another 2 levels above your character? Should it keep both so that it can use both? I think so. So it should keep the highest scoring item of each type for each level above the characters level (assuming the higher level item is better than the lower level item).
I'm also also getting confused by the main rating function. Rating armor is pretty straight forward. You just use the item with the highest score that you can equip. Weapons and off-hand are a bit tricky.
  • -Some classes can use more than 1 type of weapon.
    -Some weapons provide a boost to damage over others so weapon types need to be rated too, for each class.
    -Some classes can choose between 1-hand or 2-hand specialties that use different skills so we might need an option to allow users to choose which they prefer.
    -When rating 1-hand vs 2-hand do we compare the 2-hand with 1-hand plus off-hand or just rate the best weapon then if it''s 1-hand we find the best off-hand?
As you can see, a lot to consider.
  • 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

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: StatRating: Better Equipment Swapper

#60 Post by noobbotter » Tue Feb 02, 2016 12:47 pm

I'm curious where we are with this equipment swapper. I was thinking about using it with the quest series we're working on but I haven't tried it, so I don't know if it works at all or not. Would it be suitable for running at least on a bot from 1 - 50?

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests