public NPCInteractTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     NPC      = node.GetValueOfId("NPC").GetStringValue();
     location = node.GetValueOfId("Location").GetLocationValue();
     UseMount = node.GetBoolValueOfId("UseMount");
 }
 public GroupFollowTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     Distance = node.GetValueOfId("Distance").GetFloatValue();
     if (Distance == 0.0f)
         Distance = 10f;
     UseMount = node.GetBoolValueOfId("UseMount");
 }
Exemple #3
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");
 }
Exemple #4
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");
        }
Exemple #5
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();
        }
Exemple #6
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");
        }
Exemple #7
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;
            }
        }
 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");
 }
Exemple #9
0
 public MailTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     location = node.GetValueOfId("Location").GetLocationValue();
     UseMount = node.GetBoolValueOfId("UseMount");
 }
Exemple #10
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;
                }
            }
        }