Page 1 of 2

Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 8:52 am
by RicalEyl
I tried to insert autosell to my profile, but itemtypestable is in german so I have to use the german words.
e.g Rüstungen.
If I write Rüstungen then the bot wont start.

after changing it to Ruestungen the bot starts but wont sell anything of the category Rüstungen

edit: Maybe it works with "[1],[0]" instead of the name...
but somehow nothing works at all as it doesnt recognize that Ingamefunctions is installed. I did copy the folder to the addon folder.. and its also loaded I get a igd Event Monitor loaded but the bot tells me its not installed :(

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 9:24 am
by rock5
itemtypestable gets the names from inside the game.

I think you just have to learn how to write the German words so the bot will recognise it. Administrator will have to tell you that as I don't know how.

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 10:28 am
by Tantehilde
Try "for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer " most time the script works with it.. but i have the trouble for autosell that the function doesnt take the category like "Materialien, Holz..." but when i write "Tarslin, Frevler" or so then he sell or keep it (what i want). I dont know if this is for the german client or iam to stupid for the function ;)

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 10:57 am
by rock5
Tantehilde wrote:Try "for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer " most time the script works with it.. but i have the trouble for autosell that the function doesnt take the category like "Materialien, Holz..." but when i write "Tarslin, Frevler" or so then he sell or keep it (what i want). I dont know if this is for the german client or iam to stupid for the function ;)
Materialien and Holz are types, yes? And Tarslin and Frevler are item names, yes? They are different and use different profile options. To filter by item name you use INV_AUTOSELL_IGNORE. To filter by type you use INV_AUTOSELL_TYPES and INV_AUTOSELL_TYPES_NOSELL. Is that the way you were using them?
http://www.solarstrike.net/wiki/index.p ... ll_Options

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 11:02 am
by Tantehilde
ooh.. ok it sounds like i'm too stupid, i will test it.. thx rock..

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 1:12 pm
by RicalEyl
hmm the /number doesnt work... it sells everything but Stäbe Äxte Hämmer so everything that has an ä in it :(

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 1:26 pm
by RicalEyl
I think I found a way to avoid it.. :)
thx for help anyways...

Another question:
Is there a function that checks how much space you have left in your backpack?

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 6:51 pm
by Administrator
Normally, you can use characters with umlauts in your profile, but only if you are saving as UTF8 without BOM.

Re: Bot wont recognize an Ü/ä/ö

Posted: Wed Apr 20, 2011 9:28 pm
by rock5
RicalEyl wrote:Another question:
Is there a function that checks how much space you have left in your backpack?

Code: Select all

bagspace = inventory:itemTotalCount(0)

Re: Bot wont recognize an Ü/ä/ö

Posted: Sat Apr 23, 2011 2:53 am
by JackBlonder
I tried to insert autosell to my profile, but itemtypestable is in german so I have to use the german words.
e.g Rüstungen.
Try

Code: Select all

R..stungen
This worked for me.

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Apr 24, 2011 5:28 am
by M4gm4
Der Bot kann keine "Rüstungen" verkaufen, da es keine Kategorie ist, sowohl auch keine bezeichnung.
Wenn du mal mit der Maus über die items gehst, wirst du sehen, das da immer "ohrring" "füße" "nebenhand" "oberkörper" steht.
Du kannst also mit "Rüstungen" kein zu verkaufendes item identifizieren.

das ganze müßte dann evtl. so aussehen:

Code: Select all

INV_AUTOSELL_TYPES = "Unterk\148rper,G\129rtel,Oberk\148rper,Kopf,Ring,Ohrring,Halskette,Schultern,H\132nde,F\129\225e,Umhang,"

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 3:45 pm
by C3PO
Hello

I have the same problem, I tried already
das ganze müßte dann evtl. so aussehen:

Code: Select all

INV_AUTOSELL_TYPES = "Unterk\148rper,G\129rtel,Oberk\148rper,Kopf,Ring,Ohrring,Halskette,Schultern,H\132nde,F\129\225e,Umhang,"
but I still get only

Code: Select all

Der NPC 'Archäologin Wendy' wurde erfolgreich ausgewählt. Wir öffnen das Dialogf
enster.
[DEBUG] Check item so sell: 61 520021 Schlagkraft I
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 63 221262 Lehrlingsrobe
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 64 200151 Einfache Medizin
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 65 220098 Derbes Stoffgewand
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 66 210304 Holzpfeil
[DEBUG] Check item so sell: 67 520141 Magie I
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 68 200850 Verbinden-Rune
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 70 520121 Unerm├╝dlichkeit I
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 72 200663 Leichter Erste-Hilfe-Trank
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 73 201042 Leichter magischer Trank
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 76 220409 Magische Überhose
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 77 221669 Stoffg├╝rtel
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 78 220072 Lederweste
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 79 221263 Lehrlingshose
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 80 221264 Lehrlingsstiefel
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 81 200609 Scharfe Bärenklaue
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 82 200854 Reinigungsrune
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 83 220533 Lederr├╝stung
[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 9:33 pm
by lisa
I actually don't understand why the type needs to be localized for language, seems to me that the info gotten from memory is all in integers and we then use those to get the names stored in the types table.

So the memory for type has a value like 1 and we use
local objtype = itemtypes[self.ObjType].Name

So that is basically saying
local objtype = itemtypes[1].Name
which will tell you the value stored in the file itemtypestable.lua

If we got rid of the language localisation it does at startup people could simply use

Armor
Weapons
Quest Items

Sure it might not be in their local language but in order to use the bot and browse this forum you would need to be able to understand atleast the basics of english, it would get rid of all the needs for special characters.

If the bot actually used the item type names then for sure I would see the need but since it is all in digit values like 1,5,6,0 then I just don't see the need to make it harder for people to use.

I could of course be wrong about the digits but the code I looked at today seems to just be exactly that.

Code: Select all

self.ObjType = memoryReadInt( getProc(), self.BaseItemAddress + addresses.typeOffset );

if ( self.ObjType == 2 ) then -- Consumables, lets try to get CD time

if self.ObjType == 0 or self.ObjType == 1 or self.ObjType == 5 then -- Weapons, Armor and Equipment Enhancements

objsubsubuniquetype = itemtypes[self.ObjType][self.ObjSubType][self.ObjSubSubType].UniqueName
I guess another option is to just substitute characters when creating the table

so
Rüstungen
would be saved as
Rustungen

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 10:35 pm
by C3PO
Hi Lisa,

for me it wouldn't be a problem to change those labels to english and I think that you would be right that every budy should be able to deal with it. But if I would know what would be expacted by INV_AUTOSELL_TYPE it would be more comfortable.
Me problem is that even with the debug log I don't get the information what would be the correct label. and I expacted that

Code: Select all

debugMsg(settings.profile.options.DEBUG_AUTOSELL,
				  "Item is not in type option INV_AUTOSELL_TYPE:", settings.profile.options.INV_AUTOSELL_TYPE);
would show me this information.

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 10:44 pm
by rock5
Well the whole idea of the itemtypes table is so people can use the type names in their language. There are over 100 types that people would have to learn the English name for, if it wasn't localized.

I think the best solution is to fix it such as your "substitute characters" idea. Is there a function for that already? convert_utf8_ascii or utf8ToAscii_umlauts perhaps.

But I'm curious to know why we can't make this work.

Code: Select all

INV_AUTOSELL_TYPES = "Unterkörper,Gürtel,Oberkörper,Kopf,Ring,Ohrring,Halskette,Schultern,Hände,Füße,Umhang,"

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 10:49 pm
by lisa
autosell compares what you have in profile to what is in that file.
cache/itemtypestable.lua

So if you look in that file you will see exactly what it is comparing your profile to.

english looks like this.

Code: Select all

itemtypes = {
	[1] = { Name = "Armor",
		[1] = { Name = "Chain",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Chain" },
			[2] = { Name = "Belts", UniqueName = "Belts Chain" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Chain" },
			[4] = { Name = "Hands", UniqueName = "Hands Chain" },
			[5] = { Name = "Feet", UniqueName = "Feet Chain" },
			[6] = { Name = "Capes", UniqueName = "Capes Chain" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Chain" },
			[0] = { Name = "Head", UniqueName = "Head Chain" },
		},
		[2] = { Name = "Leather",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Leather" },
			[2] = { Name = "Belts", UniqueName = "Belts Leather" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Leather" },
			[4] = { Name = "Hands", UniqueName = "Hands Leather" },
			[5] = { Name = "Feet", UniqueName = "Feet Leather" },
			[6] = { Name = "Capes", UniqueName = "Capes Leather" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Leather" },
			[0] = { Name = "Head", UniqueName = "Head Leather" },
		},
		[3] = { Name = "Cloth",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Cloth" },
			[2] = { Name = "Belts", UniqueName = "Belts Cloth" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Cloth" },
			[4] = { Name = "Hands", UniqueName = "Hands Cloth" },
			[5] = { Name = "Feet", UniqueName = "Feet Cloth" },
			[6] = { Name = "Capes", UniqueName = "Capes Cloth" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Cloth" },
			[0] = { Name = "Head", UniqueName = "Head Cloth" },
		},
		[4] = { Name = "Accessories",
			[1] = { Name = "Rings" },
			[2] = { Name = "Necklace" },
			[0] = { Name = "Earrings" },
		},
		[5] = { Name = "Off-hand",
			[1] = { Name = "Talismans" },
			[0] = { Name = "Shields" },
		},
		[6] = { Name = "Amulets" },
		[7] = { Name = "Back" },
		[0] = { Name = "Plate",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Plate" },
			[2] = { Name = "Belts", UniqueName = "Belts Plate" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Plate" },
			[4] = { Name = "Hands", UniqueName = "Hands Plate" },
			[5] = { Name = "Feet", UniqueName = "Feet Plate" },
			[6] = { Name = "Capes", UniqueName = "Capes Plate" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Plate" },
			[0] = { Name = "Head", UniqueName = "Head Plate" },
		},
	},
	[2] = { Name = "Supplies",
		[1] = { Name = "Desserts" },
		[2] = { Name = "Potions" },
		[0] = { Name = "Foods" },
	},
	[3] = { Name = "Materials",
		[1] = { Name = "Wood" },
		[2] = { Name = "Herbs" },
		[3] = { Name = "Raw Materials" },
		[4] = { Name = "Production Runes" },
		[5] = { Name = "Prepared Materials" },
		[0] = { Name = "Ores" },
	},
	[4] = { Name = "Recipes",
		[1] = { Name = "Carpentry" },
		[2] = { Name = "Armorcrafting" },
		[3] = { Name = "Tailoring" },
		[4] = { Name = "Alchemy" },
		[5] = { Name = "Cooking" },
		[0] = { Name = "Blacksmithing" },
	},
	[5] = { Name = "Equipment Enhancement",
		[1] = { Name = "Runes" },
		[2] = { Name = "Fusion Stones" },
		[0] = { Name = "Refining Gems" },
	},
	[6] = { Name = "Monster Cards" },
	[7] = { Name = "Mounts" },
	[8] = { Name = "Household",
		[1] = { Name = "Furniture" },
		[2] = { Name = "Knowledge Books" },
		[0] = { Name = "House Contracts" },
	},
	[9] = { Name = "Special Items" },
	[10] = { Name = "Quest Items" },
	[11] = { Name = "Others" },
	[12] = { Name = "Money",
		[1] = { Name = "Diamonds" },
		[0] = { Name = "Gold" },
	},
	[0] = { Name = "Weapons",
		[1] = { Name = "Axes",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Axes" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Axes" },
		},
		[2] = { Name = "Hammers",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Hammers" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Hammers" },
		},
		[3] = { Name = "Daggers" },
		[4] = { Name = "Staves",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Staves" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Staves" },
		},
		[5] = { Name = "Ranged Weapons",
			[1] = { Name = "Crossbows" },
			[2] = { Name = "Arrows" },
			[0] = { Name = "Bows" },
		},
		[6] = { Name = "Projectiles" },
		[0] = { Name = "Swords",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Swords" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Swords" },
		},
	},
}
itemtypes_language = "EN"
itemtypes_version = 1

so anything with Name = " " is what it is comparing your profile to.

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 11:07 pm
by rock5
Administrator said
Administrator wrote:Normally, you can use characters with umlauts in your profile, but only if you are saving as UTF8 without BOM.
Did you try saving with the umlauts and saving as UTF8 without BOM? You'll need a proper script editor such as Notepad++. I believe the current version defaults to saving as UTF8 w/o BOM.

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 11:10 pm
by lisa
rock5 wrote:But I'm curious to know why we can't make this work.
As a test I just copied the file to scripts and then just did the com.lua and did include("filename.lua")

I pasted this in the table
Unterkörper
but MM printed it as this
Unterk÷rper

Code: Select all

Command> print(itemtypes[1].Name)
Unterk÷rper
even after adding the umlauts code it still did same

Code: Select all

Command> include("lol.lua") print(asciiToUtf8_umlauts(itemtypes[1].Name))
Unterk÷rper
when I change file to utf8 without BOM it does this to the name
UnterkxF6rper

I repasted the name as it was before and then it printed this
Unterk├Ârper

Re: Bot wont recognize an Ü/ä/ö

Posted: Sun Mar 10, 2013 11:37 pm
by lisa
If you want to play with it the files look like this

on MM just use

Code: Select all

com
and then you can use this

Code: Select all

include("lol.lua") print(asciiToUtf8_umlauts(itemtypes[1].Name))

looks like this
Script> com
Opening com.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-----------------------------------------------------------------------------

Command line
Type in 'q' (without quotes) to quit.
Command> include("lol.lua") print(asciiToUtf8_umlauts(itemtypes[1].Name))
Unterk├Ârper

Re: Bot wont recognize an Ü/ä/ö

Posted: Mon Mar 11, 2013 12:08 am
by C3PO
Hello again,

I tested a few things and found out

Code: Select all

[DEBUG] Item is not in type option INV_AUTOSELL_TYPE:
[DEBUG] Check item so sell: 109 220649 Lederstiefel
table: 069A7500
1:      Rezepte
2:      Waffen
3:      Munition
4:      R\129stungen
5:      Unterk\148rper
6:      G\129rtel
7:      Oberk\148rper
8:      Kopf
9:      Ring
10:     Ohrring
11:     Halskette
12:     Schultern
13:     H\132nde
14:     F\129\225e
15:     Umhang
16:
Rüstungen      Leder   Füße  Füße Leder
the lines 1 to 16 are the labels I tested for INV_AUTOSELL_TYPE the last line is the type of the item (out of cache/itemtypestable.lua)
So at the moment I think the problem is in cache/itemtypestable.lua because there the Umlaute are written normal (ÄÖÜäöüß) and not with the corresponding codes