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

[Quest Behaviour] - FlyTo

exemplar

New Member
Joined
Mar 16, 2010
Messages
167
Reaction score
32
Very basic quest behaviour I've been using. Don't thank me, thank raphus for putting in the work on flightor.

Example,
CustomBehavior File="FlyTo" X="4928.461" Y="-2699.59" Z="1431.971" Distance="30.0"

Notes,
- Only run this behaviour in a position you know you can mount
- Don't make the destination somewhere inside, ie if you're trying to reach an npc inside a house make the location outside the door then let the normal mover do the rest (this is a limitation of flightor as at 19/2)
- This should work for flying vehicles, however you may need to be in a flying state before calling this behaviour, ie do a ctm in the air then flyto your destination.
- The distance attribute is optional and specifies how close you should be to the location for the behaviour to be considered 'done'. If you don't include this the default is 10.
- Flightor works fine in most outdoor areas, however if you're flying through things like small tunnels you may need multiple flyto's (this is a limitation of flightor as at 19/2)
- That's all I can think of, gl;hf
 

Attachments

Last edited:
Pwnface!


Work's like a dream!

PHP:
		<PickUp QuestName="Blast the Infernals!" QuestId="10564" GiverName="Wing Commander Nuainn" GiverId="21357" />
			<If Condition="((HasQuest(10564)) &amp;&amp; (!IsQuestCompleted(10564)))" >
				<CustomBehavior File="ForcedMount" QuestId="0" MountType="Flying" /> 
				<CustomBehavior File="FlyTo" X="-3410.749" Y="2978.393" Z="174.826" />
				<CustomBehavior File="RunMacro" Macro="/dismount" NumOfTimes="1" WaitTime="3000" />
				<UseItem QuestName="Blast the Infernals!" QuestId="10564" ItemId="30614" X="-3410.749" Y="2978.393" Z="169.8976" />
				<CustomBehavior File="WaitTimer" WaitTime="1000"/>
				<CustomBehavior File="ForcedMount" QuestId="0" MountType="Flying" /> 
				<CustomBehavior File="FlyTo" X="-3982.098" Y="2177.742" Z="103.7457" />
			</If>
		<TurnIn QuestName="Blast the Infernals!" TurnInName="Wing Commander Nuainn" QuestId="10564" TurnInId="21357" />
 
Last edited:
Very nice, I will have to give this a try, to maybe be able to do a deepholme questing profile as that zone requires alot of flying i think
 
is there any chance of making a plug-in using the same method for example if hotspot is more than 70f then flyto hotspot location?
 
When I attempt to use FlyTo on a vehicle, my error screen says "you can't do that right now" and the debug log says that i'm casting a spell..

PHP:
[3:01:55 PM:100] Goal: MountVehOnly: Running
[3:01:55 PM:100] interact: 0x4101D270
[3:01:55 PM:104] interact done: 0x4101D270
[3:01:55 PM:104] Activity: Mounting Vehicle
[3:01:57 PM:282] interact: 0x4101D270
[3:01:57 PM:299] interact done: 0x4101D270
[3:01:57 PM:853] Activity: Loading Tile/s
[3:02:04 PM:309] Spell_C::CastSpell(40120, 0, 0x0, 0) [21]
[3:02:06 PM:193] Spell_C::CastSpell(40120, 0, 0x0, 0) [22]
[3:02:08 PM:94] Spell_C::CastSpell(40120, 0, 0x0, 0) [23]
[3:02:09 PM:964] Spell_C::CastSpell(40120, 0, 0x0, 0) [24]
[3:02:12 PM:93] Spell_C::CastSpell(40120, 0, 0x0, 0) [25]
[3:02:14 PM:246] Spell_C::CastSpell(40120, 0, 0x0, 0) [26]
[3:02:16 PM:364] Spell_C::CastSpell(40120, 0, 0x0, 0) [27]

http://www.wowhead.com/spell=40120 <--- it's my Swift Flight Form

maybe change it from requiring you to be on a flying mount to "on a flying mount || in a vehicle"

PHP:
		<PickUp QuestName="Flight of the Wintergarde Defender" QuestId="12237" GiverName="Gryphon Commander Urik" GiverId="27317" />
			<If Condition="((HasQuest(12237)) &amp;&amp; (!IsQuestCompleted(12237)))" >
				<UseItem QuestName="Flight of the Wintergarde Defender" QuestId="12237" ItemId="37287" X="3703.753" Y="-698.9519" Z="215.5364" />
				<CustomBehavior File="MountVehOnly" NpcMountId="27258" X="3703.753" Y="-698.9519" Z="215.5364" />
				<CustomBehavior File="FlyTo" X="3643.036" Y="-1222.763" Z="147.9195" />
				<CustomBehavior File="UserDialog" QuestId="12237" Title="title" AllowBotStop="True" SoundCue="Asterisk" SoundCueInterval="5" Text=" Save 10 people.\n\n Then turn in the quest and click &quot;Continue Profile&quot; \n\n Yes, that sound is really annoying :D" />
			</If>
		<TurnIn QuestName="Flight of the Wintergarde Defender" QuestId="12237" TurnInName="Gryphon Commander Urik" TurnInId="27317" />
 
Last edited:
I absolutely love this quest behavior, but i've noticed a couple of issues that i would like tweaked if possible:

if the CB is running, disable combat

sometimes at the beginning of the behavior, it will randomly run somewhere. i don't know where exactly, but sometimes it strafes or runs forward like it's stuck. very weird.

awesome behavior nonetheless :)
 
It can't do that, unfortunately. The problem is the questing bot itself calls the combat class and your combat class should be checking for mounted or flying.
 
PHP:
using System.Collections.Generic;
using Styx.Helpers;
using Styx.Logic.BehaviorTree;
using Styx.Logic.Pathing;
using Styx.Logic.Questing;
using TreeSharp;
using Action = TreeSharp.Action;


namespace Styx.Bot.Quest_Behaviors
{
    class FlyTo : CustomForcedBehavior
    {
        public WoWPoint Location { get; private set; }
        public float Distance { get; private set; }

        public FlyTo(Dictionary<string, string> args)
            : base(args)
        {
            WoWPoint p;
            float f;
            bool HasLocation = GetXYZAttributeAsWoWPoint("X", "Y", "Z", true, WoWPoint.Empty, out p);
            if (!HasLocation)
            {
                Logging.Write("FlyTo has no location! {0}", this);
                TreeRoot.Stop();
                return;
            }
            Location = p;
            GetAttributeAsFloat("Distance", false, "10.0", 1, float.MaxValue, out f);
            Distance = f;
        }

        public override bool IsDone
        {
            get { return Location.Distance(StyxWoW.Me.Location) <= Distance; }
        }

        private Composite _root;
        protected override TreeSharp.Composite CreateBehavior()
        {
            return _root ?? (_root = new Action(ret => Styx.Logic.Pathing.Flightor.MoveTo(Location)));
        }
    }
}

changed
Gatherbuddy.Flightor.MoveTo
into
Styx.Logic.Pathing.Flightor.MoveTo
reason
Honorbuddy 2.0.0.4245
 
What this needs is quest ID. Why wrap this constantly into an IF when we could add an optional quest ID much like the Runto

PHP:
<RunTo QuestId="9701" X="-76.92366" Y="8718.41" Z="18.20831"  />
 
Back
Top