Example #1
0
 internal RunebookEntry(Runebook owner, GumpButton recall, GumpButton gate, GumpButton sacred, GumpButton scroll, GumpButton def, GumpButton drop, string name)
 {
     _owner   = owner;
     _recall  = recall;
     _gate    = gate;
     _sacred  = sacred;
     _scroll  = scroll;
     _default = def;
     _drop    = drop;
     Name     = name;
 }
Example #2
0
 public static void recallTo(PlayerMobile character, Runebook book, String location)
 {
     book.Parse();
     Stealth.Client.Wait(100);
     foreach (RunebookEntry rune in book.Entries)
     {
         if (rune.Name == location && book.Entries.IndexOf(rune) != book.DefaultRune)
         {
             rune.SetDefault();
             break;
         }
     }
     Stealth.Client.Wait(100);
     book.Recall();//recall to location
     book.Close();
 }
Example #3
0
        internal RunebookEntry(Runebook owner, GumpButton recall, GumpButton gate, GumpButton sacred, GumpButton scroll, GumpButton def, GumpButton drop, string location, string name, int color)
        {
            _owner   = owner;
            _recall  = recall;
            _gate    = gate;
            _sacred  = sacred;
            _scroll  = scroll;
            _default = def;
            _drop    = drop;
            Name     = name;
            Location = location;
            Map      = Map.Internal;
            switch (color)
            {
            case 1102:
                Map = Map.Malas;
                break;

            case 81:
                Map = Map.Felucca;
                break;

            case 10:
                Map = Map.Trammel;
                break;

            case 1154:
                Map = Map.Tokuno;
                break;

            case 0:
                Map = Map.TerMur;
                break;
            }
            Position = Geometry.CoordsToPoint(Location, Map);
        }
Example #4
0
//==========================================================================================
//main
//==========================================================================================
        static void Main(string[] args)
        {
            string fileName     = "C:\\Users\\Justin\\Desktop\\antrail";
            string windRailFile = "C:\\Users\\Justin\\Desktop\\windrail";
            List <Tuple <int, int, int> > rail     = readRail(fileName);
            List <Tuple <int, int, int> > windRail = readRail(windRailFile);

            PlayerMobile Player    = PlayerMobile.GetPlayer();
            var          RUOconfig = new RuneBookConfig()
            {
                ScrollOffset  = 2,
                DropOffset    = 3,
                DefaultOffset = 4,
                RecallOffset  = 5,
                GateOffset    = 6,
                SacredOffset  = 7,
                Jumper        = 6
            };

            Item     runebookserial = GetTargetItem();
            Runebook rb             = new Runebook(runebookserial.Serial.Value, RUOconfig);


            Console.WriteLine("recalling to ant location");
            recallTo(Player, rb, "antHole");
            Stealth.Client.Wait(1000);
            Console.WriteLine("going into anthole");
            //===============================================================================
            //ant hole
            //===============================================================================
            int locX = Player.Location.X;
            int locY = Player.Location.Y;

            clickHole(Player, locX, locY);
            for (int i = 0; i < rail.Count(); i++)
            {
                Console.WriteLine("moving to: ");
                Console.WriteLine("\t" + rail.ElementAt(i).Item1 + "," + rail.ElementAt(i).Item2 + "," + rail.ElementAt(i).Item3);

                if (rail.ElementAt(i).Item1 == 0 &&
                    rail.ElementAt(i).Item2 == 0 &&
                    rail.ElementAt(i).Item3 == 0)
                {
                    int _X = Player.Location.X;
                    int _Y = Player.Location.Y;
                    Console.WriteLine("clicking hole 1...");
                    clickHoleTile(Player, _X, _Y, 5913, 1893, 1073886108);
                    Console.WriteLine("success.");
                    continue;
                }
                if (rail.ElementAt(i).Item1 == 1 &&
                    rail.ElementAt(i).Item2 == 1 &&
                    rail.ElementAt(i).Item3 == 1)
                {
                    int _X = Player.Location.X;
                    int _Y = Player.Location.Y;
                    Console.WriteLine("clicking hole 2...");
                    clickHoleTile(Player, _X, _Y, 5876, 1892, 1073886069);
                    Console.WriteLine("success.");
                    continue;
                }

                if (Player.Hits != Player.MaxHits)
                {
                    healSelf(Player);
                }
                Console.WriteLine("railNum: " + i + " out of " + rail.Count());
                Console.WriteLine((rail.Count - i) + " rail spots to go.");

                advancePosition(Player, rail.ElementAt(i));
            }
            //Console.ReadLine();
            //===========================================================================
            //find the matriarch
            //============================================================================
            SDK.Initialize();

            List <Mobile> npcs = Scanner.FindMobiles();

            foreach (Mobile m in npcs)
            {
                if (m.Serial.Value == 1640)
                {
                    ushort _locX = (ushort)m.Location.X;
                    ushort _locY = (ushort)m.Location.Y;
                    sbyte  _locZ = (sbyte)m.Location.Z;
                    Console.WriteLine("Npc found. Moving to location...");
                    Player.Movement.MoveXYZ(_locX, _locY, _locZ, 1, 1, true);
                    Stealth.Client.Wait(1000);
                    acceptQuesticle(Player, m);

                    break;
                }
            }
            //============================================================================
            //at wind passage. Need to kill 7 ants
            //============================================================================
            Console.WriteLine("recalling to wind");
            recallTo(Player, rb, "windTram");
            Console.WriteLine("begining rail...");
            List <Ants> ants = new List <Ants>();

            Scanner.Range         = 3;
            Scanner.VerticalRange = (uint)Player.Location.Z;
            for (int i = 0; i < windRail.Count(); i++)
            {
                if (Player.Hits != Player.MaxHits)
                {
                    healSelf(Player);
                }
                advancePosition(Player, windRail.ElementAt(i));
                SDK.Initialize();

                ants = Scanner.Find <Ants>(0x0, false).OrderBy(x => x.Distance).ToList();
                foreach (Ants m in ants)
                {
                    Player.Cast("Wither");
                    Thread.Sleep(1000);
                    if (Player.Hits != Player.MaxHits)
                    {
                        healSelf(Player);
                    }
                }
                if (ants.Count == 0)
                {
                    continue;
                }
            }
        }