What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Loop check for questing

mykitty

New Member
Joined
Dec 17, 2011
Messages
186
Reaction score
0
Is it possible to do loop check for question right now??

So far I have only seen if statement being use.

However if the bot missed it (lag/comp freeze) then it will miss it, making the bot stuck because it missed previous step (talking to npc, using a waypoint)

And I have running in to the problems of getting stuck due to that reason.

The only way I am getting around this is to create several if statement block (5+) in hope that by checking it a few more times it will manage to correct itself.'

I would really appreciate any input in this matter.
 
Hey thanks for the input AutomaticCoding,

Does that just make the if statement build into the move/interact statement itself?

or will it keep checking until that if statement is met?

I am incline to believe it is the former from what I can observe from the bot actions.
 
Hey thanks for the input AutomaticCoding,

Does that just make the if statement build into the move/interact statement itself?

or will it keep checking until that if statement is met?

I am incline to believe it is the former from what I can observe from the bot actions.

Pretty sure it just adds an if statement. Try, add at the end:

<If Condition="//quest Done" //>
<LeaveGame reason="Done" />
</If>

so that it'll just continue to loop round if one step isn't done.
 
Loops are possible, but once an instruction has been 'entered', as in starting to execute, DB will in my experience be stuck there until:
#1 The instruction completes
#2 The quest/step of the step it's in no longer matches the quest/step of the player

..so while if's and while's are useful, there are still situations where other means are necessary. Don't underestimate the quest/step flags, for doing quest related things.

That said, here's an example of a loop:
<!-- So long as we're still on the cellar fight part of the quest.. -->
<While condition="IsActiveQuest(93396) and IsActiveQuestStep(30)" >
<!-- Re-enter the cellar if we die -->
<While condition="Me.WorldDynamicId == 1999568897" >
<UseObject actorId="176008" x="1294.922" y="420.7737" z="162.1742" name="Cellar entrance" />
</While>
<!-- Free the real captain from the cage -->
<While condition="Me.WorldDynamicId == 1999634434" >
<UseObject questId="93396" stepId="30" actorId="185284" x="163.2785" y="173.681" z="0.1" name="Locked cage" />
<WaitTimer questId="93396" stepId="30" waitTime="20000" />
<UseObject questId="93396" stepId="30" actorId="185284" x="163.2785" y="173.681" z="0.1" name="Locked cage" />
<WaitTimer questId="93396" stepId="30" waitTime="20000" />
<UseObject questId="93396" stepId="30" actorId="185284" x="163.2785" y="173.681" z="0.1" name="Locked cage" />
<WaitTimer questId="93396" stepId="30" waitTime="20000" />
</While>
</While>

Edit: For bonus points, notice how in this example I have some very long waits..that will immediately be skipped once the quest advances beyond where they are needed. Magic!
 
Last edited:
Back
Top