Get quest status by ID - getQuestStatus(..) - not working?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
pumbatoo
Posts: 19
Joined: Wed Jul 13, 2011 3:18 am

Get quest status by ID - getQuestStatus(..) - not working?

#1 Post by pumbatoo » Sat Jul 23, 2011 10:10 am

When using the getQuestStatus with the ID of the quest (line 2), the return value is "not accepted". Although the quest is accepted and complete (not "closed").

Code: Select all

1: RoMScript("CheckQuest(420174)");
2: getQuestStatus(420174);
3: getQuestStatus("Aslan Essence");
Line 1 is returning 1 (means: you have accepted the quest but have never completed it); line 3 returns "complete". After completing the quest line 1 returns 2 and the 3th line returns "not accepted". All what I expect, except line 2.

Tried in a waypoint file (in the onLoad area and inside a waypoint)

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

Re: Get quest status by ID - getQuestStatus(..) - not workin

#2 Post by rock5 » Sat Jul 23, 2011 10:39 am

Looks ok.

It implies a problem with GetIdName(420174) when trying to get the name but it would have shown an error message I think. Maybe try

Code: Select all

print(RoMScript("GetIdName(420174)"))
and see what it prints.

Are you sure you didn't put quotes around the number?
  • 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

pumbatoo
Posts: 19
Joined: Wed Jul 13, 2011 3:18 am

Re: Get quest status by ID - getQuestStatus(..) - not workin

#3 Post by pumbatoo » Tue Aug 09, 2011 5:10 pm

Ok. I think I've found the problem.
Times ago I posted about problems with umlauts in the questname: viewtopic.php?f=21&t=2718

The function getQuestStatus(_questname) in the functions.lua first resolves the id into its name and after, it checks the status of the quest by its name:

Code: Select all

function getQuestStatus(_questname)
	-- Used when you need to make 3 way decision, get quest, complete quest or gather quest items.
	if (bot.IgfAddon == false) then
		error(language[1004], 0)	-- Ingamefunctions addon (igf) is not installed
	end

	if type(_questname) == "number" then
		_questname = GetIdName(_questname)
	end

	if type(_questname) == "string" then
		return RoMScript("igf_questStatus(\"".._questname.."\")")
	end

	error("Invalid id sent to getQuestStatus()")
end
The problem:
GetIdName(_questname) returnes the quest name with hieroglyphs instead of ä, ö ,ü (e.g. the picture below is representing our ä).
Sounds like a problem about encoding/charset.
Attachments
umlaut-ä.png
umlaut-ä.png (1.67 KiB) Viewed 1870 times

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

Re: Get quest status by ID - getQuestStatus(..) - not workin

#4 Post by rock5 » Wed Aug 10, 2011 7:33 am

So GetIdName returns the name with one character set and the in game functions use another?

I don't know about this stuff. I think you need Administrators input.
  • 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 8 guests