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

Shuffle Tag

Acps

New Member
Joined
Dec 24, 2011
Messages
347
Reaction score
0
Has anyone used this tag? Trying to figure out the best way to go about 2 bots to farm the same set of bounties! Maybe if I could see a profile with the tag in it would help me!

Or if there is a way to run them in reverse, without having to rearrange the whole profile again?

Thanks in advance
 
split farming, update the profile and use.

copy this as SplitBounty.cs in QuestTools\ProfileTags\Complex
Code:
using System.Linq;
using Zeta.Game;
using Zeta.Game.Internals;
using Zeta.TreeSharp;
using Zeta.XmlEngine;

namespace QuestTools.ProfileTags
{
    [XmlElement("SplitBounty")]
    public class SplitBounty : BaseComplexNodeTag
    {
        public SplitBounty() { }
        protected override Composite CreateBehavior()
        {
            return
             new Decorator(ret => !IsDone,
                 new PrioritySelector(
                     GetNodes().Select(b => b.Behavior).ToArray()
                 )
             );
        }

        public override bool GetConditionExec()
        {

            foreach (var c in ZetaDia.ActInfo.Bounties.Where(bounty => bounty.Act.ToString().Equals(Act) && bounty.Info.State != QuestState.Completed))
            {
				if (c.Info.QuestSNO.ToString().Equals(questId)) {
					// Bounty is present
					if ( c.Info.State.ToString().Equals("NotStarted")) {
						// not yet started then go do finish it.
					    Logger.Log("Starting " + c.Info.Quest.ToString());
						return true;
					}
					else {
						// bounty is started..
						var b = ZetaDia.ActInfo.Bounties.Where(bounty => bounty.Act.ToString().Equals(Act) && bounty.Info.State == QuestState.NotStarted);
						if (b.Count() == 0 )	{
							// all bounties started, but this bounty is not yet complete, so help the n00b finish this quest.
							Logger.Log("Helping " + c.Info.Quest.ToString());
							return true;
						} 
						else {
							// There still are not started bounties, so break and go to default false return.
							// Lets hope the profile maker has made a profile to finish that quest. Else bot will chill out with the monsters or sit in town.
							break;
						}
					}
				}
            }
			// default, don't play the quest
			return false;
		}

        [XmlAttribute("bountyID", true)]
        public string questId { get; set; }
		
		[XmlAttribute("actID", true)]
        public string Act { get; set; }
    }
}

SplitWait.cs, just to wait..around to finish all quests.. if necessary.

Code:
using System.Linq;
using Zeta.Game;
using Zeta.Game.Internals;
using Zeta.TreeSharp;
using Zeta.XmlEngine;

namespace QuestTools.ProfileTags
{
    [XmlElement("SplitWait")]
    public class SplitWait : BaseComplexNodeTag
    {
        public SplitWait() { }
        protected override Composite CreateBehavior()
        {
            return
             new Decorator(ret => !IsDone,
                 new PrioritySelector(
                     GetNodes().Select(b => b.Behavior).ToArray()
                 )
             );
        }

        public override bool GetConditionExec()
        {
			var b = ZetaDia.ActInfo.Bounties.Where(bounty => bounty.Act.ToString().Equals(Act) && bounty.Info.State == QuestState.Completed);
			Logger.Log("Waiting");
			if(b.Count() == 5) 
				return false;
			else
				return true;
		}
		
		[XmlAttribute("actID", true)]
        public string Act { get; set; }
    }
}

The profile, to this add new changes. Its very simple.
Code:
<Profile>
	<Name>ALPHA Act 1</Name>
	<KillMonsters>True</KillMonsters>
	<PickupLoot>True</PickupLoot>
	<GameParams act="OpenWorld" resumeFromSave="False" isPrivate="false" numGames="-1" />
	<TargetBlacklists>  
		<TargetBlacklist actorId="168875" />
		<TargetBlacklist actorId="105361" />
		<TargetBlacklist actorId="79421" />
		<TargetBlacklist actorId="62215" />
		<TargetBlacklist actorId="177439" />
		<TargetBlacklist actorId="167185" />
		<TargetBlacklist actorId="144149" />
		<TargetBlacklist actorId="92387" />
		<TargetBlacklist actorId="104545" />
		<TargetBlacklist actorId="108266" />
		<TargetBlacklist actorId="109209" />
		<TargetBlacklist actorId="5723" />
		<TargetBlacklist actorId="156058" />
		<TargetBlacklist actorId="90419" />
		<TargetBlacklist actorId="105321" />
		<TargetBlacklist actorId="102711" />
		<TargetBlacklist actorId="105323" />
		<TargetBlacklist actorId="58568" />
		<TargetBlacklist actorId="3949" />
		<TargetBlacklist actorId="5717" />
		<TargetBlacklist actorId="58568" />
		<TargetBlacklist actorId="158944" />
		<TargetBlacklist actorId="167311" />
		<TargetBlacklist actorId="89579" />
		<TargetBlacklist actorId="89578" />
		<TargetBlacklist actorId="170913" />
		<TargetBlacklist actorId="5895" />
		<TargetBlacklist actorId="5896" />
		<TargetBlacklist actorId="5898" />
		<TargetBlacklist actorId="5900" />
		<TargetBlacklist actorId="116752" />
		<TargetBlacklist actorId="108882" />
		<TargetBlacklist actorId="206461" /> 
		<TargetBlacklist actorId="86385" />	
		<TargetBlacklist actorId="5747" /> <!-- trDun_Cath_Chandelier_Trap_Switch2-15223 -->
		<TargetBlacklist actorId="5744" /> <!-- trDun_Cath_Chandelier_Trap-3150 -->
		<TargetBlacklist actorId="3948" /> <!-- destructibleCandles-4564 -->
		<TargetBlacklist actorId="81431" /> <!-- Cath Bannister -->
		<TargetBlacklist actorId="5740" /> <!-- Catch Candlestick -->
		<TargetBlacklist actorId="3892" /> <!-- Lady Dunhyld -->	
		<TargetBlacklist actorId="210591" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="172010" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="171998" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="179989" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="179998" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="179987" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="171527" /> <!-- Egg Sack Cluster -->
		<TargetBlacklist actorId="116063" /> <!-- Spider 'spawner' -->	
		<TargetBlacklist actorId="62215" /> <!-- sack -->		
		<TargetBlacklist actorId="89579"/> <!-- Firewall -->
		<TargetBlacklist actorId="89503"/> <!-- cath brazier trap -->
		
		<!-- Don't want to waste time talking to Enyo every time we see him -->			
		<TargetBlacklist actorId="114622" /> <!-- Enyo -->
		
		<!-- Blacklisting Quest Objects is required, if the bot is allowed to click shrine/chest when control is reverted
			 back to the profile the shrine/chest will no longer exist (ActorId changes after clicking shrine/chest) 
			 and so ObjectFound is not triggered and DungeonExplore continues exploring level unable to find the objective. -->
		<TargetBlacklist actorId="365097" /> <!-- Cursed Chest -->
		<TargetBlacklist actorId="364601" /> <!-- Cursed Shrine -->		

	    <!-- Similar to above issue, have to blacklist the objects to ensure that dungeon explore can find these actors -->
		<TargetBlacklist actorId="204032" /> <!-- Precious Ore -->	
		<TargetBlacklist actorId="202277" /> <!-- Precious Ore -->			
		
	</TargetBlacklists>
	<Order>
		
		<WaitTimer questId="1" stepId="2" waitTime="500" />	
		<ToggleTargeting questId="1" killRadius="5" />	



		
<!-- =================================================================================================
 =================================================================================================
  ================================================================================================= -->
		
		
		

		<!-- 1	The Old Ruins =============================================================-->

		<!-- The Cursed Cellar -->
		<If condition="HasQuest(369944)">
			<SplitBounty bountyID="369944" actID="A1">			
				<LoadProfile file="event_cursed_cellar.xml" />
			</SplitBounty>
		</If>	
		
		<!-- 2	Cathedral Level 1 =========================================================-->

		<!-- The Cursed Chamber of Bones -->
		<If condition="HasQuest(375198)">
			<SplitBounty bountyID="375198" actID="A1">						
				<LoadProfile file="event_cursed_chamber_of_bone.xml" />
			</SplitBounty>				
		</If>	

		<!-- 
		361331: Kill Glidewing		
		361327: Kill Braluk
		361320: Kill Ragus
		-->
		<If condition="
			HasQuest(361331) or
			HasQuest(361327) or 
			HasQuest(361320)">				
			<SplitBounty bountyID="361331" actID="A1">						
				<LoadProfile file="kill_cathedral_level_1.xml" />
			</SplitBounty>				

			<SplitBounty bountyID="361327" actID="A1">						
				<LoadProfile file="kill_cathedral_level_1.xml" />
			</SplitBounty>		
			
			<SplitBounty bountyID="361320" actID="A1">						
				<LoadProfile file="kill_cathedral_level_1.xml" />
			</SplitBounty>					
			
		</If>

		<!-- 3	Cathedral Level 2 =========================================================-->

		<!-- The Cursed Court -->
		<If condition="HasQuest(375191)">
			<SplitBounty bountyID="375191" actID="A1">	
				<LoadProfile file="event_cursed_court.xml" />
			</SplitBounty>				
		</If>	

		<!-- 
		361334: Kill Merrium		
		361339: Kill Firestarter
		361336: Kill Cudgelarm
		-->
		<If condition="
			HasQuest(361334) or
			HasQuest(361339) or 
			HasQuest(361336)">	
			
			<SplitBounty bountyID="361334" actID="A1">	
				<LoadProfile file="kill_cathedral_level_2.xml" />
			</SplitBounty>		
			<SplitBounty bountyID="361339" actID="A1">	
				<LoadProfile file="kill_cathedral_level_2.xml" />
			</SplitBounty>		
			<SplitBounty bountyID="361336" actID="A1">	
				<LoadProfile file="kill_cathedral_level_2.xml" />
			</SplitBounty>					

		</If>				

		<!-- 4	Cathedral Level 4 =========================================================-->

		<!-- 
		361343: Kill Killian		
		361341: Kill Captain Cage
		361345: Kill Bellybloat
		-->
		<If condition="
			HasQuest(361343) or
			HasQuest(361341) or 
			HasQuest(361345)">				
			
			<SplitBounty bountyID="361343" actID="A1">	
				<LoadProfile file="kill_cathedral_level_4.xml" />
			</SplitBounty>				
			<SplitBounty bountyID="361341" actID="A1">	
				<LoadProfile file="kill_cathedral_level_4.xml" />
			</SplitBounty>		
			<SplitBounty bountyID="361345" actID="A1">	
				<LoadProfile file="kill_cathedral_level_4.xml" />
			</SplitBounty>		
		</If>		

		<!-- 5	The Royal Crypts ==========================================================-->

		<!-- Kill Skeleton King-->
		<If condition="HasQuest(361234)">
		
			<SplitBounty bountyID="361234" actID="A1">	
				<LoadProfile file="361234_kill_skeleton_king.xml" />
			</SplitBounty>	
			
		</If>	

		<!-- 
		361352: Kill Rad'noj		
		361354: Kill Captain Clegg
		-->
		<If condition="
			HasQuest(361352) or
			HasQuest(361354)">				

			<SplitBounty bountyID="361352" actID="A1">	
				<LoadProfile file="kill_the_royal_crypts.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="361354" actID="A1">	
				<LoadProfile file="kill_the_royal_crypts.xml" />
			</SplitBounty>							
			
		</If>				

		<!-- 6	The Weeping Hollow ========================================================-->

		<!-- Clear the Den of the Fallen -->
		<If condition="HasQuest(345488)">
			<SplitBounty bountyID="345488" actID="A1">			
				<LoadProfile file="clear_den_of_the_fallen.xml" />
			</SplitBounty>				
		</If>

		<!-- 
		347099: Kill Mira		
		369399: Kill Horrus
		369404: Kill Kankerrot
		345490: Kill Mange	
		-->
		<If condition="
			HasQuest(347099) or
			HasQuest(369399) or 
			HasQuest(369404) or
			HasQuest(345490)">				
			
			<SplitBounty bountyID="347099" actID="A1">	
				<LoadProfile file="path_kill_weeping_hollow.xml" />
			</SplitBounty>
			<SplitBounty bountyID="369399" actID="A1">	
				<LoadProfile file="path_kill_weeping_hollow.xml" />
			</SplitBounty>
			<SplitBounty bountyID="369404" actID="A1">	
				<LoadProfile file="path_kill_weeping_hollow.xml" />
			</SplitBounty>		
			<SplitBounty bountyID="345490" actID="A1">	
				<LoadProfile file="path_kill_weeping_hollow.xml" />
			</SplitBounty>		
		</If>			

		<!-- 7	Cemetery of the Forsaken ==================================================-->

		<!-- The Matriarchs Bones -->
<!--		<If condition="HasQuest(349020)">
		
			<SplitBounty bountyID="349020" actID="A1">	
				<LoadProfile file="event_matriarchs_bones.xml" />
			</SplitBounty>			

		</If>		
-->
		<!-- Jar of Souls -->
		<If condition="HasQuest(349016)">
		
			<SplitBounty bountyID="349016" actID="A1">	
				<LoadProfile file="event_jar_of_souls.xml" />
			</SplitBounty>			
			

		</If>			

		<!-- Kill Digger'O'Dell -->
		<If condition="HasQuest(347097)">
			<SplitBounty bountyID="347097" actID="A1">	
				<LoadProfile file="347097_kill_diggerodell.xml" />
			</SplitBounty>			
			
		
		</If>		

		<!-- The Dataminer -->
		<If condition="HasQuest(347095)">
			<SplitBounty bountyID="347095" actID="A1">	
				<LoadProfile file="347095_kill_the_dataminer.xml" />
			</SplitBounty>				

		</If>	


		<!-- 8	Fields of Misery ==========================================================-->

		<!-- The Precious Ores -->
		<If condition="HasQuest(347060)">
			<SplitBounty bountyID="347060" actID="A1">	
				<LoadProfile file="event_precious_ores.xml" />
			</SplitBounty>			

		</If>		

		<!-- The family of Rathe -->
		<If condition="HasQuest(347058)">
		
		<SplitBounty bountyID="347058" actID="A1">	
				<LoadProfile file="event_family_of_rathe.xml" />
		</SplitBounty>	
			
		</If>		

		<!-- Farm Besieged -->
		<If condition="HasQuest(347062)">
			<SplitBounty bountyID="347062" actID="A1">	
				<LoadProfile file="event_farm_besieged.xml" />
			</SplitBounty>			
			
		</If>	

		<!-- Carrion Farm-->
		<If condition="HasQuest(345500)">
			<SplitBounty bountyID="345500" actID="A1">	
				<LoadProfile file="event_carrion_farm.xml" />
			</SplitBounty>			
			
		</If>		

		<!-- Clear the Scavenger's Den -->
		<If condition="HasQuest(345496)">
			<SplitBounty bountyID="345496" actID="A1">	
				<LoadProfile file="clear_scavengers_den.xml" />
			</SplitBounty>			
			
		</If>				


		<!-- Clear Khazra Den -->
		<If condition="HasQuest(347065)">
			<SplitBounty bountyID="347065" actID="A1">	
				<LoadProfile file="clear_khazra_den.xml" />
			</SplitBounty>			
			
		</If>		

		<!-- 
		369243: Kill Growler		
		347070: Kill Charger
		347073: Kill Dreadclaw
		369246: Kill Krelm	
		345498: Kill Melmak
		-->
		<If condition="
			HasQuest(369243) or
			HasQuest(347070) or 
			HasQuest(347073) or
			HasQuest(369246) or
			HasQuest(345498)">				

			<SplitBounty bountyID="369243" actID="A1">	
				<LoadProfile file="path_kill_fields_of_misery.xml" />
			</SplitBounty>			
			<SplitBounty bountyID="347070" actID="A1">	
				<LoadProfile file="path_kill_fields_of_misery.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="347073" actID="A1">	
				<LoadProfile file="path_kill_fields_of_misery.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="369246" actID="A1">	
				<LoadProfile file="path_kill_fields_of_misery.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="345498" actID="A1">	
				<LoadProfile file="path_kill_fields_of_misery.xml" />
			</SplitBounty>				
		</If>	


		<!-- 9 Drowned Temple ===========================================================-->		

		<!-- The Cursed Mill -->
		<If condition="HasQuest(365401)">
			<SplitBounty bountyID="365401" actID="A1">	
				<LoadProfile file="event_cursed_mill.xml" />
			</SplitBounty>			

		</If>			

		<!-- 10 Festering Woods ===========================================================-->

		<!-- Clear the Crypt of the Ancients -->
		<If condition="HasQuest(345517)">
				<SplitBounty bountyID="345517" actID="A1">
					<LoadProfile file="clear_crypt_of_the_ancients.xml" />
				</SplitBounty>
		</If>	

		<!-- Eternal War -->
		<If condition="HasQuest(345505)">
			<SplitBounty bountyID="345505" actID="A1">	
				<LoadProfile file="event_eternal_war.xml" />
			</SplitBounty>	

		</If>	

		<!-- Last Stand of the Ancients -->
		<If condition="HasQuest(345502)">
			<SplitBounty bountyID="345502" actID="A1">	
				<LoadProfile file="event_last_stand_of_the_ancients.xml" />
			</SplitBounty>			

		</If>		

		<!-- Clear Warrior's Rest -->
		<If condition="HasQuest(345520)">
			<SplitBounty bountyID="345520" actID="A1">	
				<LoadProfile file="clear_warriors_rest.xml" />
			</SplitBounty>			

		</If>		

		<!-- 
		369249: Kill Brone		
		369251: Kill Galush
		345507: Kill Grimsmack	
		347054: Kill Hawthorne
		347056: Kill Fecklar
		-->
		<If condition="
			HasQuest(369249) or
			HasQuest(369251) or 
			HasQuest(345507) or
			HasQuest(347054) or
			HasQuest(347056)">				
			<SplitBounty bountyID="369249" actID="A1">	
				<LoadProfile file="path_kill_festering_woods.xml" />
			</SplitBounty>				
			<SplitBounty bountyID="369251" actID="A1">	
				<LoadProfile file="path_kill_festering_woods.xml" />
			</SplitBounty>				

			<SplitBounty bountyID="345507" actID="A1">	
				<LoadProfile file="path_kill_festering_woods.xml" />
			</SplitBounty>				

			<SplitBounty bountyID="347054" actID="A1">	
				<LoadProfile file="path_kill_festering_woods.xml" />
			</SplitBounty>				

			<SplitBounty bountyID="347056" actID="A1">	
				<LoadProfile file="path_kill_festering_woods.xml" />
			</SplitBounty>				


		</If>				

		<!-- 12	Caverns of Araneae ========================================================-->


		<!-- Cursed Hatchery / Spider Trap -->
		<If condition="HasQuest(375201)">
			<SplitBounty bountyID="375201" actID="A1">	
				<LoadProfile file="event_cursed_hatchery.xml" />
			</SplitBounty>			
			
		</If>	

		<!-- 
		345526: Kill Rathlin		
		345524: Kill Venomite
		345862: Kill Qurash
		345522: Kill Zhelobb	
		-->
		<If condition="
			HasQuest(345526) or
			HasQuest(345524) or 
			HasQuest(345862) or
			HasQuest(345522)">				
			<SplitBounty bountyID="345526" actID="A1">	
				<LoadProfile file="kill_caverns_of_araneae.xml" />
			</SplitBounty>				
			<SplitBounty bountyID="345524" actID="A1">	
				<LoadProfile file="kill_caverns_of_araneae.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="345862" actID="A1">	
				<LoadProfile file="kill_caverns_of_araneae.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="345522" actID="A1">	
				<LoadProfile file="kill_caverns_of_araneae.xml" />
			</SplitBounty>				
			
		</If>			

		<!-- 13	Southern Highlands ========================================================-->

		<!-- Crumbling tower -->
		<If condition="HasQuest(344482)">
			<SplitBounty bountyID="344482" actID="A1">	
				<LoadProfile file="event_crumbling_tower.xml" />
			</SplitBounty>			
			
		</If>	

		<!-- Revenge of Gharbad -->
		<If condition="HasQuest(344486)">
			<SplitBounty bountyID="344486" actID="A1">	
				<LoadProfile file="event_revenge_of_gharbad.xml" />
			</SplitBounty>			
			
		</If>	



		<!-- Cursed Camp -->
		<If condition="HasQuest(369763)">
			<SplitBounty bountyID="369763" actID="A1">	
				<LoadProfile file="event_cursed_camp.xml" />
			</SplitBounty>			
			
		</If>			

		<!-- Clear the Clan of the Moon Cave -->
		<If condition="HasQuest(344547)">
			<SplitBounty bountyID="344547" actID="A1">	
				<LoadProfile file="clear_clan_of_the_mooncave.xml" />
			</SplitBounty>			

		</If>

		<!-- 
		344497: Kill Logrut
		344490: Kill Cadhul
		344501: Kill Lorzak
		344503: Kill Red Rock
		344499: Kill Buras
		-->
		<If condition="
			HasQuest(344497) or
			HasQuest(344490) or 
			HasQuest(344501) or
			HasQuest(344503) or 
			HasQuest(344499)">	
			<SplitBounty bountyID="344497" actID="A1">	
				<LoadProfile file="path_kill_southern_highlands.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="344490" actID="A1">	
				<LoadProfile file="path_kill_southern_highlands.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="344501" actID="A1">	
				<LoadProfile file="path_kill_southern_highlands.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="344503" actID="A1">	
				<LoadProfile file="path_kill_southern_highlands.xml" />
			</SplitBounty>		
			<SplitBounty bountyID="344499" actID="A1">	
				<LoadProfile file="path_kill_southern_highlands.xml" />
			</SplitBounty>				
		</If>			

		<!-- 14	Northern Highlands ========================================================-->


		<!-- Apothecary's Brother-->
		<!-- Status: OK -->		
		<If condition="HasQuest(350529)">
			<SplitBounty bountyID="350529" actID="A1">	
				<LoadProfile file="event_apothecarys_brother.xml" />
			</SplitBounty>				
		</If>		

		<!-- 
		367561: Kill jezeb
		367559: Kill Krailen
		-->
		<If condition="
			HasQuest(367561) or
			HasQuest(367559)">				
			<SplitBounty bountyID="367561" actID="A1">	
				<LoadProfile file="kill_leorics_manor.xml" />
			</SplitBounty>				
			<SplitBounty bountyID="367559" actID="A1">	
				<LoadProfile file="kill_leorics_manor.xml" />
			</SplitBounty>					
		</If>	

		<!-- 
		369271: Kill Theodyn
		369253: Kill Reggrel
		369273: Kill Percepeus
		369257: Kill Hrugowl	
		-->
		<If condition="
			HasQuest(369271) or
			HasQuest(369253) or 
			HasQuest(369273) or
			HasQuest(369257)">				
			<SplitBounty bountyID="369271" actID="A1">	
				<LoadProfile file="path_kill_northern_highlands.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="369253" actID="A1">	
				<LoadProfile file="path_kill_northern_highlands.xml" />
			</SplitBounty>
			<SplitBounty bountyID="369273" actID="A1">	
				<LoadProfile file="path_kill_northern_highlands.xml" />
			</SplitBounty>
			<SplitBounty bountyID="369257" actID="A1">	
				<LoadProfile file="path_kill_northern_highlands.xml" />
			</SplitBounty>			
		</If>		


		<!-- 15	Halls of Agony Level 1 ====================================================-->

		<!-- 
		345544: Kill Bludgeonskull
		347011: Kill Battlerage
		345542: Kill Crassus
		-->
		<If condition="
			HasQuest(345544) or
			HasQuest(347011) or 
			HasQuest(345542)">				
			<SplitBounty bountyID="345544" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_1.xml" />
			</SplitBounty>				
			<SplitBounty bountyID="347011" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_1.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="345542" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_1.xml" />
			</SplitBounty>				
			</If>			

		<!-- 16	Halls of Agony Level 2 ====================================================-->

		<!-- A Stranger In Need -->
		<If condition="HasQuest(345546)">
			<SplitBounty bountyID="345546" actID="A1">	
				<LoadProfile file="event_stranger_in_need.xml" />
			</SplitBounty>				
		</If>	

		<!-- Kill Warden-->
		<If condition="HasQuest(347030)">
			<SplitBounty bountyID="347030" actID="A1">	
				<LoadProfile file="347030_kill_the_warden.xml" />
			</SplitBounty>				
		</If>	

		<!-- Kill Sotnob the Fool-->
		<If condition="HasQuest(349026)">
			<SplitBounty bountyID="349026" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_2.xml" />
			</SplitBounty>				
		</If>

		<!-- 17	Halls of Agony Level 3 butcher was here ====================================================-->

		<!-- Kill the Butcher -->


		<!-- The Cursed Bellows / Deathfire -->
		<If condition="HasQuest(369789)">
			<SplitBounty bountyID="369789" actID="A1">	
				<LoadProfile file="event_deathfire.xml" />
			</SplitBounty>				
		</If>			

		<!-- 
		347027: Kill Garrach
		347020: Kill Treefist
		347023: Kill Boneslag
		-->
		<If condition="
			HasQuest(347027) or
			HasQuest(347020) or 
			HasQuest(347023)">				
			<SplitBounty bountyID="347027" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_3.xml" />
			</SplitBounty>		
			<SplitBounty bountyID="347020" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_3.xml" />
			</SplitBounty>	
			<SplitBounty bountyID="347023" actID="A1">	
				<LoadProfile file="kill_halls_of_agony_level_3.xml" />
			</SplitBounty>				
		</If>			

		
				<!-- Vendor Armorer / Scavenged Scabbard -->
		<If condition="HasQuest(344488)">
			<SplitBounty bountyID="344488" actID="A1">	
				<LoadProfile file="event_scavenged_scabbard.xml" />
			</SplitBounty>			
			
		</If>	
		
		<!-- The Cursed Grove-->
		<If condition="HasQuest(365381)">
			<SplitBounty bountyID="365381" actID="A1">	
				<LoadProfile file="event_cursed_grove.xml" />
			</SplitBounty>			
			
		</If>		
		
			<!-- Kill Queen Araneae, Saving the best for last -->
	



		<If condition="HasQuest(347032)">
			<SplitBounty bountyID="347032" actID="A1">	
				<LoadProfile file="347032_kill_the_butcher.xml" />
			</SplitBounty>				
		</If>	
		
		<If condition="HasQuest(345528)">
			<SplitBounty bountyID="345528" actID="A1">	
			<LoadProfile file="345528_kill_queen_araneae.xml" />
			</SplitBounty>			

		</If>		

		<!--===============================================================================-->

		<TrinityTownPortal questId="1" /> 
		<SplitWait actID="A1">
			<WaitTimer questId="1" stepId="1" waitTime="5000"/>
			<LoadProfile file="act1.xml" />
		</SplitWait>


		<LogMessage questId="1" step="1" output="Checking if we have all bounties complete" /> 
		<ActBountiesComplete act="A1">
			<LogMessage questId="1" step="1" output="Seems like we have 5 complete" />
			<If condition="Me.IsInTown==False">   
				<LogMessage questId="1" step="1" output="Going back to town to turn it in." />
				
			</If>				
			<WaitTimer questId="1" stepId="1" waitTime="1000"/>	
			<LogMessage questId="1" step="1" output="Lets make sure we are actually in the right town" />
			<While condition="CurrentWorldId != 332336">
				<LogMessage questId="1" step="1" output="Doesn't look like we are! using the waypoint" />
				<UseWaypoint waypointNumber="0" questId="1"/>
				<WaitTimer questId="1" stepId="1" waitTime="7500"/>
			</While>

			<ForceTownRun questId="1"/>	
			<WaitTimer questId="1" stepId="1" waitTime="1000"/>						

			<LogMessage questId="1" step="1" output="Attempting to interact with Enyo" />
			<MoveToActor questId="1" stepId="1" x="419" y="531" z="24" actorId="114622" interactRange="8" name="Enyo_Heaven-34594"  pathPrecision="5" pathPointLimit="250" statusText="" />

		</ActBountiesComplete>

		<!-- should we move onto to the next act? -->
		<If condition="Zeta.Bot.Settings.GlobalSettings.Instance.LastProfile.Contains('All_Redirect')">
			<TrinityLoadProfile file="../All_Distributor.xml" />			
		</If>		

		<!-- nope repeating the same act. gooo! -->
		<LeaveGame quest="1" step="1" reason="done." stayInParty="False" />		

	</Order>
</Profile>
 
BrutalKeyFarm has uses it. It just randomly moves around child tags.

<Shuffle>
<SomeTag />
<SomeTag />
<SomeTag />
<SomeTag />
</Shuffle>

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using Org.BouncyCastle.Asn1.Cms;
using QuestTools.Helpers;
using Zeta.Bot.Profile;
using Zeta.Bot.Profile.Composites;
using Zeta.XmlEngine;


namespace QuestTools.ProfileTags.Complex
{
    
    /// <summary>
    /// Reorders child tags, useful for split-farming profiles with multiple bots 
    /// For example bounties or keys - each bot would start a different bounty
    /// </summary>
    [XmlElement("Shuffle")]
    public class ShuffleTag : ComplexNodeTag, IEnhancedProfileBehavior
    {
        public ShuffleTag()
        {
            QuestId = QuestId <= 0 ? 1 : QuestId;
            Timeout = Timeout <= 0 ? 5 : Timeout;
        }


        [XmlAttribute("order")]
        public OrderType Order { get; set; }
        public enum OrderType
        {
            Random = 0,
            Reverse
        }


        /// <summary>
        /// This is the longest time this behavior can run for. Default is 30 seconds.
        /// </summary>
        [XmlAttribute("timeout")]
        public int Timeout { get; set; }


        private bool _shuffled;
        private bool _isDone;
        private DateTime _startTime = DateTime.MaxValue;


        public override bool IsDone
        {
            get
            {
                var done = _isDone || !IsActiveQuestStep || Body.All(p => p.IsDone);


                if (done)
                    return true;


                CheckTimeout();


                if(!_shuffled)
                    Shuffle();


                return _isDone;
            }
        }


        public void CheckTimeout()
        {
            if (DateTime.UtcNow.Subtract(_startTime).TotalSeconds <= Timeout)
                return;


            Logger.Log("timed out ({0} seconds)", Timeout);
            _isDone = true;
        }


        public override void OnStart()
        {
            _startTime = DateTime.UtcNow;
            base.OnStart();
        }


        public void Shuffle()
        {
            Logger.Log("{0} Shuffling {1} tags", Order, Body.Count);


            switch (Order)
            {
                case OrderType.Reverse:


                    Body.Reverse();
                    break;


                default:


                    ProfileUtils.RandomShuffle(Body);
                    break;
            }


            _shuffled = true;
        }
            




        public override void ResetCachedDone()
        {
            _shuffled = false;
            _isDone = false;
            _startTime = DateTime.MaxValue;
            base.ResetCachedDone();
        }


        #region IEnhancedProfileBehavior


        public void Update()
        {
            UpdateBehavior();
        }


        public void Start()
        {
            OnStart();
        }


        public void Done()
        {
            _isDone = true;
            this.SetChildrenDone();
        }


        #endregion
    }
}
 
Back
Top