Ejemplo n.º 1
0
        public override void Init(World owner)
        {
            Random rand = new System.Random();
            int    x, y;

            do
            {
                x = rand.Next(0, owner.Map.Width);
                y = rand.Next(0, owner.Map.Height);
            } while (owner.Map[x, y].Region != TileRegion.Spawn);
            Move(x + 0.5f, y + 0.5f);
            tiles = new byte[owner.Map.Width, owner.Map.Height];
            fames = new FameCounter(this);
            SetNewbiePeriod();
            if (!psr.CheckAccountInUse(AccountId))
            {
                base.Init(owner);
            }
            else
            {
                psr.Disconnect();
            }
            if (psr.Character.Pet >= 0)
            {
                GivePet((short)psr.Character.Pet);
            }
            try { SendAccountList(Locked, LOCKED_LIST_ID); }
            catch { }
            try { SendAccountList(Ignored, IGNORED_LIST_ID); }
            catch { }
        }
Ejemplo n.º 2
0
        public override void Init(World owner)
        {
            var rand = new Random();
            int x, y;

            do
            {
                x = rand.Next(0, owner.Map.Width);
                y = rand.Next(0, owner.Map.Height);
            } while (owner.Map[x, y].Region != TileRegion.Spawn);
            Move(x + 0.5f, y + 0.5f);
            tiles = new byte[owner.Map.Width, owner.Map.Height];
            fames = new FameCounter(this);
            SetNewbiePeriod();
            if (!psr.CheckAccountInUse(AccountId))
            {
                base.Init(owner);
            }
            else
            {
                psr.Disconnect();
            }
            if (psr.Character.Pet >= 0)
            {
                GivePet((short)psr.Character.Pet);
            }
            try
            {
                SendAccountList(Locked, LOCKED_LIST_ID);
            }
            catch
            {
            }
            try
            {
                SendAccountList(Ignored, IGNORED_LIST_ID);
            }
            catch
            {
            }
            if (!psr.ConnectedBuild.StartsWith(psr.clientVer))
            {
                psr.SendPacket(new TextBoxPacket
                {
                    Title   = "Outdated Client!",
                    Message =
                        "You are running an outdated client version.\nGet or play the latest one on the\nup-to-date <u><a href='http://forum.zerorealms.com'>web client</a></u>.",
                    Button1 = "Okay"
                });
                psr.Disconnect();
            }
        }
Ejemplo n.º 3
0
        public override void Init(World owner)
        {
            Random rand = new System.Random();
            int    x, y;

            do
            {
                x = rand.Next(0, owner.Map.Width);
                y = rand.Next(0, owner.Map.Height);
            } while (owner.Map[x, y].Region != TileRegion.Spawn);
            Move(x + 0.5f, y + 0.5f);
            tiles = new byte[owner.Map.Width, owner.Map.Height];
            fames = new FameCounter(this);
            if (!psr.CheckAccountInUse(AccountId))
            {
                base.Init(owner);
            }
            else
            {
                psr.Disconnect();
            }
        }