Page 4 of 9

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 8:55 am
by vietales
OMG, put ARROW_QUIVER back into my profile and MM works without error
But it only sells white items

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 10:53 am
by vietales
Autosell works well now
But it seems there is something wrong with 'inventory:itemTotalCount'
I'm using this command to check if my bags are full or not

Code: Select all

		if(3 > inventory:itemTotalCount(0)) 	then 
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Merchant")); 
		printf("Full.\n") 
Here is my WP.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="769" z="22805" tag="Main Run"></waypoint>
	<!-- #  2 --><waypoint x="630" z="22512">	</waypoint>
	<!-- #  3 --><waypoint x="425" z="22513">	</waypoint>
	<!-- #  4 --><waypoint x="275" z="22422">	</waypoint>
	<!-- #  5 --><waypoint x="106" z="22267">	</waypoint>
	<!-- #  6 --><waypoint x="262" z="22375">	</waypoint>
	<!-- #  7 --><waypoint x="527" z="22535">	
		inventory:update();
		if(3 > inventory:itemTotalCount(0))
 	        then 
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Merchant")); 
		printf("Full.\n");
		else __WPL:setWaypointIndex(__WPL:findWaypointTag("Main Run")); 
		end
	</waypoint>

	<!-- #  1 --><waypoint x="709" z="22776" tag="Merchant">  
	inventory:useItem(206234);
	</waypoint>
	<!-- #  2 --><waypoint x="856" z="22895" type="RUN">	</waypoint>
	<!-- #  3 --><waypoint x="1072" z="23069" type="RUN"></waypoint>
	<!-- #  4 --><waypoint x="1203" z="23206" type="RUN"></waypoint>
	<!-- #  5 --><waypoint x="1392" z="23287" type="RUN">
	player:merchant("Bartai");	
	</waypoint>
	<!-- #  7 --><waypoint x="1399" z="23116" type="RUN"></waypoint>
	<!-- #  8 --><waypoint x="1342" z="22833" type="RUN"></waypoint>
	<!-- #  9 --><waypoint x="1269" z="22547" type="RUN"></waypoint>
	<!-- # 10 --><waypoint x="1202" z="22306" type="RUN"></waypoint>
	<!-- # 11 --><waypoint x="884" z="22328" type="RUN"></waypoint>
	<!-- # 12 --><waypoint x="770" z="22517" type="RUN"></waypoint>
	<!-- # 13 --><waypoint x="725" z="22605" type="RUN">
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Main Run"));
	</waypoint>
</waypoints>
Bot always says "Full" even I have many bags space and go shopping after moving to way point #7

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 12:13 pm
by lisa
I can't believe it took so long to work out you were missing the arrow from profile lol
I was just stuck on the idea that it must be an issue with old version.

i remember having a look at the itemtotalcount code a few days ago and thinking the 0 wouldn't mean check bag space

Code: Select all

inventory:itemTotalCount(0))
I'll have a better look at it tomorrow.

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 8:05 pm
by rock5
In 477 itemTotalCount is not capable of counting empty slots. I added that functionallity in a later version. It should be easy enough for lisa to add it for you guys. Just cut and paste.

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 8:19 pm
by lisa
Yeah I've actually been focusing on finding the last few addresses i am missing from 477, once I find the last few addresses I can test using 605 on the old server and see how it runs.

If all goes well they should be able to start using current bot version on their old client, just using the new addresses.lua that I am making.

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 9:18 pm
by lisa
K I just did this up quickly, any errors just post. replace the existing file in rom/classes/ folder

Should be able to use the inventory:itemTotalCount(0) now

Re: 3.0.4 client servers, Revision 477

Posted: Sat Jun 11, 2011 10:06 pm
by lisa
A little update on the language issue.

Found references to language in memory.

DE,ENUS,ENEU,BR,TR,FR,PT,PL,NL,RO,VN,TH,SAES,SAPT,ES,PH,AUS

I am going to assume vietnamese is VN, so now just need to fiind what they use as durability in vietnamese. Any guesses we can try?

It might be very simple and et it first try.

in rom/classes/item.lua this is at the top

Code: Select all

-- Tooltip parser keywords
ITEM_TOOLTIP_DURABILITY = {
	DE		= "Haltbarkeit",
	FR		= "Structure",
	ENEU	= "Durability", 
	ENUS	= "Durability",
	PH		= "Durability",
	RU		= "\143\224\174\231\173\174\225\226\236",
	PL		= "Trwa\136o\152\143",
	ES		= "Durabilidad",
};
Need to just add in VN = "something"
where something is the vietnamese for Durability.
Probably have to do the same for arabik, not sure what language code that is from that list though.

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 1:01 am
by lisa
As an update I am currently trying to get all the addresses that we use the rev 605 for the 3.0.4 client. I hope to be able to use those addresses and use rev 605 with the old client.

I am about half way through finding the addresses, slowly but surely. After that I may have to also find the offsets.

In the end though this is going to be easier than actually rewriting rev 477 to be able to use current the code, as people will always want more and more features for the bot.

Will still need to find a fix for the language issue regardless of addresses.

Re: Tahadi middle east server, Revision 477

Posted: Sun Jun 12, 2011 1:14 am
by lisa
harbifm wrote:thanks lisa dn rock5
but somthing happen, could not find out why, one of my waypoisnt which I use to farm dears in savage land did not work any more, it begun to go somewhere else, trying the kill in the dinasorus (rainforst hunters, they call them in game , Trex look like moobs), while it was going smooth in version 472??
are there any Y value in the coords, I just found that in rev 477 the offset for Y coords seems wrong, it prob wasn't an issue at the time because waypoints didn't use a Y in coords.

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 1:43 am
by rock5
I have tools for exploring the client fdbs and language files if they'll help. I had a look at the language files available on my client and I saw
de
eneu
enus
es
fr
pl
sa

There's no vn. Maybe different regions release different language files with there clients. If you downloaded a client that has the vn language file maybe you can use the tools to search for the durability string.
FDB Extractor.7z
(104.67 KiB) Downloaded 198 times
ROM_db_LanguageConvView.7z
(284.6 KiB) Downloaded 204 times
1. Start the extractor and open "Runes of Magic/fdb/data.fdb".
2. Open the "data" group".
3. Scroll down until you see the "string_xx.db" files.
4. If you see "string_vn.db" then that's the one you want. Right click it and extract it.
5. Start the language converter and click on "Convert .db" then browse to the extracted file. Once it's been converted it will automatically create an xml file in the same folder. From now on you can open the xml file instead of converting it again.
6. Normally you would search for the term in the english database first but I can do that for you. The 2 values I found that had the text of "Durability" were "SYS_ITEM_DURABLE" and "SYS_WEAREQTYPE_1". Search for those in the pl db and you will get the pl word for durability.

Hope that helps.

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 2:16 am
by vietales
lisa wrote:K I just did this up quickly, any errors just post. replace the existing file in rom/classes/ folder

Should be able to use the inventory:itemTotalCount(0) now
I got this error:

Code: Select all

2:11pm - scripts\rom\bot.lua:6: ...Games/RoM_VN/interface/micromacro_work/script
s/rom/classes/inventory.lua:649: '<eof>' expected near 'end'
lisa wrote: Need to just add in VN = "something"
where something is the vietnamese for Durability.
VN = "Độ bền" and MM works perfectly with r477 original 'inventory.lua'

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 2:32 am
by lisa
hmm maybe it just had a bad upload, works fine for me.

try again with this 1

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 2:44 am
by lisa
vietales wrote: VN = "Độ bền" and MM works perfectly with r477 original 'inventory.lua'
I'm struggling to find the characters even in ascii, they don't just copy paste so need to find a way to do it in file.

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 4:52 am
by harbifm
as from what I followed

the inventory file you posted lisa will fix the auto sell function (making the KS farming script usable)

will that fix the userGoodie consumption of food and luck potions?


I do not have any language issue with my version, and I want to seel every thing in disignated bags.

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 5:04 am
by vietales
lisa wrote:I'm struggling to find the characters even in ascii, they don't just copy paste so need to find a way to do it in file.
Here is utf-8 character table: http://www.utf8-chartable.de/
Vietnamese letters' block can be found here: http://vietunicode.sourceforge.net/charset/v3.htm

Đ = 196 144
ộ = 225 187 153
ề = 225 187 129

So, Độ bền = 196\144\225\187\153\32\b\225\187\129\n
I'm not sure about that

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 5:11 am
by vietales
lisa wrote:hmm maybe it just had a bad upload, works fine for me.

try again with this 1
r477 does not have 'memorytable.lua' so I manually edit the 2nd line

Code: Select all

include("memorytable.lua");
to

Code: Select all

--include("memorytable.lua");
and get this:

Code: Select all

5:9pm - ...ce/micromacro_work/scripts/rom/classes/inventory.lua:252: attempt to
call global 'getInventoryRange' (a nil value)

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 6:17 am
by lisa
Started from a fresh inventory.lua to make sure there weren't any conflicts for other work I had already done.

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 6:24 am
by vietales
lisa wrote:Started from a fresh inventory.lua to make sure there weren't any conflicts for other work I had already done.
still receive the same error

Code: Select all

6:23pm - ...ce/micromacro_work/scripts/rom/classes/inventory.lua:262: attempt to index global 'item' (a nil value)

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 7:09 am
by lisa
line 261 has this

Code: Select all

item = inventory.BagSlot[slot]
change to this

Code: Select all

item = self.BagSlot[slot]

Re: 3.0.4 client servers, Revision 477

Posted: Sun Jun 12, 2011 8:37 am
by lisa
rock5 wrote:I had a look at the language files available on my client and I saw
de
eneu
enus
es
fr
pl
sa

There's no vn. Maybe different regions release different language files with there clients. If you downloaded a client that has the vn language file maybe you can use the tools to search for the durability string.
Yeah it seems each server only adds to the db languages it uses, I don't have VN either.
I have on the middle east server.

ae
enar
sa
AE = "البقاء"
SA = "Durabilidad",
ENAR = "Durability",
I assume enar is english and other 2 are the forms of arabik I see on my screen constantly
I don't see any harm in adding them to current revision, next time we update. Well that is if I manage to get the last 4 addresses I can't find for the client lol