Page 1 of 1

Trouble with combat setup

Posted: Mon Aug 01, 2011 9:53 pm
by weirdo69
I am having difficulty getting this setup right. I am accepting a quest then walking down and engaging enemies, which works fine. The problem is even after the quest completes the bot continues to attack, how do I break the cycle? Here is what I have done so far. Any ideas would be appreciated, I searched and tried for nearly 3 hours already :(.

Code: Select all

	<!-- # 76 --><waypoint x="-7429" z="-3819" y="148">		
				player:target_NPC("Cheryl Heffner");
				CompleteQuestByName(Battle);
				player:target_NPC("Cheryl Heffner");
				AcceptQuestByName(Eliminate);				
	</waypoint>
	<!-- # 80 --><waypoint x="-7559" z="-3918" y="140">	</waypoint>
	<!-- # 81 --><waypoint x="-7585" z="-4020" y="127">	</waypoint>
	<!-- # 82 --><waypoint x="-7640" z="-4187" y="128" tag = "Pirates">	
	</waypoint>
	<!-- # 83 --><waypoint x="-7565" z="-4169" y="127">	
	queststate = getQuestStatus("Eliminate the Spies")
			if queststate == "incomplete" then
			__WPL:setForcedWaypointType("NORMAL");
			__WPL:setWaypointIndex(__WPL:findWaypointTag("Pirates"));
			end
	</waypoint>
	<!-- # 86 --><waypoint x="-7515" z="-3739" y="148">	</waypoint>
	__WPL:setForcedWaypointType();
</waypoints>
I also attempted to use a mob kill count but not sure how to nest arguments since 2 mobs are involved.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
	<onLoad>settings.profile.mobs = {"Lurking Pirate", "Sly Pirate"};</onLoad>
	<!-- #  1 --><waypoint x="-7515" z="-3916" y="139" type="TRAVEL"> </waypoint>
	<!-- #  2 --><waypoint x="-7619" z="-4019" y="128" type="TRAVEL"> </waypoint>
	<!-- #  3 --><waypoint x="-7646" z="-4020" y="128" type="TRAVEL"> </waypoint>
	<!-- #  4 --><waypoint x="-7648" z="-4016" y="129" type="TRAVEL"> </waypoint>
	<!-- #  5 --><waypoint x="-7550" z="-3968" y="133" type="NORMAL" tag = "Pirates"> </waypoint>
	<!-- #  6 --><waypoint x="-7503" z="-3861" y="147" type="TRAVEL"> 
	if( player.mobs["Sly Pirates"] > 2) 
	then
	else __WPL:setWaypointIndex(__WPL:findWaypointTag("Pirates"));	
	end
	</waypoint>
	<!-- #  7 --><waypoint x="-7426" z="-3825" y="148" type="TRAVEL">	</waypoint>
</waypoints>
Thanks in advance.

Re: Trouble with combat setup

Posted: Wed Aug 03, 2011 11:00 am
by SpiralV
I corrected all the errors I've found

Code: Select all

   <!-- # 76 --><waypoint x="-7429" z="-3819" y="148">      
            player:target_NPC("Cheryl Heffner");
            CompleteQuestByName(Battle);          --no string??
            player:target_NPC("Cheryl Heffner");
            AcceptQuestByName(Eliminate);          --no string??  
   </waypoint>
   <!-- # 80 --><waypoint x="-7559" z="-3918" y="140">   </waypoint>
   <!-- # 81 --><waypoint x="-7585" z="-4020" y="127">   </waypoint>
   <!-- # 82 --><waypoint x="-7640" z="-4187" y="128" tag = "Pirates">   
   </waypoint>
   <!-- # 83 --><waypoint x="-7565" z="-4169" y="127">   
   local queststate = getQuestStatus("Eliminate the Spies")      --a local variable is better
         if queststate == "incomplete" then
         __WPL:setForcedWaypointType("NORMAL");
         __WPL:setWaypointIndex(__WPL:findWaypointTag("Pirates"));
         end
   </waypoint>
   <!-- # 86 --><waypoint x="-7515" z="-3739" y="148">   </waypoint>
   __WPL:setForcedWaypointType(""); --nothing is nil "" is a empty string
</waypoints>

Re: Trouble with combat setup

Posted: Wed Aug 03, 2011 11:39 am
by weirdo69
The no string is why it has been accepting/completing all quests and not necessarily the one called out?

Not clear about the local variable...what exactly should I be doing?
I managed to get the profile to work by strategic use of range setting etc. but I am still trying to find a method to check conditions between mobs while at the same waypoint if that makes sense.

Thanks for the help hopefully the quest part will work better now.