Page 1 of 1

CompleteQuest problem

Posted: Tue Sep 28, 2010 7:12 pm
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"?

Re: CompleteQuest problem

Posted: Tue Sep 28, 2010 7:20 pm
by Administrator

Code: Select all

sendMacro("CompleteQuest();");
You're generating a syntax error. Remove the semi-colon.

Re: CompleteQuest problem

Posted: Tue Sep 28, 2010 9:27 pm
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.