Page 1 of 1

Problem With getQuestStatus

Posted: Sun Aug 10, 2014 7:54 am
by NonAnon
Hello!

I just started my adventure with micromacro. I never before used lua or other scripting languages.
For now i just tried to make Waypoints for "Earn a Reputation" daily in Heffner.
My Problem occurs on Load.
From Micromacro:

Code: Select all

We use the normal waypoint path The Smile Shop.xml now.
haltOnError:    false
The game client did not crash.
2014-08-10 14:25:17 - ...ownloads/micromacro/scripts/rom/classes/waypointlist.lu
a:25: XML Parse Error.
File: .../micromacro/scripts/rom/waypoints/The Smile Shop.xml
Line: 3
Column: 33
Pos: 160
Message: not well-formed (invalid token)
From The Smile Shop.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<!-- #  1 --><waypoint x="-7083" z="-4110" y="189" tag="Main>
	if( getQuestStatus(423776) == "complete" ) then
	    player:target_NPC(117410) -- Hugope
	    CompleteQuestByName(423776) -- Earn a Reputation
          end
	 local dqCount, dqPerDay = RoMScript("Daily_count()");
       if dqCount == 10 then
               player:sleep();	 
	 else
		player:target_NPC(117410) -- Hugope
		AcceptQuestByName(423776) -- Earn a Reputation
	 end
	</waypoint>
Anybody helps? I used same

Code: Select all

if( getQuestStatus(id) == "complete" ) then
In other Waypoint, and it works correctly...

Sorry for my Bad English : P

Re: Problem With getQuestStatus

Posted: Sun Aug 10, 2014 8:12 am
by BlubBlab
You didn't close the XML, the lua functions are OK.

Your Main tag miss the second "

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<!-- #  1 --><waypoint x="-7083" z="-4110" y="189" tag="Main">
   if( getQuestStatus(423776) == "complete" ) then
       player:target_NPC(117410) -- Hugope
       CompleteQuestByName(423776) -- Earn a Reputation
          end
    local dqCount, dqPerDay = RoMScript("Daily_count()");
       if dqCount == 10 then
               player:sleep();   
    else
      player:target_NPC(117410) -- Hugope
      AcceptQuestByName(423776) -- Earn a Reputation
    end
   </waypoint>

Re: Problem With getQuestStatus

Posted: Sun Aug 10, 2014 10:58 am
by NonAnon
My god, I knew that it must be some of this kind, but I couldn't find it. Thanks!
Now it works perfectly.