Page 3 of 4

Re: Energy of Justice

Posted: Fri Aug 24, 2012 2:45 pm
by Ego95
Ok, I think it would work fine, but I got a new problem. He should only check it, if he has got the kill quest. Now he checks it the whole script so if I have to open the two cages he starts killing mobs.
I tried this:

Code: Select all

function settings.profile.events.onLeaveCombat()
      questname_1 = "Beseitigt weitere Gefahren";

      queststate = getQuestStatus(questname_1)
      if queststate == "accepted" then
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
      end
end
But like I thought it isn't working. Do you know how I have to change it?

Re: Energy of Justice

Posted: Fri Aug 24, 2012 5:18 pm
by lisa
when you say it isn't working do you mean it gives an error?
you didn't have an end for the if "accepted" part.

try this

Code: Select all

function settings.profile.events.onLeaveCombat()
      questname_1 = "Beseitigt weitere Gefahren";

      queststate = getQuestStatus(questname_1)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
      end
end

Re: Energy of Justice

Posted: Fri Aug 24, 2012 7:55 pm
by Ego95
Yes, this is exactly how rock it has posted, the problem is, that the quest npc gives you one quest, if you complete it, an other and then the first quest again. So he only has to check the quest status of the first quest (questname_1). If he has accpted the questname_2 he should ignoe that onLeaveCombat setting.
That's why I used this part:

Code: Select all

queststate = getQuestStatus(questname_1)
         if queststate == "accepted" then
         if queststate == "complete" then
he should first check if it's the first quests that is accepted and then check the queststate.
Or do I have to use an "and" here?

Code: Select all

         if queststate == "accepted" and
         if queststate == "complete" then

Re: Energy of Justice

Posted: Fri Aug 24, 2012 8:54 pm
by lisa
I don't see how it can be both accepted and completed but anyway.

Code: Select all

        if queststate == "accepted" and queststate == "complete" then  
 
Didn't rock just add in new quest stuff to handle this?
http://www.solarstrike.net/phpBB3/viewt ... =30&t=4071

Re: Energy of Justice

Posted: Sat Aug 25, 2012 12:02 am
by rock5
I can't quite follow what you are saying but getQuestStatus can return the status of only one quest and it can only have one value "not accepted", "accepted" or "complete".

Re: Energy of Justice

Posted: Mon Nov 12, 2012 12:08 am
by do002
HI, for some reason when I started this way point it just went and tried to kill the vines and wild sigs around. I've tried starting the waypoint when I had the quest, without the quest and when I have the quest finished. None of which the waypoint did anything else apart from just killing the mobs. Please help

Re: Energy of Justice

Posted: Thu Sep 26, 2013 1:20 am
by AngelDrago
Has anyone perfected this John Carter?

Re: Energy of Justice

Posted: Thu Sep 26, 2013 2:42 am
by Bill D Cat
rock5 wrote:I can't quite follow what you are saying but getQuestStatus can return the status of only one quest and it can only have one value "not accepted", "accepted" or "complete".
Not true, as it returns "incomplete" as well.

Re: Energy of Justice

Posted: Thu Sep 26, 2013 9:36 am
by rock5
Sorry, I made a mistake. The 3 values it returns are: "complete", "incomplete" and "not accepted".

Re: Energy of Justice

Posted: Sat Oct 19, 2013 7:48 pm
by AngelDrago
i have tried all the scenarios and i still can not get him to accept the quests anything that i need to look forward too this is the script that I'm using

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
temp = 0
questname_1 = "Continue to Clean up the Threats to the Fishing Village";
questname_2 = "Immediate Relief";

    changeProfileOption("WAYPOINT_DEVIATION", 30);
   
    YourTargetScore = 6000

   function waitForEventStart()
      repeat
         yrest(1000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end

   function isEventFinished()
      local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
      return (Count ~= 2 or ScorePE >= YourTargetScore);
   end;
   
   changeOptionFriendMob("mob", "Ankes", "Add")
      
   if (not player:hasBuff("506684")) then   
      inventory:useItem(207200);
   end
                     
   if (not player:hasBuff("506686")) then   
      inventory:useItem(207202);
   end
</onload>

<onLeaveCombat>

questname_1 = "Continue to Clean up the Threats to the Fishing Village";

      queststate = getQuestStatus(questname_1)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
      end
   
</onLeaveCombat>
 
   <!-- #  1 --><waypoint x="-27521" z="24357" y="-83" type="RUN">
      waitForEventStart()
      isEventFinished()
      player:target_NPC("John Carter")
      CompleteAllQuests()
      yrest(2500)
            
      player:target_NPC("John Carter")    
      AcceptAllQuests()
      yrest(500)
      
      queststate = getQuestStatus(questname_1);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(2);
      end
      
      queststate = getQuestStatus(questname_2);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(17);
      end
         
      </waypoint>
   <!-- #  2 --><waypoint x="-27621" z="24327" y="-74" type="RUN">
      wallon()
      </waypoint>
   <!-- #  3 --><waypoint x="-27706" z="24256" y="-54" type="RUN">   </waypoint>
   <!-- #  4 --><waypoint x="-27627" z="24207" y="-10" type="RUN">   </waypoint>
   <!-- #  5 --><waypoint x="-27630" z="24154" y="0" type="RUN">   </waypoint>
   <!-- #  6 --><waypoint x="-27746" z="24102" y="1" type="RUN">
      walloff()
      </waypoint>
   <!-- #  7 --><waypoint x="-27857" z="24070" y="0">   
      </waypoint>
   <!-- #  8 --><waypoint x="-28026" z="24006" y="2">
      </waypoint>
   <!-- #  9 --><waypoint x="-28123" z="24018" y="6">
      </waypoint>
   <!-- # 10 --><waypoint x="-28215" z="23967" y="1">   </waypoint>
   <!-- # 11 --><waypoint x="-28308" z="24026" y="4">   </waypoint>
   <!-- # 12 --><waypoint x="-28094" z="23966" y="9">   </waypoint>
   <!-- # 13 --><waypoint x="-27962" z="24099" y="-5" tag="quest1complete"> </waypoint>
   <!-- # 14 --><waypoint x="-27771" z="24285" y="-83" type="RUN">   </waypoint>
   <!-- # 15 --><waypoint x="-27622" z="24369" y="-72" type="RUN">   </waypoint>
   <!-- # 16 --><waypoint x="-27526" z="24357" y="-83" type="RUN">
      player:target_NPC("John Carter")
      yrest(250)
      CompleteAllQuests()
      yrest(2500)
            
      player:target_NPC("John Carter")    
      AcceptAllQuests()
      yrest(500)
      
      queststate = getQuestStatus(questname_1);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(2);
      end
      
      queststate = getQuestStatus(questname_2);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(17);
      end
      </waypoint>
   <!-- # 17 --><waypoint x="-27582" z="24323" y="-79" type="RUN">
      wallon()
      </waypoint>
   <!-- # 18 --><waypoint x="-27704" z="24265" y="-55" type="RUN">   </waypoint>
   <!-- # 19 --><waypoint x="-27631" z="24214" y="-13" type="RUN">   </waypoint>
   <!-- # 20 --><waypoint x="-27640" z="24142" y="-2" type="RUN">   </waypoint>
   <!-- # 21 --><waypoint x="-27776" z="24084" y="1" type="RUN">
      walloff()
      </waypoint>
   <!-- # 22 --><waypoint x="-27864" z="24048" y="1"  type="RUN">      
      player:target_Object("Thieves' Prisoner");
      yrest(250)
      queststate = getQuestStatus(questname_2)
      if queststate == "incomplete" then
         __WPL:setWaypointIndex(22);
      end
      
      queststate = getQuestStatus(questname_2)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest2complete"));
      end
      </waypoint>
   <!-- # 24 --><waypoint x="-27944" z="23960" y="2" type="RUN">      
      player:target_Object("Thieves' Prisoner");
      yrest(250)
      queststate = getQuestStatus(questname_2)
      if queststate == "incomplete" then
         __WPL:setWaypointIndex(22);
      end
      
      queststate = getQuestStatus(questname_2)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest2complete"));
      end
      </waypoint>
   <!-- # 26 --><waypoint x="-27902" z="24038" y="2" type="RUN" tag="quest2complete">   </waypoint>
   <!-- # 27 --><waypoint x="-27800" z="24090" y="2" type="RUN">   </waypoint>
   <!-- # 28 --><waypoint x="-27684" z="24126" y="10" type="RUN">   </waypoint>
   <!-- # 29 --><waypoint x="-27555" z="24296" y="-80" type="RUN">   </waypoint>
   <!-- # 30 --><waypoint x="-27522" z="24360" y="-83" type="RUN">   </waypoint>
</waypoints>

Re: Energy of Justice

Posted: Sat Oct 19, 2013 11:24 pm
by rock5
AngelDrago wrote:i have tried all the scenarios and i still can not get him to accept the quests anything that i need to look forward too this is the script that I'm using
A bit of punctuation is that sentence would have helped.

What is it doing? What do you expect it to do?

I noticed one thing right away, you can't create a 'onleavecombat' section in a waypoint file. You can change the onleavecombat in the onload like this.

Code: Select all

	if oldOnLeaveCombat == nil then oldOnLeaveCombat = settings.profile.events.onLeaveCombat end
	function settings.profile.events.onLeaveCombat()
		if oldOnLeaveCombat then oldOnLeaveCombat() end
		queststate = getQuestStatus(questname_1)
		if queststate == "complete" then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
		end
	end
Put that inside the onload section.

Re: Energy of Justice

Posted: Fri Nov 22, 2013 10:34 am
by rido_knight
AngelDrago wrote:i have tried all the scenarios and i still can not get him to accept the quests anything that i need to look forward too this is the script that I'm using

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
temp = 0
questname_1 = "Continue to Clean up the Threats to the Fishing Village";
questname_2 = "Immediate Relief";

    changeProfileOption("WAYPOINT_DEVIATION", 30);
   
    YourTargetScore = 6000

   function waitForEventStart()
      repeat
         yrest(1000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end

   function isEventFinished()
      local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
      return (Count ~= 2 or ScorePE >= YourTargetScore);
   end;
   
   changeOptionFriendMob("mob", "Ankes", "Add")
      
   if (not player:hasBuff("506684")) then   
      inventory:useItem(207200);
   end
                     
   if (not player:hasBuff("506686")) then   
      inventory:useItem(207202);
   end
</onload>

<onLeaveCombat>

questname_1 = "Continue to Clean up the Threats to the Fishing Village";

      queststate = getQuestStatus(questname_1)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
      end
   
</onLeaveCombat>
 
   <!-- #  1 --><waypoint x="-27521" z="24357" y="-83" type="RUN">
      waitForEventStart()
      isEventFinished()
      player:target_NPC("John Carter")
      CompleteAllQuests()
      yrest(2500)
            
      player:target_NPC("John Carter")    
      AcceptAllQuests()
      yrest(500)
      
      queststate = getQuestStatus(questname_1);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(2);
      end
      
      queststate = getQuestStatus(questname_2);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(17);
      end
         
      </waypoint>
   <!-- #  2 --><waypoint x="-27621" z="24327" y="-74" type="RUN">
      wallon()
      </waypoint>
   <!-- #  3 --><waypoint x="-27706" z="24256" y="-54" type="RUN">   </waypoint>
   <!-- #  4 --><waypoint x="-27627" z="24207" y="-10" type="RUN">   </waypoint>
   <!-- #  5 --><waypoint x="-27630" z="24154" y="0" type="RUN">   </waypoint>
   <!-- #  6 --><waypoint x="-27746" z="24102" y="1" type="RUN">
      walloff()
      </waypoint>
   <!-- #  7 --><waypoint x="-27857" z="24070" y="0">   
      </waypoint>
   <!-- #  8 --><waypoint x="-28026" z="24006" y="2">
      </waypoint>
   <!-- #  9 --><waypoint x="-28123" z="24018" y="6">
      </waypoint>
   <!-- # 10 --><waypoint x="-28215" z="23967" y="1">   </waypoint>
   <!-- # 11 --><waypoint x="-28308" z="24026" y="4">   </waypoint>
   <!-- # 12 --><waypoint x="-28094" z="23966" y="9">   </waypoint>
   <!-- # 13 --><waypoint x="-27962" z="24099" y="-5" tag="quest1complete"> </waypoint>
   <!-- # 14 --><waypoint x="-27771" z="24285" y="-83" type="RUN">   </waypoint>
   <!-- # 15 --><waypoint x="-27622" z="24369" y="-72" type="RUN">   </waypoint>
   <!-- # 16 --><waypoint x="-27526" z="24357" y="-83" type="RUN">
      player:target_NPC("John Carter")
      yrest(250)
      CompleteAllQuests()
      yrest(2500)
            
      player:target_NPC("John Carter")    
      AcceptAllQuests()
      yrest(500)
      
      queststate = getQuestStatus(questname_1);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(2);
      end
      
      queststate = getQuestStatus(questname_2);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(17);
      end
      </waypoint>
   <!-- # 17 --><waypoint x="-27582" z="24323" y="-79" type="RUN">
      wallon()
      </waypoint>
   <!-- # 18 --><waypoint x="-27704" z="24265" y="-55" type="RUN">   </waypoint>
   <!-- # 19 --><waypoint x="-27631" z="24214" y="-13" type="RUN">   </waypoint>
   <!-- # 20 --><waypoint x="-27640" z="24142" y="-2" type="RUN">   </waypoint>
   <!-- # 21 --><waypoint x="-27776" z="24084" y="1" type="RUN">
      walloff()
      </waypoint>
   <!-- # 22 --><waypoint x="-27864" z="24048" y="1"  type="RUN">      
      player:target_Object("Thieves' Prisoner");
      yrest(250)
      queststate = getQuestStatus(questname_2)
      if queststate == "incomplete" then
         __WPL:setWaypointIndex(22);
      end
      
      queststate = getQuestStatus(questname_2)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest2complete"));
      end
      </waypoint>
   <!-- # 24 --><waypoint x="-27944" z="23960" y="2" type="RUN">      
      player:target_Object("Thieves' Prisoner");
      yrest(250)
      queststate = getQuestStatus(questname_2)
      if queststate == "incomplete" then
         __WPL:setWaypointIndex(22);
      end
      
      queststate = getQuestStatus(questname_2)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest2complete"));
      end
      </waypoint>
   <!-- # 26 --><waypoint x="-27902" z="24038" y="2" type="RUN" tag="quest2complete">   </waypoint>
   <!-- # 27 --><waypoint x="-27800" z="24090" y="2" type="RUN">   </waypoint>
   <!-- # 28 --><waypoint x="-27684" z="24126" y="10" type="RUN">   </waypoint>
   <!-- # 29 --><waypoint x="-27555" z="24296" y="-80" type="RUN">   </waypoint>
   <!-- # 30 --><waypoint x="-27522" z="24360" y="-83" type="RUN">   </waypoint>
</waypoints>

Bot gives error :/

Image

Re: Energy of Justice

Posted: Fri Nov 22, 2013 1:53 pm
by Bill D Cat
You probably don't have the required userfunction file installed.


Lisa's userfunction_profilechange: http://solarstrike.net/phpBB3/viewtopic ... 6&start=24

Re: Energy of Justice

Posted: Fri Nov 22, 2013 5:17 pm
by rido_knight
Bill D Cat wrote:You probably don't have the required userfunction file installed.


Lisa's userfunction_profilechange: http://solarstrike.net/phpBB3/viewtopic ... 6&start=24

Yeah i dont have this Function. I ll try tomorrow Thanks for help

Re: Energy of Justice

Posted: Sat Nov 23, 2013 5:47 am
by rido_knight
i am freaking out because bot take quest2 but go to quest1 waypoint.

Code: Select all

queststate = getQuestStatus(questname_1);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(2);
      end
      
      queststate = getQuestStatus(questname_2);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(17);
      end
bot this code skip i guess..im change 17 to 21 or index 2 to 9..whatever its going to go 2.waypoint




EDİT:I did it..i changed ;

if queststate == "accepted" then to if queststate == "incomplete" then it works great..

Re: Energy of Justice

Posted: Mon Dec 02, 2013 6:40 am
by rido_knight
Bot didnt wait when event finished.Add some function but didnt change anything also this function cause it crazy :D bot take quest 1 but go to quest 2 waypoint etc..Anyone has a good work one this John Carter quest's ? or help

note:im using dailynotes so delete questaccept lines

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>

questname_1 = "Continue to Clean up the Threats to the Fishing Village";
questname_2 = "Immediate Relief";

    changeProfileOption("WAYPOINT_DEVIATION", 30);
   
    YourTargetScore = 6000

   function waitForEventStart()
      repeat
         yrest(1000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end

   function isEventFinished()
       local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
       if Count ~= 2 or ScorePE >= YourTargetScore then
         __WPL:setForcedWaypointType("RUN")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
      end
   end

function checkCondition()
	  queststate = getQuestStatus(questname_1);
	   if queststate == "complete" then
		 player:mount();
		__WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
	   end
   end
	changeOptionFriendMob("mob", "Ankes Warrior" , "Add")
	changeOptionFriendMob("mob", "Ankes Agent" , "Add")
	changeOptionFriendMob("mob", "Ankes Healer", "Add")
	changeOptionFriendMob("mob", "Ankes Bomber", "Add")

   
    function checkLoopCondition()
	  queststate = getQuestStatus(questname_1);
	   if queststate ~= "complete" then
		__WPL:setWaypointIndex(__WPL:findWaypointTag("startKilling"));
	   end
    end
      
    
   
</onload>


   
 
   <!-- #  1 --><waypoint x="-27521" z="24357" y="-83" tag="WP1">
      waitForEventStart()
	  isEventFinished()
      player:target_NPC("John Carter")
       yrest(100)
            
      player:target_NPC("John Carter")    
       yrest(100)
	  
      queststate = getQuestStatus("Continue to Clean up the Threats to the Fishing Village");
	  if queststate == "incomplete" then
		player:mount();
		__WPL:setWaypointIndex(2);
	  end
	  
      queststate = getQuestStatus("Immediate Relief");
      if queststate == "incomplete" then
		player:mount();
		__WPL:setWaypointIndex(17);
	  end
         
      </waypoint>
   <!-- #  2 --><waypoint x="-27621" z="24327" y="-74" type ="TRAVEL" >
      wallon()
      </waypoint>
   <!-- #  3 --><waypoint x="-27706" z="24256" y="-54" type ="TRAVEL">     </waypoint>
   <!-- #  4 --><waypoint x="-27627" z="24207" y="-10" type ="TRAVEL">      </waypoint>
   <!-- #  5 --><waypoint x="-27630" z="24154" y="0" type ="TRAVEL">     </waypoint>
   <!-- #  6 --><waypoint x="-27746" z="24102" y="1" type ="TRAVEL">
      walloff()
      </waypoint>
   <!-- #  7 --><waypoint x="-27857" z="24070" y="0" tag="startKilling">
   
   checkCondition() 
   
   </waypoint>
   <!-- #  8 --><waypoint x="-28026" z="24006" y="2">
   
   checkCondition() 
   
   </waypoint>
   <!-- #  9 --><waypoint x="-28123" z="24018" y="6">
   
   checkCondition() 
   
   </waypoint>
   <!-- # 10 --><waypoint x="-28215" z="23967" y="1">
   
   checkCondition() 
   
   </waypoint>
   <!-- # 11 --><waypoint x="-28308" z="24026" y="4">
   
   checkCondition() 
   
   </waypoint>
   <!-- # 12 --><waypoint x="-28094" z="23966" y="9">
   
   checkLoopCondition()
   
   
   </waypoint>
   <!-- # 13 --><waypoint x="-27962" z="24099" y="-5" tag="quest1complete" type="TRAVEL"> 
						
	player:mount() 
	
	</waypoint>
   <!-- # 14 --><waypoint x="-27771" z="24285" y="-83" type ="TRAVEL">      </waypoint>
   <!-- # 15 --><waypoint x="-27622" z="24369" y="-72" type ="TRAVEL">      </waypoint>
   <!-- # 16 --><waypoint x="-27526" z="24357" y="-83" type ="TRAVEL">
      player:target_NPC("John Carter")
      yrest(100)
            
      player:target_NPC("John Carter")    
       yrest(100)
      
      queststate = getQuestStatus(questname_1);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(2);
      end
      
      queststate = getQuestStatus(questname_2);
      if queststate == "accepted" then
         __WPL:setWaypointIndex(17);
      end
	  
      </waypoint>
   <!-- # 17 --><waypoint x="-27582" z="24323" y="-79" type="RUN" tag="gorev2">
      wallon()
      </waypoint>
   <!-- # 18 --><waypoint x="-27704" z="24265" y="-55" type ="TRAVEL">   </waypoint>
   <!-- # 19 --><waypoint x="-27631" z="24214" y="-13" type ="TRAVEL">   </waypoint>
   <!-- # 20 --><waypoint x="-27640" z="24142" y="-2" type ="TRAVEL">   </waypoint>
   <!-- # 21 --><waypoint x="-27776" z="24084" y="1" type ="TRAVEL">
      walloff()
      </waypoint>
   <!-- # 22 --><waypoint x="-27864" z="24048" y="1"  type ="TRAVEL">      
      player:target_Object("Thieves' Prisoner");
      yrest(100)
      queststate = getQuestStatus(questname_2)
      if queststate == "incomplete" then
         __WPL:setWaypointIndex(22);
      end
      
      queststate = getQuestStatus(questname_2)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest2complete"));
      end
      </waypoint>
   <!-- # 24 --><waypoint x="-27944" z="23960" y="2" type ="TRAVEL">      
      player:target_Object("Thieves' Prisoner");
      yrest(100)
      queststate = getQuestStatus(questname_2)
      if queststate == "incomplete" then
         __WPL:setWaypointIndex(22);
      end
      
      queststate = getQuestStatus(questname_2)
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest2complete"));
      end
      </waypoint>
   <!-- # 26 --><waypoint x="-27902" z="24038" y="2" type="RUN" tag="quest2complete"> player:mount();  </waypoint>
   <!-- # 27 --><waypoint x="-27800" z="24090" y="2" type="RUN">   </waypoint>
   <!-- # 28 --><waypoint x="-27684" z="24126" y="10" type="RUN">   </waypoint>
   <!-- # 29 --><waypoint x="-27555" z="24296" y="-80" type="RUN">   </waypoint>
   <!-- # 30 --><waypoint x="-27522" z="24360" y="-83" type="RUN">   </waypoint>
</waypoints>

Re: Energy of Justice

Posted: Mon Dec 02, 2013 7:09 am
by rock5
You need to understand that setWaypointIndex doesn't immediately go to that waypoint, it only sets the next waypoint it is going to go to. If the first quest is "incomplete" and it sets the waypoint index to 2, it will then finish the code in the waypoint that checks the second quest. If the second quest is also "incomplete" then the waypoint index will be set to 17. The eay way to fix it is to add a return after setting the waypoint index.

Code: Select all

      __WPL:setWaypointIndex(2);
      return
That will cause it to immediately exit the waypoint and not execute any further code there.

You can also use an 'else' between the if statements so it only does one or the other. eg.

Code: Select all

      queststate1 = getQuestStatus(questname_1);
      queststate2 = getQuestStatus(questname_2);
      if queststate1 == "incomplete" then
         ...
      elseif queststate2 == "incomplete" then
         ...
      end

Re: Energy of Justice

Posted: Mon Dec 02, 2013 8:04 am
by rido_knight
rock5 wrote:You need to understand that setWaypointIndex doesn't immediately go to that waypoint, it only sets the next waypoint it is going to go to. If the first quest is "incomplete" and it sets the waypoint index to 2, it will then finish the code in the waypoint that checks the second quest. If the second quest is also "incomplete" then the waypoint index will be set to 17. The eay way to fix it is to add a return after setting the waypoint index.

Code: Select all

      __WPL:setWaypointIndex(2);
      return
That will cause it to immediately exit the waypoint and not execute any further code there.

You can also use an 'else' between the if statements so it only does one or the other. eg.

Code: Select all

      queststate1 = getQuestStatus(questname_1);
      queststate2 = getQuestStatus(questname_2);
      if queststate1 == "incomplete" then
         ...
      elseif queststate2 == "incomplete" then
         ...
      end
:mrgreen: sorry master forgot again and thanks for help ^_^ i ll try it.i hope so waitevent function works now :D

Re: Energy of Justice

Posted: Tue Dec 03, 2013 2:08 pm
by murmanov
IMPORTANT!!!
FOR ALL THE SEARCHING ONES^^


after the waypoint didn't work for me and i know how it is to search the problem in all the millions of posts, although the others could just upload the fixed version, which would make it much more easier, i decided to upload my version^^

i think it should work for everybody (with every language client, not just with the english version)

i hope you enjoy ;)

P.S.: I'm sorry for my bad english^^

Re: Energy of Justice

Posted: Wed Dec 04, 2013 2:40 am
by rido_knight
murmanov wrote:IMPORTANT!!!
FOR ALL THE SEARCHING ONES^^


after the waypoint didn't work for me and i know how it is to search the problem in all the millions of posts, although the others could just upload the fixed version, which would make it much more easier, i decided to upload my version^^

i think it should work for everybody (with every language client, not just with the english version)

i hope you enjoy ;)

P.S.: I'm sorry for my bad english^^
Thanks buro i ll test it today.