' instead of " in player:target_NPC and player:merchant

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

' instead of " in player:target_NPC and player:merchant

#1 Post by rock5 » Mon Mar 29, 2010 7:40 pm

I noticed I've been encountering more and more NPCs with " in their names such as "Anemone" Tadesha.

When running createpath.lua and pressing keypad 4 or 5 it creates waypoint entries that wont work. For instance;

Code: Select all

player:target_NPC(""Anemone" Tadesha");
player:merchant(""Anemone" Tadesha");
I've been changing them manually like so;

Code: Select all

player:target_NPC('"Anemone" Tadesha');
player:merchant('"Anemone" Tadesha');
but it would be good if createpath.lua used ' by default. I can't see any downside, off the top of my head.

You just need to change lines 29 and 30 of createpath.lua to;

Code: Select all

p_merchant_command = "player:merchant(\'%s\');";
p_targetNPC_command = "player:target_NPC(\'%s\');";
Thank you.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

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

Re: ' instead of " in player:target_NPC and player:merchant

#2 Post by Administrator » Mon Mar 29, 2010 8:20 pm

There's a better solution. Edit rom/createpath.lua. Find this:

Code: Select all

				hf_line = hf_line .. "\t\t" .. sprintf(p_merchant_command, v.npc_name) .. "\n";
Change to:

Code: Select all

				hf_line = hf_line .. "\t\t" .. sprintf(p_merchant_command, string.gsub(v.npc_name, "\"", "\\\"")) .. "\n";
You'll have to make that change for both merchant and NPC.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ' instead of " in player:target_NPC and player:merchant

#3 Post by rock5 » Mon Mar 29, 2010 9:30 pm

So I take it you'll change it in the next update?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

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

Re: ' instead of " in player:target_NPC and player:merchant

#4 Post by Administrator » Mon Mar 29, 2010 10:39 pm

rock5 wrote:So I take it you'll change it in the next update?
Test it for me and make sure it's working properly. If it does, I'll include it.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ' instead of " in player:target_NPC and player:merchant

#5 Post by rock5 » Mon Mar 29, 2010 11:59 pm

Just tested it. It works fine. Thank you.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests