Page 1 of 1

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

Posted: Wed Dec 30, 2015 2:13 pm
by Buh
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

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

Posted: Wed Dec 30, 2015 3:14 pm
by BlubBlab

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

Posted: Thu Dec 31, 2015 7:03 am
by beanybabe
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