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

IF statement , UseWaypoint , DEATH handling? bug or?

buddybuddy

New Member
Joined
Aug 7, 2012
Messages
62
Reaction score
0
it seems the DB is not following instruction from my script particularly when using "IF" condition very well, yes it does what is told to do but when the condition is changed it doesnt follow, my script is program that IF im in town it will use the waypoint, however when the toon dies, and my toon revived "NOT" in town, it "STILL" uses waypoint ,, what gives??? I watched all my runs with this script, and 90% of the time the IF condition failed, well atleast for me,
i also found a little similar thread to mine, http://www.thebuddyforum.com/demonbuddy-forum/developers/63865-usewaypoint-profile-parser-bug.html
however im not really sure if this is a bug or im doing it wrong, but i think theres nothing wrong with the script,
its just a simple "IF" statement, pls point me in the right direction if im doing it wrong or atleast enlighten me.
MORE POWER DEMONBUDDY



note: i tested again.. both
PHP:
<If condition="Me.IsInTown">
<If condition="Me.IsInTown==True">
produce this bug or ... ?
im using Demonbuddy 1.0.843.199, 0 plugins loaded,
tested also with gilesworldobjecthandler plugin ON (i think this is irrelevant)

my script

PHP:
<Profile>
	<Name>jay-1-highlands-crossing-1</Name>
	  <GameParams quest="72801" step="-1" act="A1" difficulty="Nightmare" resumeFromSave="True" isPrivate="True" numGames="-1"  />

  <Order>
	<WriteReport/>
		<If condition="Me.IsInTown==True">   
				<UseWaypoint questId="72801" stepId="-1" x="2981.73" y="2835.009" z="24.90835" levelArea="1999503360"  actorId="223757" waypointNumber="11" />
				<WaitTimer questId="1"  waitTime="1000"/>  
		</If>
					<WaitTimer questId="1"  waitTime="1000"/>  
					<MoveTo questId="1" x="2316.152" y="4799.38" z="1.280543" pathPrecision="15" />
					<WaitTimer questId="1"  waitTime="1000"/>  
					
							<!-- GOING TO THE BRIDGE -->
					<MoveTo questId="1" x="2382.422" y="4841.432" z="-0.7079395" pathPrecision="5" />
					<MoveTo questId="1" x="2388.069" y="4797.327" z="5.431834" pathPrecision="5" />
					<MoveTo questId="1" x="2383.656" y="4627.497" z="0.1131324" pathPrecision="5" />
					
					<!-- <MoveTo questId="1" x="2334.68" y="4422.688" z="0.1000157" pathPrecision="15" /> -->
					<!-- <MoveTo questId="1" x="1869.043" y="4439.779" z="0.1000007" pathPrecision="15" /> --> 
					<!-- <MoveTo questId="1" x="2324.68" y="4420.688" z="0.1000157" pathPrecision="15" /> -->
															
					<MoveTo questId="1" x="2467.278" y="3944.334" z="0.1" pathPrecision="15" />
					<MoveTo questId="1" x="2002.511" y="3971.922" z="0.1" pathPrecision="15" />
					<MoveTo questId="1" x="1999.248" y="4193.507" z="0.1000311" pathPrecision="15" />
					<WaitTimer questId="1"  waitTime="10000"/>  
					
					<UseTownPortal questId="1" />
					<WaitTimer questId="1"  waitTime="10000"/>  
										
					<LeaveGame reason="I have finished the run." />
		<MoveTo />
		
  </Order>	
  <KillMonsters>True</KillMonsters>
	<PickupLoot>True</PickupLoot>
</Profile>


LOG:



Blacklisting 89AB0086 for 00:10:00
[10:05:11.470 V] Using power Walk clickPos:<2238.029, 3949.888, 0.1000005> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:15.002 N] Player died
[10:05:15.006 N] Clicked revive button
[10:05:18.312 N] Player died, Resetting caches.
[10:05:18.318 D] Resetting current behavior.
[10:05:18.319 N] Player died, Resetting caches.
[10:05:18.319 D] Resetting current behavior.
[10:05:18.319 N] Player died, Resetting caches.
[10:05:18.319 D] Resetting current behavior.
[10:05:18.320 D] Calling OnDone() on current behavior. MoveToTag: X: 2002.511, Y: 3971.922, Z: 0.1, PathPrecision: 15, Position: <2002.511, 3971.922, 0.1>, UnsafeRandomDistance: 0, Name: null, IsDone: False, QuestId: 1, StepId: 0, QuestName: Quest Id: 1, IsDoneCache: False, Behavior: Zeta.TreeSharp.PrioritySelector,
[10:05:18.320 D] Navigator.Clear
[10:05:18.489 D] [WorldObjectHandler] Blacklisting a container [LootType2_Adventurer_B_Corpse_02-4756] because we never want to open it.
[10:05:18.489 V] Blacklisting 89B80081 for 00:10:00
[10:05:18.490 D] [WorldObjectHandler] Blacklisting a world object [Waypoint-4753] because it was an unknown object type.
[10:05:18.490 V] Blacklisting 89B50086 for 00:10:00
[10:05:18.492 D] [WorldObjectHandler] Blacklisting a container [LootType2_Adventurer_B_Corpse_02-4755] because we never want to open it.
[10:05:18.492 V] Blacklisting 89B70020 for 00:10:00
[10:05:18.494 N] ###################### REPORT ######################
[10:05:18.497 N] Gold: 218990
[10:05:18.507 N] Blues: 20
[10:05:18.519 N] Yellows: 0
[10:05:18.532 N] Legendaries: 0
[10:05:18.541 N] Set items: 0
[10:05:18.541 N] ####################################################
[10:05:18.735 D] Replaced hook [ProfileOrderBehavior_Hook] bddc65ff-2778-49e1-bb47-1a5648b7bea3
[10:05:18.769 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:18.773 D] Raycast path generated.
[10:05:18.773 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 1 hops.
[10:05:18.778 V] Using power Wizard_Teleport clickPos:<2981.73, 2835.009, 24.90835> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:20.183 V] Using power Walk clickPos:<2981.73, 2835.009, 24.90835> worldDynamicId:1999503360 targetACDGuid:-1

[10:05:22.965 D] [Stuck Handler] We're stuck at <2314.432, 4753.634, -0.7237789>
[10:05:22.971 D] Navigator.Clear
[10:05:22.971 V] Using power Walk clickPos:<2324.432, 4753.634, -0.7237789> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:24.617 D] [WorldObjectHandler] Blacklisting a container [LootType2_Adventurer_B_Corpse_02-4779] because we never want to open it.
[10:05:24.617 V] Blacklisting 89CF0081 for 00:10:00
[10:05:24.652 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:25.004 D] Waiting for path request to finish...
[10:05:25.177 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:25.180 D] Waiting for path request to finish...
[10:05:25.349 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:25.355 D] Waiting for path request to finish...
[10:05:25.547 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:25.561 D] Waiting for path request to finish...
[10:05:25.724 D] Navigator.Clear
[10:05:25.889 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:25.893 D] Waiting for path request to finish...
[10:05:25.925 N] Path with 2 hops received (partial: True)
[10:05:26.056 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:26.056 V] Path with 2 hops received (partial: True)
[10:05:26.064 D] Nav Service path generated.
[10:05:26.064 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 2 hops.
[10:05:26.064 V] Using power Walk clickPos:<2319, 4752, -0.9422264> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:28.931 D] [Stuck Handler] We're stuck at <2319.084, 4756.386, -0.5744729>
[10:05:28.949 D] Navigator.Clear
[10:05:28.949 V] Using power Walk clickPos:<2328.481, 4759.806, -0.5744729> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:30.637 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:30.643 D] Waiting for path request to finish...
[10:05:30.849 D] Navigator.Clear
[10:05:31.009 N] Path with 2 hops received (partial: True)
[10:05:31.068 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:31.082 V] Path with 2 hops received (partial: True)
[10:05:31.082 D] Nav Service path generated.
[10:05:31.082 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 2 hops.
[10:05:31.082 V] Using power Walk clickPos:<2319, 4752, -0.9422264> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:35.008 D] [Stuck Handler] We're stuck at <2319.36, 4756.435, -0.575928>
[10:05:35.113 D] Navigator.Clear
[10:05:35.113 V] Using power Walk clickPos:<2328.757, 4759.855, -0.575928> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:36.785 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:36.885 D] Waiting for path request to finish...
[10:05:37.071 D] Navigator.Clear
[10:05:37.242 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[10:05:37.246 N] Path with 2 hops received (partial: True)
[10:05:37.263 D] Nav Service path generated.
[10:05:37.263 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 2 hops.
[10:05:37.263 V] Using power Walk clickPos:<2319, 4752, -0.9422264> worldDynamicId:1999503360 targetACDGuid:-1
[10:05:38.048 D] Start/Stop Button Clicked!

View attachment 50371
 
If I am not mistaken db restarts your profile on death. One way you can fix this if it's true is put if condition me.isintown = false. Teleport to town. Then it will always pick back up with ur current script of me in town = true.

As for why it ignores your if statement, I can't give any insight to that. Hope I helped you in some way best of luck bro
 
If I am not mistaken db restarts your profile on death. One way you can fix this if it's true is put if condition me.isintown = false. Teleport to town. Then it will always pick back up with ur current script of me in town = true.

As for why it ignores your if statement, I can't give any insight to that. Hope I helped you in some way best of luck bro



thanks a lot, your post really help,
however, private profile creators may not take that route, (well atleast for me) due to the toon produces bot like behavior, that may result to the eye of blizzard looking into... patterns such as TOWN - WAYPOINT - FIGHT - DIES - ->TELEPORT<- - TOWN - WAYPOINT - FIGHT - DIES.. etc, looks pretty obvious, i mean a human doesn't need the town JUST to get back and fight the elite who killed it ....

for the devs.. the simple "IF" statement should function even if DB restarts the profile... or im doing it wrong? i dont see the problem in there other than IF statement not being followed.... anyone?


ok, ive done what teamxmod says, changed my profile into this...

PHP:
<If condition="Me.IsInTown==True">		
				<UseWaypoint questId="72801" stepId="-1" x="2981.73" y="2835.009" z="24.90835" levelArea="1999503360"  actorId="223757" waypointNumber="11" />
				<WaitTimer questId="1"  waitTime="1000"/>  
		</If>
		
		<If condition="Me.IsInTown==False">
					<WaitTimer questId="1"  waitTime="1000"/>  
					<MoveTo questId="1" x="2316.152" y="4799.38" z="1.280543" pathPrecision="15" />
					<WaitTimer questId="1"  waitTime="1000"/>  
					
							<!-- GOING TO THE BRIDGE -->
					<MoveTo questId="1" x="2382.422" y="4841.432" z="-0.7079395" pathPrecision="5" />
					<MoveTo questId="1" x="2388.069" y="4797.327" z="5.431834" pathPrecision="5" />
					<MoveTo questId="1" x="2383.656" y="4627.497" z="0.1131324" pathPrecision="5" />
					
					<!-- <MoveTo questId="1" x="2334.68" y="4422.688" z="0.1000157" pathPrecision="15" /> -->
					<!-- <MoveTo questId="1" x="1869.043" y="4439.779" z="0.1000007" pathPrecision="15" /> --> 
					<!-- <MoveTo questId="1" x="2324.68" y="4420.688" z="0.1000157" pathPrecision="15" /> -->
															
					<MoveTo questId="1" x="2467.278" y="3944.334" z="0.1" pathPrecision="15" />
					<MoveTo questId="1" x="2002.511" y="3971.922" z="0.1" pathPrecision="15" />
					<MoveTo questId="1" x="1999.248" y="4193.507" z="0.1000311" pathPrecision="15" />
					<WaitTimer questId="1"  waitTime="10000"/>  
					
					<UseTownPortal questId="1" />
					<WaitTimer questId="1"  waitTime="10000"/>  
										
					<LeaveGame reason="I have finished the run." />
					
		</If>



still DB doesnt read IF statements .... ???? anyone?

] Rule matched Flawed Amethyst by name.
[12:26:49.641 D] Rule has no stats to match, assuming base types were defined and returning a successful match!
[12:26:49.649 N] Player died
[12:26:49.654 N] Clicked revive button
[12:26:53.036 N] Player died, Resetting caches.
[12:26:53.040 D] Resetting current behavior.
[12:26:53.040 N] Player died, Resetting caches.
[12:26:53.040 D] Resetting current behavior.
[12:26:53.040 N] Player died, Resetting caches.
[12:26:53.040 D] Resetting current behavior.
[12:26:53.041 D] Calling OnDone() on current behavior. MoveToTag: X: 2467.278, Y: 3944.334, Z: 0.1, PathPrecision: 15, Position: <2467.278, 3944.334, 0.1>, UnsafeRandomDistance: 0, Name: null, IsDone: False, QuestId: 1, StepId: 0, QuestName: Quest Id: 1, IsDoneCache: False, Behavior: Zeta.TreeSharp.PrioritySelector,
[12:26:53.041 D] Navigator.Clear
[12:26:53.184 N] ###################### REPORT ######################
[12:26:53.185 N] Gold: 220192
[12:26:53.196 N] Blues: 21
[12:26:53.206 N] Yellows: 0
[12:26:53.217 N] Legendaries: 0
[12:26:53.228 N] Set items: 0
[12:26:53.228 N] ####################################################
[12:26:53.404 D] Replaced hook [ProfileOrderBehavior_Hook] 0eade201-6932-4045-9867-68585b1931c4
[12:26:53.438 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:26:53.447 D] Raycast path generated.
[12:26:53.447 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 1 hops.
[12:26:53.452 V] Using power Wizard_Teleport clickPos:<2981.73, 2835.009, 24.90835> worldDynamicId:1999503360 targetACDGuid:-1
[12:26:54.866 V] Using power Walk clickPos:<2981.73, 2835.009, 24.90835> worldDynamicId:1999503360 targetACDGuid:-1

[12:26:57.760 D] [Stuck Handler] We're stuck at <2314.501, 4753.809, -0.7272288>
[12:26:57.794 D] Navigator.Clear
[12:26:57.795 V] Using power Walk clickPos:<2324.501, 4753.809, -0.7272288> worldDynamicId:1999503360 targetACDGuid:-1
[12:26:59.471 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:26:59.855 D] Waiting for path request to finish...
[12:27:00.029 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:00.036 D] Waiting for path request to finish...
[12:27:00.214 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:00.218 D] Waiting for path request to finish...
[12:27:00.406 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:00.415 D] Waiting for path request to finish...
[12:27:00.598 D] Navigator.Clear
[12:27:00.763 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:00.767 D] Waiting for path request to finish...
[12:27:00.777 N] Path with 2 hops received (partial: True)
[12:27:00.939 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:00.943 V] Path with 2 hops received (partial: True)
[12:27:00.951 D] Nav Service path generated.
[12:27:00.951 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 2 hops.
[12:27:00.951 V] Using power Walk clickPos:<2319, 4752, -0.9422264> worldDynamicId:1999503360 targetACDGuid:-1
[12:27:03.666 D] [Stuck Handler] We're stuck at <2319.118, 4756.17, -0.6122649>
[12:27:03.676 D] Navigator.Clear
[12:27:03.676 V] Using power Walk clickPos:<2328.515, 4759.591, -0.6122649> worldDynamicId:1999503360 targetACDGuid:-1
[12:27:05.351 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:05.358 D] Waiting for path request to finish...
[12:27:05.535 D] Navigator.Clear
[12:27:05.703 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:05.707 D] Waiting for path request to finish...
[12:27:05.727 N] Path with 2 hops received (partial: True)
[12:27:05.875 D] Generating path to Moving to use waypoint - <2981.73, 2835.009, 24.90835>
[12:27:05.883 V] Path with 2 hops received (partial: True)
[12:27:05.883 D] Nav Service path generated.
[12:27:05.883 D] Generated path to <2981.73, 2835.009, 24.90835> (Moving to use waypoint) with 2 hops.
[12:27:05.883 V] Using power Walk clickPos:<2319, 4752, -0.9422264> worldDynamicId:1999503360 targetACDGuid:-1
[12:27:09.074 D] Start/Stop Button Clicked!
[12:27:09.078 N] Stopping the bot.
[12:27:09.078 D] CurrentBot.Stop()
[12:27:09.078 D] Navigator.Clear()
[12:27:09.078 D] Navigator.Clear
[12:27:09.078 D] TreeHooks.Instance.ClearAll()
[12:27:09.078 D] OnStop event
[12:27:09.078 D] OnStop Event Invoking
[12:27:09.080 D] QuestOrderManager.OnBotStop(). Resetting caches.
[12:27:09.080 D] Resetting current behavior.
[12:27:09.080 D] QuestOrderManager.OnBotStop(). Resetting caches.
[12:27:09.080 D] Resetting current behavior.
[12:27:09.080 D] QuestOrderManager.OnBotStop(). Resetting caches.
[12:27:09.080 D] Resetting current behavior.
[12:27:09.082 D] Calling OnDone() on current behavior. UseWaypointTag: X: 2981.73, Y: 2835.009, Z: 24.90835, Position: <2981.73, 2835.009, 24.90835>, ActorSNOId: 223757, WaypointNumber: 11, IsDone: False, QuestId: 72801, StepId: -1, QuestName: Quest Id: 11C61, IsDoneCache: False, Behavior: Zeta.TreeSharp.Decorator,
[12:27:09.087 N] Bot Thread Ended. Was this requested?

View attachment 2012-08-08 12.24.txt

what catch my attention is this one.. this happens when i click STOP .. im not a dev but i think theres a clue in here? or NOT??
Code:
[12:27:09.082 D] Calling OnDone() on current behavior. UseWaypointTag: X: 2981.73, Y: 2835.009, Z: 24.90835, Position: <2981.73, 2835.009, 24.90835>, ActorSNOId: 223757, WaypointNumber: 11, IsDone: False, QuestId: 72801, StepId: -1, QuestName: Quest Id: 11C61, IsDoneCache: False, Behavior: Zeta.TreeSharp.Decorator, 
[12:27:09.087 N] Bot Thread Ended. Was this requested?

View attachment 2012-08-08 12.24.txt

for the devs.. the simple "IF" statement should function even if DB restarts the profile... or im doing it wrong? i dont see the problem in there other than IF statement not being followed.... anyone?
or the bot is just good if the toon wont die??? i mean DEATH HANDLING fails for me reading IF true and IF false.....
 
Last edited:
lol wow yeah i think this is over my head XD. Hope you can get this figured out, could help the whole community to start effective death support... best of luck
 
Fixed with the newest version of demonbuddy, just a day problem, very quick... mods pls close thread.. thank you and more power.
 
Back
Top