How to do formula for gold per hour?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

How to do formula for gold per hour?

#1 Post by noobbotter » Fri Aug 01, 2014 4:30 pm

Hi. I'm trying to figure out how to do a gold/hour formula based on an estimated AH price (50K per item, for example). How would I go about doing that?

Each time my script gets back to the start, I have it display how many minutes I've been running (working properly) and how many items I've collected since I started (working properly), but for the life of me, can't figure out how that would equate into gold per hour. I figure total gold earned is the total items collected * 50,000, but how to use that with the time ran to figure gold/hour?
Here's what I have right now:

Code: Select all

			printf("starting with %s items.\n", initialInv) ---- works properly based on initialInv set in onload section.
			local curInv = inventory:itemTotalCount(204527)
			printf("Now have %s items.\n", curInv) --works properly
			local runtime = (os.time()-time)/60
			printf("been running for %s minutes.\n", runtime) -- works properly
			local earned = curInv - initialInv
			local gph = 0
			local totalgoldearned = 0
			if earned == 0 then
				totalgoldearned = 0
				gph = 0
			else
				totalgoldearned = earned * 50000
				epm = runtime/earned -- is this how you figure gold per hour? not working for me.
			end
			printf("Earning approx. %s gold per hour.", gph)
Thanks.

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

Re: How to do formula for gold per hour?

#2 Post by rock5 » Fri Aug 01, 2014 10:53 pm

You collected earned number of items over a period of runtime minutes. If you divide the items by the minutes you get an item per minute rate
  • earned/runtime = items per min
If you multiply this value by your cost value of 50000 then you will have your gold per minute
  • 50000*earned/runtime = gold per min
If you want gold/hour then multiply by 60
  • 60*50000*earned/runtime = gold per hour
I think that's right.
  • 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: How to do formula for gold per hour?

#3 Post by noobbotter » Mon Aug 04, 2014 9:09 am

I did finally figure it out. Had some other errors in my variables as well, but finally got it working.

My script I built has me earning about 7M gold per hour... provided I can sell the items in the AH, which I am doing manually one stack at a time so as to not over flood the market. So really it si "potentially" worth 7M per hour, but it's limited to buyers unlike with KS where items are immediately sold to vendors.

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

Re: How to do formula for gold per hour?

#4 Post by lisa » Tue Aug 05, 2014 11:08 pm

my set window userfunction has an option for AH items to be included in the calculations.
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: No registered users and 3 guests