Example #1
0
 public NPCInteractTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     NPC      = node.GetValueOfId("NPC").GetStringValue();
     location = node.GetValueOfId("Location").GetLocationValue();
     UseMount = node.GetBoolValueOfId("UseMount");
 }
Example #2
0
 public WalkTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     if (node.GetValueOfId("Order").GetStringValue() != null)
     {
         order = node.GetValueOfId("Order").GetStringValue().ToLower();
     }
 }
Example #3
0
 public QuestPickupTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     Name = node.GetValueOfId("Name").GetStringValue();
     ID   = node.GetValueOfId("ID").GetStringValue();
     if (ID == null || ID == "")
     {
         ID = Name;
     }
 }
Example #4
0
 public VendorTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     if (NPC == null || NPC == "")
     {
         NPC = node.GetValueOfId("RepairNPC").GetStringValue();
         if (NPC == null || NPC == "")
         {
             NPC = node.GetValueOfId("SellNPC").GetStringValue();
         }
     }
 }
Example #5
0
 public AssistTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     MinLevel = node.GetValueOfId("MinLevel").GetIntValue();
     MaxLevel = node.GetValueOfId("MaxLevel").GetIntValue();
     Distance = node.GetValueOfId("Distance").GetFloatValue();
     if (Distance == 0.0f)
     {
         Distance = 1E30f;
     }
     UseMount = node.GetBoolValueOfId("UseMount");
 }
Example #6
0
 public QuestGoalTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     Name = node.GetValueOfId("Name").GetStringValue();
     ID   = node.GetValueOfId("ID").GetStringValue();
     if (ID == null || ID == "")
     {
         ID = Name;
     }
     if (node.subTasks != null && node.subTasks.Count > 0)
     {
         childTask = pather.CreateTaskFromNode(node.subTasks[0], this);
     }
 }
Example #7
0
 public DangerTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     DangerDistance = node.GetValueOfId("Distance").GetFloatValue();
     if (DangerDistance == 0)
     {
         // Check if using $DangerDistance
         DangerDistance = node.GetValueOfId("DangerDistance").GetFloatValue();
         if (DangerDistance == 0)
         {
             DangerDistance = 20;
         }
     }
 }
Example #8
0
        public LootTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Value or = node.GetValueOfId("Skin");

            Skin = or.GetBoolValue();

            Distance = node.GetValueOfId("Distance").GetFloatValue();
            if (Distance == 0.0f)
            {
                Distance = 30.0f;
            }
            UseMount = node.GetBoolValueOfId("UseMount");

            this.ignoreSkin = node.GetValueOfId("IgnoreSkin").GetStringCollectionValues();
        }
Example #9
0
        public HarvestTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Value v_names = node.GetValueOfId("Names");

            if (v_names != null)
            {
                names = v_names.GetStringCollectionValues();
            }


            Value v_types = node.GetValueOfId("Types");

            List <Value> types_list = v_types.GetCollectionValue();

            foreach (Value v in types_list)
            {
                string s = v.GetStringValue();
                if (s == "Herb" || s == "Flower")
                {
                    HarvestFlower = true;
                    PPather.WriteLine("Want to harvest flowers");
                }
                if (s == "Mine" || s == "Mineral")
                {
                    HarvestMineral = true;
                    PPather.WriteLine("Want to harvest minerals");
                }
                if (s == "Chest" || s == "Treasure")
                {
                    HarvestTreasure = true;
                    PPather.WriteLine("Want to harvest chests");
                }
            }
            times = node.GetValueOfId("Times").GetIntValue();

            Distance = node.GetValueOfId("Distance").GetFloatValue();
            if (Distance == 0.0f)
            {
                Distance = 90.0f;
            }

            HostileDistance = node.GetValueOfId("HostileDistance").GetFloatValue();

            UseMount = node.GetBoolValueOfId("UseMount");
        }
Example #10
0
 public GroupFollowTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     Distance = node.GetValueOfId("Distance").GetFloatValue();
     if (Distance == 0.0f)
         Distance = 10f;
     UseMount = node.GetBoolValueOfId("UseMount");
 }
Example #11
0
        public BuyTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            if (NPC == null || NPC == "")
            {
                NPC = node.GetValueOfId("BuyNPC").GetStringValue();
            }

            BuySets = new List <BuySet>();
            Value        sets      = node.GetValueOfId("Items");
            List <Value> sets_list = sets.GetCollectionValue();

            foreach (Value v in sets_list)
            {
                BuySet set = v.GetBuySetValue();
                BuySets.Add(set);
            }
        }
Example #12
0
        public QuestHandinTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Name = node.GetValueOfId("Name").GetStringValue();
            ID   = node.GetValueOfId("ID").GetStringValue();
            if (ID == null || ID == "")
            {
                ID = Name;
            }

            Reward = node.GetValueOfId("Reward").GetIntValue();
            if (Reward == 0)
            {
                Reward = 1;
            }

            Repeatable = node.GetValueOfId("Repeatable").GetBoolValue();
        }
Example #13
0
 public HotspotTask(NodeTask node)
     : base(node)
 {
     // save us the hassle of case sensitive checking
     this.order = node.GetValueOfId("Order").GetStringValue();
     this.currentHotSpotIndex = -1;
     if (this.order == "reverse")
     {
         this.currentHotSpotIndex = this.Locations.Count;
     }
 }
Example #14
0
 public HotspotTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     // save us the hassle of case sensitive checking
     order = node.GetValueOfId("Order").GetStringValue();
     currentHotSpotIndex = -1;
     if (order == "reverse")
     {
         currentHotSpotIndex = Locations.Count;
     }
 }
Example #15
0
        public UseItemTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Value vin = node.GetValueOfId("Name");

            if (vin != null)
            {
                vItemName = vin.GetStringValue();
            }
            Value vid = node.GetValueOfId("Delay");

            if (vid != null)
            {
                vItemDelay = vid.GetIntValue();
            }
            Value vt = node.GetValueOfId("Times");

            if (vt != null)
            {
                vTimes = vt.GetIntValue();
            }
        }
Example #16
0
        public RunnerTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Locations = new List <Location>();
            Value        hs      = node.GetValueOfId("Locations");
            List <Value> hs_list = hs.GetCollectionValue();

            foreach (Value v in hs_list)
            {
                Location l = v.GetLocationValue();
                Locations.Add(l);
            }
            UseMount = node.GetBoolValueOfId("UseMount");
        }
Example #17
0
        public BGQueueTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Battlefield = node.GetValueOfId("Battlefield").GetStringValue();

            if (Battlefield == null || Battlefield.Length == 0)
            {
                PPather.WriteLine("*** BGQueue: Battlefield is missing");
            }

            if (GetLocationOfNPC() == null)
            {
                PPather.WriteLine("*** BGQueue: NPC '" + NPC + "' is unknown");
            }
        }
Example #18
0
 public QuestInteractTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     Object   = node.GetValueOfId("Object").GetStringValue();
     NPC      = node.GetValueOfId("NPC").GetStringValue();
     Item     = node.GetValueOfId("Item").GetStringValue();
     location = node.GetValueOfId("Location").GetLocationValue();
     if (location == null && Item == "")
     {
         if (NPC != "")
         {
             PPather.WriteLine("!Warning:No $Location for $NPC = " + NPC);
         }
         else if (Object != "")
         {
             PPather.WriteLine("!Warning:No $Location for $Object = " + Object);
         }
         else
         {
             PPather.WriteLine("!Warning:$Item, $NPC ,$Object and $Location isn't set");
         }
     }
     UseMount = node.GetBoolValueOfId("UseMount");
 }
Example #19
0
        protected RunnerTask(NodeTask node)
            : base(node)
        {
            this.Locations = new List <Location>();
            Value        hs     = node.GetValueOfId("Locations");
            List <Value> hsList = hs.GetCollectionValue();

            foreach (Value v in hsList)
            {
                Location l = v.GetLocationValue();
                this.Locations.Add(l);
            }
            this.useMount = node.GetBoolValueOfId("UseMount");
            var expression = node.GetExpressionOfId("HowClose");

            if (expression != null)
            {
                this.howClose = node.GetFloatValueOfId("HowClose");
            }
            else
            {
                this.howClose = 3.0f;
            }
        }
Example #20
0
 public LoadTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     File = node.GetValueOfId("File").GetStringValue();
 }
Example #21
0
 public WaitTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     waitfor = node.GetValueOfId("For").GetStringValue();
 }
Example #22
0
 public LoadTask(NodeTask node)
     : base(node)
 {
     this.File = node.GetValueOfId("File").GetStringValue();
 }
Example #23
0
        public PullTask(PPather pather, NodeTask node)
            : base(pather, node)
        {
            Value v_names = node.GetValueOfId("Names");

            if (v_names != null)
            {
                names = v_names.GetStringCollectionValues();
                if (names.Count == 0)
                {
                    names = null;
                }
            }

            Value v_ignore = node.GetValueOfId("Ignore");

            if (v_ignore != null)
            {
                ignore = v_ignore.GetStringCollectionValues();
                if (ignore.Count == 0)
                {
                    ignore = null;
                }
            }

            Value v_factions = node.GetValueOfId("Factions");

            if (v_factions != null)
            {
                factions = v_factions.GetIntCollectionValues();
                if (factions.Count == 0)
                {
                    factions = null;
                }
                if (factions != null)
                {
                    foreach (int faction in factions)
                    {
                        PPather.WriteLine("  faction '" + faction + "'");
                    }
                }
            }

            MinLevel = node.GetValueOfId("MinLevel").GetIntValue();
            MaxLevel = node.GetValueOfId("MaxLevel").GetIntValue();

            Distance = node.GetValueOfId("Distance").GetFloatValue();
            if (Distance == 0.0f)
            {
                Distance = 1E30f;
            }

            if (MaxLevel == 0)
            {
                MaxLevel = 10000;
            }
            //PPather.WriteLine("  Max level " + MaxLevel);
            //PPather.WriteLine("  Min level " + MinLevel);
            SetKillCount();
            UseMount = node.GetBoolValueOfId("UseMount");

            skipMobsWithAdds = node.GetBoolValueOfId("SkipMobsWithAdds");
            if (skipMobsWithAdds)
            {
                addsDistance = node.GetFloatValueOfId("AddsDistance");
                addsCount    = node.GetIntValueOfId("AddsCount");
                if (addsDistance == 0)
                {
                    addsDistance = 15;
                }
                if (addsCount == 0)
                {
                    addsCount = 2;
                }
            }
        }
Example #24
0
 public MailTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     location = node.GetValueOfId("Location").GetLocationValue();
     UseMount = node.GetBoolValueOfId("UseMount");
 }