Umlauts

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

Umlauts

#1 Post by master121 » Wed Sep 02, 2009 7:22 am

Is there a way to use umlauts ??
MicroMacro doesn´t like the ä in this code...

itemName = "Beutel mit verbesserten Wurfäxten"

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Umlauts

#2 Post by d003232 » Wed Sep 02, 2009 7:52 am

master121 wrote:Is there a way to use umlauts ??
MicroMacro doesn´t like the ä in this code...

itemName = "Beutel mit verbesserten Wurfäxten"
It depends from what you want to do. For a clear printou use:

Code: Select all

itemName = "Beutel mit verbesserten Wurf\132xten"
.

For using Ingame informations in lua you need perhaps

Code: Select all

convert_utf8_ascii( text );
or could it be, that you need the other way around? Then you have to change that function to the other direction?
The RoM Bot Online Wiki needs your help!

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Umlauts

#3 Post by Administrator » Wed Sep 02, 2009 7:58 am

Use the extended ASCII table to find the decimal representation, and escape it with the \ character as d003232 has shown.

'ä' = 132 dec., so 'a' == '\132'

master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

Re: Umlauts

#4 Post by master121 » Wed Sep 02, 2009 8:36 am

I want to use this code :

Code: Select all

itemName = "Beutel mit verbesserten Wurf\132xten"
for k = 1, 60, 1 do
    local bagid, icon, name, itemCount = RoMScript("GetBagItemInfo("..k..");");
    if (itemName == name) then
       itemTotal = itemTotal + itemCount;
    end
end

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Umlauts

#5 Post by d003232 » Wed Sep 02, 2009 8:39 am

master121 wrote:I want to use this code :

Code: Select all

itemName = "Beutel mit verbesserten Wurf\132xten"
for k = 1, 60, 1 do
    local bagid, icon, name, itemCount = RoMScript("GetBagItemInfo("..k..");");
    if (itemName == name ) then
       itemTotal = itemTotal + itemCount;
    end
end
Try

Code: Select all

temName = "Beutel mit verbesserten Wurf\132xten"
for k = 1, 60, 1 do
    local bagid, icon, name, itemCount = RoMScript("GetBagItemInfo("..k..");");
    if (itemName == convert_utf8_ascii( name ) ) then
       itemTotal = itemTotal + itemCount;
    end
end
The RoM Bot Online Wiki needs your help!

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Umlauts

#6 Post by 3cmSailorfuku » Fri Sep 04, 2009 5:38 am

master121 wrote:I want to use this code :

Code: Select all

itemName = "Beutel mit verbesserten Wurf\132xten"
for k = 1, 60, 1 do
    local bagid, icon, name, itemCount = RoMScript("GetBagItemInfo("..k..");");
    if (itemName == name) then
       itemTotal = itemTotal + itemCount;
    end
end
For your information, this is not the official runes of magic forum. If you have issues with your plugin that uses the RoM API you should get support there.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Umlauts

#7 Post by d003232 » Fri Sep 04, 2009 5:50 am

3cmSailorfuku wrote:
master121 wrote:I want to use this code :

Code: Select all

itemName = "Beutel mit verbesserten Wurf\132xten"
for k = 1, 60, 1 do
    local bagid, icon, name, itemCount = RoMScript("GetBagItemInfo("..k..");");
    if (itemName == name) then
       itemTotal = itemTotal + itemCount;
    end
end
For your information, this is not the official runes of magic forum. If you have issues with your plugin that uses the RoM API you should get support there.
Aua. Be not so hard with him! :-)

It is a problem with the bot and the new Bot RoMScript macro function. The conversion between the ingame UTF8 informations and the ASCII handling in the bot. So it is ok to ask that here.
The RoM Bot Online Wiki needs your help!

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Umlauts

#8 Post by 3cmSailorfuku » Fri Sep 04, 2009 7:53 pm

d003232 wrote:
3cmSailorfuku wrote:
master121 wrote:I want to use this code :

Code: Select all

itemName = "Beutel mit verbesserten Wurf\132xten"
for k = 1, 60, 1 do
    local bagid, icon, name, itemCount = RoMScript("GetBagItemInfo("..k..");");
    if (itemName == name) then
       itemTotal = itemTotal + itemCount;
    end
end
For your information, this is not the official runes of magic forum. If you have issues with your plugin that uses the RoM API you should get support there.
Aua. Be not so hard with him! :-)

It is a problem with the bot and the new Bot RoMScript macro function. The conversion between the ingame UTF8 informations and the ASCII handling in the bot. So it is ok to ask that here.
Uh uh, am I missing something? RoM API can be accessed from micromacro? wat

And that LUA is not reading the scripts in UTF-8 is obvious (Not natively), it's even in the FAQ here.

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: Umlauts

#9 Post by droppen » Fri Sep 04, 2009 8:11 pm

just look at inventory.lua, it has these function's pre coded.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 37 guests