Luck memory address

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Luck memory address

#1 Post by rock5 »

I had the idea, today, to look for the luck value in memory. I just thought this would be interesting to find. I found it at 0x9D57CC.

This is how you get it. I use staticEquipBase so it might continue working after a game patch .

Code: Select all

luck = memoryReadFloat(getProc(),addresses.staticEquipBase+0x2AE0)
Update for 6.0.1 and 6.0.2.

Code: Select all

luck = memoryReadFloat(getProc(),addresses.playerCraftLevelBase+0xD00)

Here is a userfunction that searches for the offset so should still work even if the offset changes. To use it just use

GetLuck

Code: Select all

luck = getLuck()
Attachments
userfunction_getluck.lua
Version 1.0
(810 Bytes) Downloaded 205 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
User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Luck memory address

#2 Post by grande »

I'm sitting here trying to understand why this is interesting. I don't doubt there is value but I'm not really seeing the whole picture. My experiments in CE have left me scratching my head as I play with HP values that don't have any real affect since it's just what you see on screen and not the actual HP the character has. Or is there some final memory address that I never made it to? At one point I even started googling different memory location data to see what various three letter codes meant to see if that may help me understand what to change but I was really just spitballing ideas with little understanding of what I was doing... but hey, that's worked for me in the past :P

I'd like to understand better but maybe there's stuff that shouldn't be aired out too much... From time to time I'll look more in the CE tutorials and each time they seem to make a little more sense but so far I still have no real meaningful results from my experiments other than, "gee wiz, that's sort of neat". Then again I know even less about "oly db" and terms other than CE so I'm sure I still have a lot to learn.

Congrats on 5555 posts, nice round number lol
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Luck memory address

#3 Post by rock5 »

Well, we mainly use memory addresses to get info. There is very little memory changing done with the bot. That's what I intended, just to give info. To tell you the truth, I don't know what would happen if you changed the value and I didn't even try. I suspect it wouldn't work.

The reason I thought it was interresting is, maybe you might wonder if certain luck buffs stack or not. Now you can check. For instance, today I used Lucky powder from the house maid, lucky frog and lucky cactus and I had 105 luck (75%+10%+20%). So I know those 3 stack. Maybe they all stack so this is useless, I'm not sure. Or how about this, everyone know Honor parties increase drop rate, maybe with this you could see by how much. I'm pretty sure it's not written anywhere.
  • 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
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Luck memory address

#4 Post by silinky »

niice :D
i already see the possibilities. thanks!
User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Luck memory address

#5 Post by grande »

@silinky, are you seeing something different then what rock posted? What pray tell might that be?

@Rock, thanks. Make sense if I undersand... this memory address would be monitored before/after creation of honor party to see what the actual percentage gain in luck would be. That's pretty cool if that's what you're saying. I can remember tallying up in my head what all the buffs added up to lol. Here's another consideration... aren't there differences between group cumulated luck and overall luck? Maybe there are different addresses for group luck and personal luck and even one for combined personal/group affects which is some how aggregated mathematically... hmmm.......
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Luck memory address

#6 Post by rock5 »

grande wrote:aren't there differences between group cumulated luck and overall luck?
I don't know. Maybe luck gotten from a group is added to your general luck.
  • 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
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Luck memory address

#7 Post by BillDoorNZ »

Just been testing with this a bit. Definitely not showing any change in luck with an honor party - as you mentioned Rock, its prolly group-based-luck so could be a different mem address/offset
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Luck memory address

#8 Post by rock5 »

Hm... I suspect it's a calculated value so it might not appear anywhere in memory. I'm certainly not interested in searching for 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
kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Luck memory address

#9 Post by kkulesza »

Thanks for posting this address. The research was interesting.

Fact:
There was a crafting event last summer.
You could craft this item:
http://www.runesdatabase.com/item/20973 ... -rune-dice
if you have trained blacksmithing.
This item is clickable every 30 secs and has a skill that might give you a 3 minut buff.
The buff says "You feel like this is your lucky day" or something like that.
I've tried refining items and buying memento/shell stats with that buff on, but there was no diffrence.
Now i know it adds 100 to luck(drop rate) value.
I wish i had made those dices on every KS-bot alt :)
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Luck memory address

#10 Post by BillDoorNZ »

Just thought of a good use for the luck address:

When farming KS etc I regularly use the CleanBag function to drop low value items. I'm thinking that what I might do is auto-adjust the 'drop value' based upon the characters current luck. e.g.

Code: Select all

local luck = ....

if (luck < 50) then
  CleanBag(300,3);
elseif ((luck >= 50) and (luck < 80) then
  CleanBag(500,3);
elseif ((luck >= 80) and (luck < 150) then
  CleanBag(800,3);
else
  CleanBag(1500,3);
end;
forgive the inefficient code - just getting the point across.
User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Luck memory address

#11 Post by silinky »

haha i do exactly the same. and i also check for honor party when i do this :)
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Luck memory address

#12 Post by BillDoorNZ »

ended up doing this:

Code: Select all

function KSSetLootValue()
	local luck = memoryReadFloat(getProc(),addresses.staticEquipBase+0x2AE0);
	if (luck) then
		local lootValue = math.floor(luck/50)*KS_LootFactor;
		lootValue = lootValue + KS_LootMin;
		if player:hasBuff("May Establish Honor Party") then
			lootValue = lootValue + KS_HonorPartyMod;
		end;
		ksLog("Changing Loot value from "..tostring(KS_loot_discard_value).." to "..tostring(lootValue).." as luck is "..tostring(luck), LOGLEVEL_INFO);
		KS_loot_discard_value = lootValue;
	end;
end;
and started with:

Code: Select all

KS_LootFactor = 100;
KS_LootMin = 200;
KS_HonorPartyMod = 200;
but found that adjusting loot values this way didn't really improve profit vs time, so ended with:

Code: Select all

KS_LootFactor = 0;
KS_LootMin = 200;
KS_HonorPartyMod = 0;
which basically just throws out anything under value of 200 :) at least it was an interesting exercise :)
User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Luck memory address

#13 Post by silinky »

nice :)
mine actualyy is like this:
if honorparty is on, throw out everything under 900 gold
if it is off, don't.

because when i have honor, i get full at locatha, but without it, drop rate drastically falls. even when i have 320% luck.
honor party is a majot luck buff when you are above lvl 55. but my KS farmers are all lvl 60-70.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Luck memory address

#14 Post by rock5 »

Actually, when farming t4 items the drop rate is abysmal, but if I create a regular party with another character, my drop rate increases dramatically. I'm not sure of the difference between regular parties and honor parties but regular parties help drop rates a lot too.

Useful to know, if you don't have any low level characters handy for an honor party or you can't be bothered making the trip to go collect the honor party certificates.
  • 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: Luck memory address

#15 Post by rock5 »

Updated the the command to work with 6.0.1 and 6.0.2.

I also added a userfunction that searches for the offset using a pattern so it should last longer.
  • 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
Post Reply