Page 1 of 2

Counting shells in client 6.0.0+

Posted: Tue Jun 04, 2013 11:44 pm
by kenzu38
Hey rock, don't know where to put this so I just posted here.

Anyway, looks like they changed how the other game currencies (shells and mems) work. They are now put directly in the new currency list tab in your character window.

So I think the bot needs an update to be able to get an accurate count of each currency coz they're not in the inventory or bank anymore.

Re: 757 Changelog

Posted: Wed Jun 05, 2013 1:30 am
by rock5
If you're not sure where to post then start a new post. Your subject has nothing to do with the changelog.

Anyway it looks like there is nothing to change. Firstly the bot doesn't 'use' currency so has no code for them. The only thing it saves is inventory.Money which it does not use. Secondly I only see Honor Points, Arena Points and Badge of the Warrior in the currency list. Hasn't it always been like that?

Re: 757 Changelog

Posted: Wed Jun 05, 2013 2:32 am
by kenzu38
rock5 wrote:Hasn't it always been like that?
Wouldn't have bothered posting if it was like that from the start. Like I said, they changed it with the new patch.

Here is an excerpt of the official patch notes from official forum:

Code: Select all

    Coin Interface Adjustments:
    1. Now the last tab of the Character page has been changed to [Currency List].


2. Phirius Shell, Energy of Justice, Dreamland Pioneer Sigil, Ancient Memento, Proof of Myth and Badges of the Trial have been added to the page.
3. The function of switching to the Currency List after used the following items has been added: Phirius Shell, Energy of Justice, Dreamland Pioneer Sigil, Ancient Memento, Proof of Myth and Badges of the Trial have been added to the page.
4. In all the shops regarding Phirius Shell, Energy of Justice, Dreamland Pioneer Sigil, Ancient Memento, Proof of Myth and Badges of the Trial, the coin amount for purchasing will be checked first in the Currency List.
5. When obtaining the items mentioned above except for Proof of Myth, the coin amount will changed to the currency showed in the Currency List.

Like I said, every new shell or mem you obtain now goes straight to this currency list tab and not in your inventory so I think inventory:itemtotalcount() wouldn't work on these things anymore. We need a new way to tell how much shells or mems we got.

Re: 757 Changelog

Posted: Wed Jun 05, 2013 4:02 am
by rock5
Ah so only newly obtained currencies go in there.

So you need a new way to get those currencies for all the waypoints out there that used to use itemTotalCount?

Ok, I'll Look Into it.

Re: 757 Changelog

Posted: Wed Jun 05, 2013 5:24 am
by kenzu38
rock5 wrote:Ah so only newly obtained currencies go in there.

So you need a new way to get those currencies for all the waypoints out there that used to use itemTotalCount?
Yep, exactly.
rock5 wrote:Ok, I'll Look Into it.
Ok, thanks.

Re: 757 Changelog

Posted: Wed Jun 05, 2013 5:55 am
by rock5
After searching for awhile for changed code that indicated a change to the Currency List and failing, I had a look for that quote you mentioned. It seems to be for version 6.0.0 which I don't have yet. :oops:

I just checked my EU client and it started updating. I'll get back to you later.

Re: 757 Changelog

Posted: Wed Jun 05, 2013 6:09 am
by lisa
Yeah I read this post and started my update, it still hasn't finished patching yet, it's big.

Re: 757 Changelog

Posted: Wed Jun 05, 2013 6:49 am
by lisa
siege badges at 0xA02248 -- confirmed
mems is at 0xA0224C -- confirmed
proof of myth is probably 0xA02250 -- guessed
phirius shells at 0xA02254 -- confirmed
energy of justice at 0xA02258 -- confirmed

Gold is at
moneyPtr = 0x9F4AA4,

Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 7:11 am
by Rickster
With the patch to client version 6.0.0 they have implemented shells, and some other currencies to behave like gold. You no longer have these as items in your bagpack, but you can have a look at your currencies list in your character window.

As I was used to count shells by counting inventory items I do not know how to count the shells now.
So how can I count the amount of shells now?

I think this is also important for the mini game scripts, where you can earn shells, because the checks for shells in there do also not work any more.

Ric

Re: 757 Changelog

Posted: Wed Jun 05, 2013 7:13 am
by rock5
I probably wouldn't go that way. I've always been of the opinion that we should avoid getting things from memory unless you really need it to go fast, for instance while hunting out in the field, or there is no other way to get it. Just to reduce the number of addresses that need updating after patches. Getting money values are probably only needed at certain npcs etc. I would look for new in game commands instead. I probably will once I've finished patching. Currently 70%.

Edit: I've just merged these related topics together. Makes sense to have 1 dedicated topic. Rickster you might want to read from the top.

Re: Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 8:16 am
by lisa
i spent about 20 mins going through CE looking for new functions to get the currency, I figured they wouldn't just add in new args for existing functions. I failed to find anything useful.

The address was a quick solution, even if it is only temporary.

Re: Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 9:45 am
by rock5
I found the function that can be used to get the currencies
  • GetPlayerPointInfo(group, index,"")
    • Group - should be a number 1 to 3 representing one of the groups on the currencies list.
      Index - should be a number 1 to 3 for one of the currencies in that group.
      "" - the third argument just need to be a string. Doesn't matter what it is, it doesn't seem to use it.
Example:

For Mementos

Code: Select all

mems = RoMScript('GetPlayerPointInfo(2,1,"")')
I'll probably add some sort of mini function to the bot to simplify it. Something like

Code: Select all

getMoney("mementos")
getMoney("Honor")
What do you think?

What abbreviations do people use for the different types of money?

Re: Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 10:23 am
by kenzu38
Nice, thanks for the info.

Had a look at it and it seems the function stores two variables. When I print it, it also displays the stack limit for the currency. This is good for futureproofing your waypoints. Even if they decided to change the stack limit you wouldn't need to adjust by that time.

Anyway, it's a good thing the bot never really needed to be updated urgently coz of these new stuff.

Re: Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 11:12 am
by rock5
kenzu38 wrote:Had a look at it and it seems the function stores two variables. When I print it, it also displays the stack limit for the currency. This is good for futureproofing your waypoints. Even if they decided to change the stack limit you wouldn't need to adjust by that time.
I missed that. Well done.

Re: Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 11:22 am
by grande
I've seen mementos abbreviated as "mems" or "mentos"

Phirius shells as "shells

energy of justice as "eoj"a

Re: Counting shells in client 6.0.0+

Posted: Wed Jun 05, 2013 7:05 pm
by Rickster
I like "speaking" terms and descriptions. Things like that sound ok:
Shells
Energy
Mementos

in case there will not be any other shells then phirius shells and no other energys than energy of justice in future releases ;)
I would suggest to have capitals in all names or in none to make it uniform.

Re: Counting shells in client 6.0.0+

Posted: Thu Jun 06, 2013 1:03 am
by rock5
I could have it accept a few different terms eg.

Code: Select all

if name == "eojs" or name == "energy" or name == "energy of justice" then

Code: Select all

if name == "mems" or name == "mementos" or name == "ancient memento" then
Rickster wrote:I would suggest to have capitals in all names or in none to make it uniform.
I'll probably use a string.lower on it anyway so caps don't matter.
kenzu38 wrote:Had a look at it and it seems the function stores two variables. When I print it, it also displays the stack limit for the currency.
I've been thinking about this. If I return this limit as well, as a second returned value, users will most likely always minus the first value from the second ie. limit - amount, to get the space left before using it to make a decision. So I thought instead of returning amount and limit, I'll return amount and spaceleft. So that will be 1 less calculation users will have to make.

Re: Counting shells in client 6.0.0+

Posted: Thu Jun 06, 2013 3:06 am
by rock5
This is what I have so far.

Code: Select all

function getCurrency(name)
	name = string.lower(name) -- Make lower case
	local noSname = string.match(name,"^(.-)s?$") -- Take off ending 's'

	local group, index
	if noSname == "shell" or name == string.lower(getTEXT("SYS_MONEY_TYPE_11")) then
		group, index = 1,1
	elseif noSname == "energy" or noSname == "eoj" or name == string.lower(getTEXT("SYS_MONEY_TYPE_12")) then
		group, index = 1,2
	elseif noSname == "dreamland" or noSname == "pioneer sigil" or noSname == "sigil" or name == string.lower(getTEXT("SYS_MONEY_TYPE_10")) then
		group, index = 1,3
	elseif noSname == "mem" or noSname == "mento" or noSname == "memento" or name == string.lower(getTEXT("SYS_MONEY_TYPE_9")) then
		group, index = 2,1
	elseif noSname == "proof" or noSname == "pom" or name == string.lower(getTEXT("SYS_MONEY_TYPE_13")) then
		group, index = 2,2
	elseif noSname == "honor" or name == string.lower(getTEXT("SYS_MONEY_TYPE_4")) then
		group, index = 3,1
	elseif noSname == "trial" or noSname == "bott" or name == string.lower(getTEXT("SYS_MONEY_TYPE_8")) then
		group, index = 3,2
	elseif noSname == "warrior" or noSname == "botw" or name == string.lower(getTEXT("SYS_MONEY_TYPE_14")) then
		group, index = 3,3
	else
		print("Invalid currency type. Please use 'shell', 'eoj', 'sigil', 'mem', 'proof', 'honor', 'trial' or 'warrior'.")
		return 0,0
	end
	local amount, limit = RoMScript("GetPlayerPointInfo("..group..","..index..",\"\")")

	return amount, limit-amount
end
It accepts many abbreviations for the different currencies, caps doesn't matter and it can end in 's' or not eg. "eoj" or "eojs". In deference to our international community, it also accepts the full name of the currency in their own language eg. "phirius-muschel". In this case caps still don't matter but it needs to be spelt exectly correctly so no 's' added.

If there are any abbreviations you think I should add let me know.

Re: Counting shells in client 6.0.0+

Posted: Thu Jun 06, 2013 9:07 am
by barboza
Why can't I get the RomScript("GetPlayerPointInfo(x,x,"")") to work? Tried fresh micromacro+rom-bot and still I keep getting 'invalid command'.

Re: Counting shells in client 6.0.0+

Posted: Thu Jun 06, 2013 9:13 am
by rock5
The "" needs to be written like this \"\". eg.

Code: Select all

RomScript("GetPlayerPointInfo(x,x,\"\")")