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
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: StatRating: Better Equipment Swapper

#21 Post by MiesterMan » Wed Dec 28, 2011 3:49 pm

Ok, well, an updated list:

Code: Select all

SQType[0] = "NoEffect"
SQType[1] = "Durability"
SQType[2] = "Strength"
SQType[3] = "Stamina"
SQType[4] = "Intelligence"
SQType[5] = "Wisdom"
SQType[6] = "Dexterity"
SQType[7] = "AllAttributes"
SQType[8] = "MaximumHP"
SQType[9] = "MaximumMP"
SQType[10] = "HPRecovery"
SQType[11] = "MPRecoveryRate"
SQType[12] = "PhysicalAttack"
SQType[13] = "Defense"
SQType[14] = "MagicalDefense"
SQType[15] = "MagicalAttack"
SQType[16] = "Accuracy"
SQType[17] = "DodgeRate"
SQType[18] = "PhysicalCriticalHitRate"
SQType[19] = "PercentCriticalDamage"
SQType[20] = "MagicalCriticalHitRate"
SQType[21] = "PercentMagicalCriticalDamage"
SQType[22] = "ParryRate"
SQType[23] = "PercentAttackSpeed"
SQType[24] = "PercentMovementSpeed"
SQType[25] = "Damage"
SQType[26] = "AllResistances"
SQType[27] = "EarthResistance"
SQType[28] = "WaterResistance"
SQType[29] = "FireResistance"
SQType[30] = "WindResistance"
SQType[31] = "LightResistance"
SQType[32] = "DarkResistance"
SQType[33] = "PercentReducedMPConsumption"
SQType[34] = "PercentExperienceValueRate"
SQType[35] = "PercentDropRate"
SQType[36] = "PercentOff-HandAccuracy"
SQType[37] = "PercentOff-HandDamageRate"
SQType[38] = "PercentArmorDefenseStrengtheningRate"
SQType[39] = "PercentChainDefenseStrengtheningRate"
SQType[40] = "PercentLeatherDefenseStrengtheningRate"
SQType[41] = "PercentClothesDefenseStrengtheningRate"
SQType[42] = "PercentRobeDefenseStrengtheningRate"
SQType[43] = "PercentShieldDefenseStrengtheningRate"
SQType[44] = "PercentMagicPower"
SQType[45] = "PercentEarthMagicPower"
SQType[46] = "PercentWaterMagicPower"
SQType[47] = "PercentFireMagicPower"
SQType[48] = "PercentWindMagicPower"
SQType[49] = "PercentLightMagicPower"
SQType[50] = "PercentDarkMagicPower"
SQType[51] = "PercentSpellcastingDelay"
SQType[52] = "PercentRangedWeaponDamageRate"
SQType[53] = "PercentBowDamageRate"
SQType[54] = "PercentCrossbowDamageRate"
SQType[55] = "PercentGunDamageRate"
SQType[56] = "PercentMeleeWeaponDamageRate"
SQType[57] = "PercentUnarmedDamageRate"
SQType[58] = "PercentSwordDamageRate"
SQType[59] = "PercentDaggerDamageRate"
SQType[60] = "PercentWandDamageRate"
SQType[61] = "PercentAxeDamageRate"
SQType[62] = "Percent1-HHammerDamageRate"
SQType[63] = "Percent2-HSwordDamageRate"
SQType[64] = "PercentStaffDamageRate"
SQType[65] = "Percent2-HAxeDamageRate"
SQType[66] = "Percent2-HHammerDamageRate"
SQType[67] = "PercentGunDamageRate"
SQType[68] = "PercentRemoteAttackDelay"
SQType[69] = "PercentBowAttackDelay"
SQType[70] = "PercentCrossbowAttackDelay"
SQType[71] = "PercentGunAttackDelay"
SQType[72] = "PercentMeleeAttackDelay"
SQType[73] = "PercentUnarmedAttackDelay"
SQType[74] = "PercentSwordAttackDelay"
SQType[75] = "PercentDaggerAttackDelay"
SQType[76] = "PercentWandAttackDelay"
SQType[77] = "PercentAxeAttackDelay"
SQType[78] = "Percent1-HHammerAttackDelay"
SQType[79] = "Percent2-HSwordAttackDelay"
SQType[80] = "PercentStaffAttackDelay"
SQType[81] = "Percent2-HAxeAttackDelay"
SQType[82] = "Percent2-HHammerAttackDelay"
SQType[83] = "PercentGunAttackDelay"
SQType[84] = "EquipmentAbilityUnarmed"
SQType[85] = "EquipmentAbilitySword"
SQType[86] = "EquipmentAbilityDagger"
SQType[87] = "EquipmentAbilityWand"
SQType[88] = "EquipmentAbilityAxe"
SQType[89] = "EquipmentAbility1-HHammer"
SQType[90] = "EquipmentAbility2-HSword"
SQType[91] = "EquipmentAbilityStaff"
SQType[92] = "EquipmentAbility2-HAxe"
SQType[93] = "EquipmentAbility2-HHammer"
SQType[94] = "EquipmentAbilityGun"
SQType[95] = "EquipmentAbilityBow"
SQType[96] = "EquipmentAbilityCrossbow"
SQType[97] = "EquipmentAbilityGun"
SQType[98] = "EquipmentAbilityProjectiles"
SQType[99] = "EquipmentAbilityPlate"
SQType[100] = "EquipmentAbilityChain"
SQType[101] = "EquipmentAbilityLeather"
SQType[102] = "EquipmentAbilityClothes"
SQType[103] = "EquipmentAbilityRobe"
SQType[104] = "EquipmentAbilityShield"
SQType[105] = "EquipmentAbilityTalisman"
SQType[106] = "EquipmentAbility2-HWeapon"
SQType[107] = "UnarmedSkillUp"
SQType[108] = "SwordSkillUp"
SQType[109] = "DaggerSkillUp"
SQType[110] = "WandSkillUp"
SQType[111] = "AxeSkillUp"
SQType[112] = "1-HHammerSkillUp"
SQType[113] = "2-HSwordSkillUp"
SQType[114] = "StaffSkillUp"
SQType[115] = "2-HAxeSkillUp"
SQType[116] = "2-HHammerSkillUp"
SQType[117] = "GunSkillUp"
SQType[118] = "BowSkillUp"
SQType[119] = "CrossbowSkillUp"
SQType[120] = "YourGunSkillHasLeveledUp."
SQType[121] = "DefenseSkillUp"
SQType[122] = "BlacksmithingSkillUp"
SQType[123] = "CarpentrySkillUp"
SQType[124] = "ArmorcraftingSkillUp"
SQType[125] = "TailoringSkillUp"
SQType[126] = "CookingSkillUp"
SQType[127] = "AlchemySkillUp"
SQType[128] = "PercentBlacksmithingQualityProbabilityIncrease"
SQType[129] = "PercentCarpentryQualityProbabilityIncrease"
SQType[130] = "PercentArmorCraftingQualityProbabilityIncrease"
SQType[131] = "PercentTailoringQualityProbabilityIncrease"
SQType[132] = "PercentCookingQualityProbabilityIncrease"
SQType[133] = "PercentAlchemyQualityProbabilityIncrease"
SQType[134] = "PercentPhysicalAttackIncrease"
SQType[135] = "PercentDefenseIncrease"
SQType[136] = "PercentStealSuccess"
SQType[137] = "PercentGoldDropRate"
SQType[138] = "PercentAggroIncrease"
SQType[139] = "PercentRageRecoveryRate"
SQType[140] = "PercentFocusRegeneration"
SQType[141] = "PercentEnergyRecovery"
SQType[142] = "PercentMagicAbsorbRate"
SQType[143] = "PercentDefenseAbsorbRate"
SQType[144] = "PercentHealAbsorbRate"
SQType[145] = "MagicAbsorbPoints"
SQType[146] = "DefenseAbsorbPoints"
SQType[147] = "HealingAbsorptionPoints"
SQType[148] = "MagicalDamageBonusPoints"
SQType[149] = "PercentHealingPowerIncreaseRate"
SQType[150] = "HealingPowerIncreasePoints"
SQType[151] = "RangedWeaponAttackDistanceIncrease"
SQType[152] = "WoodcuttingSkillUp"
SQType[153] = "HerbalismSkillUp"
SQType[154] = "MiningSkillUp"
SQType[155] = "FishingSkillUp"
SQType[156] = "WoodcuttingRareItemProbabilityIncrease"
SQType[157] = "HerbGatheringRareItemProbabilityIncrease"
SQType[158] = "MiningRareItemProbabilityIncrease"
SQType[159] = "FishingRareItemProbabilityIncrease"
SQType[160] = "GatheringSuccessRate"
SQType[161] = "PercentStrengthIncrease"
SQType[162] = "PercentStaminaIncrease"
SQType[163] = "PercentIntelligenceIncrease"
SQType[164] = "PercentWisdomIncrease"
SQType[165] = "PercentDexterityIncrease"
SQType[166] = "PercentAllBasicAttributesIncrease"
SQType[167] = "PercentMaxHPIncrease"
SQType[168] = "PercentMaxMPIncrease"
SQType[169] = "PercentRideSpeedIncreaseRate"
SQType[170] = "PercentMagicalDefenseIncreasePercentage"
SQType[171] = "PercentMagicalAttackIncrease"
SQType[172] = "ShieldBlock"
SQType[173] = "PercentDamageIncrease"
SQType[174] = "SecondaryClassExperienceValue"
SQType[175] = "PercentTPExperience"
SQType[176] = "PercentWoodcuttingSuccessRate"
SQType[177] = "PercentHerbGatheringSuccessRate"
SQType[178] = "PercentMiningSuccessRate"
SQType[179] = "PercentFishingSuccessRate"
SQType[180] = "SYS_WEAREQTYPE_180"
SQType[181] = "PercentCarryOutAdditionalAttack"
SQType[182] = "PhysicalCriticalResistance"
SQType[183] = "MagicalCriticalResistance"
SQType[184] = "EarthDamage"
SQType[185] = "WaterDamage"
SQType[186] = "FireDamage"
SQType[187] = "WindDamage"
SQType[188] = "LightDamage"
SQType[189] = "DarkDamage"
SQType[190] = "JumpAbility"
SQType[191] = "MagicalDamagePoints"
SQType[192] = "PercentMagicalDamageRate"
SQType[193] = "ShieldPiercing"
SQType[194] = "ParryPiercing"
SQType[195] = "MagicalAccuracy"
SQType[196] = "MagicResistance"
SQType[197] = "PercentPhysicalAccuracy"
SQType[198] = "DodgeRate"
SQType[199] = "PercentMagicalAccuracy"
SQType[200] = "MagicResistanceRate"
SQType[201] = "PercentGatheringProductionAmount"
SQType[202] = "PercentGatheringSpeed"
SQType[203] = "PercentGatheringXP"
SQType[204] = "(Attack)Damagewhenattackingplayer(orplayerpet)"
SQType[205] = "(Attack)DamagewhenattackingNPCs"
SQType[206] = "PercentDamagefrombeingattackedbyaplayer"
SQType[207] = "PercentDamagefrombeingattackedbyamonster"
SQType[208] = "(Attack)Attackpowerofareaeffectspells"
SQType[209] = "(Guard)DamageofACspellwhenattacked"
SQType[210] = "PercentProductionSpeed"
SQType[211] = "PercentProductionXP"
SQType[212] = "PercentQuestXP/TP"
SQType[213] = "PercentQuestTP"
Used this in commandline:

Code: Select all

for i=0,213,1 do print("SQType[".. i .. "] = \"" .. string.gsub(string.gsub(RoMScript("TEXT('SYS_WEAREQTYPE_" .. i .. "')"), "%s", ""), "%%", "Percent") .. "\"");end;

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: StatRating: Better Equipment Swapper

#22 Post by MiesterMan » Mon Jan 02, 2012 2:25 pm

I did a little more work on this and found that you already had a lot of the useful info already programmed in though some of it was a bit off.

Here's my last bit of research:

Code: Select all

 -- Base Item Info
 -- from 0xB8 to 0xDC are base item stats (int)
 -- from 0xE0 to 0x104 are their respective values (int)
 -- 0x40 is the quality not the tier (color)
 -- type info is at 0x78, 0x7C, and 0x80 (Byte) (ObjType, etc)
 
 -- Bag Item Stat Info
 -- level requirement is 0x58
 -- plus value is 0x17 (Byte)
 -- tier +- is 0x16 - 10 (Byte)
 
 -- Bound Status:
 -- Inconsistency across various types of items.
 -- Perhaps there is another meaning to the index
 -- these two bytes refer to.
You've got accurate offsets for types and subtypes which match the indexes for AC_ITEMTYPE though I'm not sure if they should be int or byte. The info you're using to compare for tiering is a bit odd, maybe it works but it's unnecessary math (as far as I can tell). The base item number used indicates the quality and the bag item offset is the 0xA +- tier change.

Something that still need to be figured out, where the ghost values start, how much they increment with each plussing, and said info.

Also, I've come to a conclusion about the workings of this userfunc. Instead of reading the info every time, the equipment will be stored as a local global (I guess we could call it static) table of ratings to be compared against. It will only be updated when gear is changed and only in the place needed. (though this has nothing to do with memory reading, lol)

Edit: Also, I've been unable to find or the modifier for it in the weapon info.

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

Re: StatRating: Better Equipment Swapper

#23 Post by rock5 » Mon Jan 02, 2012 11:42 pm

Most of these values are already part of the item class. Looks like not all the offsets match those you have liated. I don't know where you got that from.
MiesterMan wrote:You've got accurate offsets for types and subtypes which match the indexes for AC_ITEMTYPE though I'm not sure if they should be int or byte.
The bot reads them as 'Int' and has no problem with that. Sometimes, even when values are small, the game uses integers.
MiesterMan wrote:The info you're using to compare for tiering is a bit odd, maybe it works but it's unnecessary math (as far as I can tell). The base item number used indicates the quality and the bag item offset is the 0xA +- tier change.
The bit of code I think your talking about is

Code: Select all

		self.Quality = memoryReadInt( getProc(), self.BaseItemAddress + addresses.qualityBaseOffset );
		local plusQuality = memoryReadByte( getProc(), self.Address + addresses.qualityTierOffset );
		local quality, tier = math.modf ( plusQuality / 16 );
		-- tier = tier * 16; -- Tier not really used yet...
		if ( quality > 0 ) then
			self.Quality = self.Quality + ( quality / 2 );
		end;
This is what I understand from it. The first line gets the base item level of quality. Most of the time this = the quality because the quality doesn't change. But crafted items can have different quality levels. The later added quality is probably where the added quality is stored. I'm sure it's correct or it wouldn't have been done that way.

I just checked the tiering and it does work. A base t3 item I had that was tier 7 had a value of 14 and another t2 item that was tier 4 had a value of 12. So t3 +(14-10) = t7, t2 +(12-10) = t4. I'd say they add 10 so you can negatively tier an item.
MiesterMan wrote:Something that still need to be figured out, where the ghost values start, how much they increment with each plussing, and said info.
It should be with the baseitemaddress info but I have no idea how to find them unless we know how they are represented. It's not like it's a value we can change to see it change in memory.
MiesterMan wrote:Also, I've come to a conclusion about the workings of this userfunc. Instead of reading the info every time, the equipment will be stored as a local global (I guess we could call it static) table of ratings to be compared against.
I'm not sure what you mean. When you are going to compare items, you'll need to get the values.

By the way I had a look. Looks like the plus value is offset 0x17 but it's a bit confusing. I plussed a couple of items and it went from 00 to 01 but another item had a value of 0x20 and it hadn't been plussed. When I plussed it it went to 0x21. I don't know what the 20 means. It might mean the theoretical limit of plusing is 31 (0x1F).

If you have an item with high plus value you can see what value you get from memory by placing it in the first bag slot then executing the following line at the commandline. It would be interesting to see what value a +16 item gives.

Code: Select all

print(memoryReadByte( getProc(),inventory.BagSlot[61].Address+ addresses.qualityTierOffset ))
  • 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

#24 Post by lisa » Mon Jan 02, 2012 11:48 pm

I'll see if I have some time later to do some playing around.
rock5 wrote:It should be with the baseitemaddress info but I have no idea how to find them unless we know how they are represented. It's not like it's a value we can change to see it change in memory.
Ghost stats go up when an item is over dura.

So if you have an OD weapon, melee class, you can slap a few mobs and it will drop to normal stats and so ghost stats will change.

So from +20% to normal.

I suguested melee weapon because that item loses durability the fastest when fighting mobs.


Something to also keep in mind when you + an item you add a ghost stat. It varies depending on item and level.

So all earrings add hp, 1 of the accessories add hp anyway can't remember which off hand. So regardless of if white or purple it will add HP, the amount of HP will vary depending on level. This may explain why you have 0x10 and 0x20 for different items, it might represent the type of stat or maybe the amount of increase because of lvl.
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

#25 Post by lisa » Tue Jan 03, 2012 1:59 am

For tier of an item I would have a look at the bit values for offset 0x26 =)
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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: StatRating: Better Equipment Swapper

#26 Post by kanta » Tue Jan 03, 2012 2:47 am

rock5 wrote:If you have an item with high plus value you can see what value you get from memory by placing it in the first bag slot then executing the following line at the commandline. It would be interesting to see what value a +16 item gives.

Code: Select all

print(memoryReadByte( getProc(),inventory.BagSlot[61].Address+ addresses.qualityTierOffset ))
I don't have a +16 but I do have a +13 ring. Here's what I got from that command:

Code: Select all

Command> print(memoryReadByte( getProc(),inventory.BagSlot[61].Address+ addresse
s.qualityTierOffset ))
13
Command>
Scout/Knight/Rogue 70/66/66

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

Re: StatRating: Better Equipment Swapper

#27 Post by lisa » Tue Jan 03, 2012 3:07 am

kanta wrote:I don't have a +16 but I do have a +13 ring. Here's what I got from that command:
The + of an item isn't it's tier.

Your result was 13 which means your item is 3 tiers above its base tier, so basically if the base tier of the item is 3 then your item is tier 6.
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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: StatRating: Better Equipment Swapper

#28 Post by kanta » Tue Jan 03, 2012 3:40 am

Ah, sorry. Misunderstood what was being said I guess. I guess I thought of the item's plus as a tier 16 seems impossible to me. Highest I've ever seen is a tier 11. As each T10 stone takes 1093 transmuter charges.... 3 T16 stones would need 2,391,483 charges (yes, I just calculated it) and if you bought the charges on sale at 100 charges for 99 diamonds, that's 2,367,585 diamonds needed :shock:
Scout/Knight/Rogue 70/66/66

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: StatRating: Better Equipment Swapper

#29 Post by MiesterMan » Tue Jan 03, 2012 4:08 am

rock5 wrote:Most of these values are already part of the item class. Looks like not all the offsets match those you have liated. I don't know where you got that from.
MiesterMan wrote:The info you're using to compare for tiering is a bit odd, maybe it works but it's unnecessary math (as far as I can tell). The base item number used indicates the quality and the bag item offset is the 0xA +- tier change.
The bit of code I think your talking about is

Code: Select all

		self.Quality = memoryReadInt( getProc(), self.BaseItemAddress + addresses.qualityBaseOffset );
		local plusQuality = memoryReadByte( getProc(), self.Address + addresses.qualityTierOffset );
		local quality, tier = math.modf ( plusQuality / 16 );
		-- tier = tier * 16; -- Tier not really used yet...
		if ( quality > 0 ) then
			self.Quality = self.Quality + ( quality / 2 );
		end;
This is what I understand from it. The first line gets the base item level of quality. Most of the time this = the quality because the quality doesn't change. But crafted items can have different quality levels. The later added quality is probably where the added quality is stored. I'm sure it's correct or it wouldn't have been done that way.

I just checked the tiering and it does work. A base t3 item I had that was tier 7 had a value of 14 and another t2 item that was tier 4 had a value of 12. So t3 +(14-10) = t7, t2 +(12-10) = t4. I'd say they add 10 so you can negatively tier an item.
I actually considered the posibility of crafted items but I guess I hadn't looked far enough into it. It looked like, from what I saw, different quality items have different base item ID's. So two items crafted from the same recipe with different quality levels have different item ID's. I'll go back and look again but I checked like 3 different items before I decided it was correct.
rock5 wrote:
MiesterMan wrote:Something that still need to be figured out, where the ghost values start, how much they increment with each plussing, and said info.
It should be with the baseitemaddress info but I have no idea how to find them unless we know how they are represented. It's not like it's a value we can change to see it change in memory.
The values that are unique to the items are there but I didn't see any integral values or indicators of how much is changed per plus. I tried using IP to figure it out but it looks like plussing doesn't change the value of the unique stats, only tiering does (on weapons). What I did notice, aside from the ghost stat increases, plussing increases the damage and armor values of items. I could not for the life of me figure out how it is factored (an equation that explains how the increases are calculated).
I thought of it while I was sleeping (so correct me if I'm wrong), item ghost stats are all the same. If you plus a ring it will give you hp in a set amount dependant on the plus value. So this would be in a table seperate from particular item stats but just be programmed as a table of constants.
rock5 wrote:
MiesterMan wrote:Also, I've come to a conclusion about the workings of this userfunc. Instead of reading the info every time, the equipment will be stored as a local global (I guess we could call it static) table of ratings to be compared against.
I'm not sure what you mean. When you are going to compare items, you'll need to get the values.
Part of the reason srswap is so slow is the number of reads it has to do per compare. If something hasn't changed then why calculated a value for it again? I was thinking a simple system to reduce the number of needed updates.
rock5 wrote:By the way I had a look. Looks like the plus value is offset 0x17 but it's a bit confusing. I plussed a couple of items and it went from 00 to 01 but another item had a value of 0x20 and it hadn't been plussed. When I plussed it it went to 0x21. I don't know what the 20 means. It might mean the theoretical limit of plusing is 31 (0x1F).
What item were you looking at? Was it crafted? I didn't look at the values of any crafted items though I'm thinking it's going to be important depending on the many uses of the information. Maybe we can teach our bots to decide whether to craft armor for themselves or not. :D
rock5 wrote:If you have an item with high plus value you can see what value you get from memory by placing it in the first bag slot then executing the following line at the commandline. It would be interesting to see what value a +16 item gives.

Code: Select all

print(memoryReadByte( getProc(),inventory.BagSlot[61].Address+ addresses.qualityTierOffset ))
Sadly I have nothing over +6 but I think lisa's right, that offset is 0x16 where the plus offset is supposed to be 0x17. I'm gonna guess kanta made that ring a T6 when he statted it but his confirmation would help. (though the method described is how I did most of my testing, swapping different items in bag slot one and looking at different values.)
lisa wrote:For tier of an item I would have a look at the bit values for offset 0x26 =)
I'll take a look at this (you meant the base item or the bag item? I'll check both of course).

Edit: LOL@ Server Maintenence

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: StatRating: Better Equipment Swapper

#30 Post by kanta » Tue Jan 03, 2012 5:36 am

Yes, when I got the ring it was tier 3, the statting increased the tier to 6.

http://www.runesdatabase.com/item/225081/dilan%27y-ring
Scout/Knight/Rogue 70/66/66

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

Re: StatRating: Better Equipment Swapper

#31 Post by rock5 » Tue Jan 03, 2012 6:49 am

lisa wrote:Ghost stats go up when an item is over dura.

So if you have an OD weapon, melee class, you can slap a few mobs and it will drop to normal stats and so ghost stats will change.

So from +20% to normal.
Yes but the ghost stats you gain will always be the same for similar items. So the ghost stats you gain will be stored in the baseitemaddress area. I have no idea how to find what stats you would gain. The amount or level is a calculated value based on other variables such as the plus level dura etc. so I double it will be stored anywhere.
lisa wrote:For tier of an item I would have a look at the bit values for offset 0x26 =)
What, we already have tier of items. We don't save it but it's there in item.lua

Code: Select all

      local quality, tier = math.modf ( plusQuality / 16 );
      -- tier = tier * 16; -- Tier not really used yet...
This is missing the -10 and + base tier level but there it is.
kanta wrote:I don't have a +16 but I do have a +13 ring. Here's what I got from that command:
lisa wrote:Your result was 13 which means your item is 3 tiers above its base tier, so basically if the base tier of the item is 3 then your item is tier 6.
Oh yeh, sorry wrong command. I guess i meant

Code: Select all

 print(memoryReadByte( getProc(),inventory.BagSlot[61].Address+ 0x17 ))
I don't expect issues up to 15. I'm just not sure whay happens at 16 and above.
MiesterMan wrote:I thought of it while I was sleeping (so correct me if I'm wrong), item ghost stats are all the same. If you plus a ring it will give you hp in a set amount dependant on the plus value. So this would be in a table seperate from particular item stats but just be programmed as a table of constants.
Except some items have unique ghost stats.
MiesterMan wrote:What item were you looking at? Was it crafted?
I don't think it was.
  • 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

#32 Post by rock5 » Tue Jan 03, 2012 7:20 am

I was able to confirm that added quality is stored at the "qualityTierOffset" offset. I had a white quality item that had 0x0A (ie 10) at that offset, which meant that it had 0 added to the tier. I changed it to 0x2A and the item color changed to green, temporarily, but it did change.

I discovered something else. I changed it to 1A to see what would happen. It changed it to a t17 item. It was 1 before. So I've realised that the added tier part goes from 1 to 31. That explains why you have to divide the added quality by 2.

So this

Code: Select all

		local quality, tier = math.modf ( plusQuality / 16 );
		if ( quality > 0 ) then
			self.Quality = self.Quality + ( quality / 2 );
		end;
Should actually be

Code: Select all

		local quality, tier = math.modf ( plusQuality / 32 );
		if ( quality > 0 ) then
			self.Quality = self.Quality + quality;
		end;
Which makes me confident that the plus value at 0x17 offset also goes upto 31.
  • 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

#33 Post by rock5 » Tue Jan 03, 2012 7:34 am

BTW. I figured out what the rest of offset 0x17 is. It's how many empty rune slots the item has.

So similar to offset 0x16

Code: Select all

		local slotplus = memoryReadByte( getProc(), self.Address + 0x17 );
		local runeslots, plus = math.modf ( slotplus / 32 );
		if ( plus > 0 ) then
			plus = plus * 32;
		end;
  • 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
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: StatRating: Better Equipment Swapper

#34 Post by MiesterMan » Tue Jan 03, 2012 11:05 am

Ok, since you explained it like that I think I understand where the math is coming from. There are two values in each of these bytes and the first 32 of the plus offset is the plus value while the rest are the empty rune slots (does it not include the filled runes slots too?).

I'm still a little confused on the math for the quality but I'll take your word for it as I also played with those values to see what showed up in game (fun fun... sad it went back to normal though).

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

Re: StatRating: Better Equipment Swapper

#35 Post by rock5 » Tue Jan 03, 2012 11:15 am

MiesterMan wrote:(does it not include the filled runes slots too?).
I had a few items with 1 or 2 empty slots that followed the math but the 1 item I had with 2 filled slots had zero for that value. So it looks like it's only empty slots. Not really any use to us for rating.
MiesterMan wrote:I'm still a little confused on the math for the quality but I'll take your word for it as I also played with those values to see what showed up in game (fun fun... sad it went back to normal though).
Basically for every 32 added, it adds 1 to the quality. Any left over is the tier value.
  • 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

#36 Post by rock5 » Sun Feb 26, 2012 1:01 am

I'm doing a bit more work on my rater and there is something I can't decide on.

What happens if an item gets a better score than a currently equiped item but is too high a level? Do we want to hold onto it so we can equip it when we get to that level? What do we do with it in the mean time? How do we stop it from being sold or discarded? I can't see any way of doing it without edits to the bot.
  • 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

#37 Post by lisa » Sun Feb 26, 2012 1:21 am

Add the name to "INV_AUTOSELL_IGNORE" should do it.

Just make sure any functions that delete items also checks the profile option.
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

#38 Post by rock5 » Sun Feb 26, 2012 1:33 am

The only problem with that is if you loot a few items with the same name, you only want to save the best, not all of them. Need a way to save a particular item, not items with a particular name.
  • 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

#39 Post by lisa » Sun Feb 26, 2012 1:38 am

So use the function to also sell things.
Have it check the rating before selling and just use openstore instead of merchant.
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
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: StatRating: Better Equipment Swapper

#40 Post by MiesterMan » Sun Feb 26, 2012 1:45 am

Since I was concerned about accidentally selling gear I was trying to wear I went ahead and remade the sell function. I'd suggest making a hook in the addon to replace the function and include and temporary ignore by bag slot. Though this might be too much work to implement.

By hook I mean just replacing the function with a new customized one. Adding to it won't be sufficient.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests