CompleteQuest problem

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

CompleteQuest problem

#1 Post by Alkaiser »

I'm having trouble getting the CompleteQuest() function working in my waypoint file. /run CompleteQuest() works in-game, but for some reason this doesn't:

Code: Select all

if( queststate == "complete" ) then
	player:target_NPC("Vega"); -- Owner of the Armor Shop in Varanas
	yrest(2000);
	sendMacro("CompleteQuest();");
	yrest(2000);			
end
There are no error messages, and I have it working with a different NPC (Dell in Logar) just fine. What's the deal? Is it because Vega has a chat option "Introduction to the armor shop"?
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: CompleteQuest problem

#2 Post by Administrator »

Code: Select all

sendMacro("CompleteQuest();");
You're generating a syntax error. Remove the semi-colon.
Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: CompleteQuest problem

#3 Post by Alkaiser »

Okay, problem resolved. It was because I didn't call OnClick_QuestListButton() before CompleteQuest().

Code: Select all

repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if( queststate == "complete" ) then
	player:target_NPC("Vega"); yrest(1500);
	sendMacro("OnClick_QuestListButton(3,1)"); yrest(1500);         
	sendMacro("CompleteQuest()"); yrest(1500);
	sendMacro("CloseWindows()"); yrest(1500);
end
Dell in Logar doesn't need this function because the completed quest pops up right away.
Post Reply