Question: How to get amount of my own gold/diamonds etc.. in a .lua script

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Buh
Posts: 45
Joined: Thu Dec 10, 2015 12:39 am

Question: How to get amount of my own gold/diamonds etc.. in a .lua script

#1 Post by Buh » Wed Dec 30, 2015 2:13 pm

Hey

My question is, how can i get the current amount of my own currency for example to compare it with something :D

Thanks for answers

Greetings BUH

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Question: How to get amount of my own gold/diamonds etc.. in a .lua script

#2 Post by BlubBlab » Wed Dec 30, 2015 3:14 pm

Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Question: How to get amount of my own gold/diamonds etc.. in a .lua script

#3 Post by beanybabe » Thu Dec 31, 2015 7:03 am

Here is some code from lisa or rock I added some coments

Code: Select all

local btokens = inventory:itemTotalCount(203038)    --checks for tokens in first 2 bags only
	local tokencount = 0
	for slotnumber = 1,40 do
		local name, id, count, slot = bankItemBySlot(slotnumber)
		if id == 204874 then -- phirius tokens
		local tokencount = tokencount + count
		end
	end
	local tokens = btokens + tokencount
	readfile:close()
	local empties = inventory:itemTotalCount(0)    -- empty bag spaces
	local gold = RoMScript('GetPlayerMoney("copper");')           -- gold
	local shells = getCurrency("shell")                                  --phirus shells
	local tokens = inventory:itemTotalCount(203038)         --phirus tokens    
	local puris = inventory:itemTotalCount("Purified Fusion Stone","itemshop")
	local mems = getCurrency("mems")                         --momentos
	local ch = RoMScript("GetMagicBoxEnergy()")      --transmuter charges
	local dahonor = getCurrency("honor")
-- guild honor

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests