Exemplo n.º 1
0
        public void Drop(script.monster.Monster mob, Player player)
        {
            InvSlot  = -1;
            m_Map    = player.Map;
            DropTime = LKCamelot.Server.tickcount.ElapsedMilliseconds;

            Loc = new Point2D(mob.m_Loc.X, mob.m_Loc.Y);

            Parent = null;
        }
Exemplo n.º 2
0
        public SetObjectEffectsMonster(script.monster.Monster play)
            : base(0x34)
        {
            //  SetObjectEffects = 0x34; // 0x34 4id 1light 1trans 4byffs 1staticmagic
            m_Stream.Write(play.m_Serial);
            m_Stream.Write((byte)0);           //lightrad
            m_Stream.Write((byte)play.Transp); //transp
            m_Stream.Fill(4);
            m_Stream.Write((byte)0);           //cast once

            m_Stream.Write((byte)play.FrameType);

            m_Stream.Write((byte)0); // speed
            m_Stream.Write((byte)1);
        }
Exemplo n.º 3
0
        public int Proc(Player player, script.monster.Monster mob, Player play = null)
        {
            int     take      = 0;
            Point2D targetLoc = (play != null) ? play.Loc : mob.m_Loc;

            if (Util.Dice(1, 100, 0) <= (Stage < 7 ? 10 : 14))
            {
                take += Util.Dice((player.GetStat("str") / 1000), 50, player.GetStat("str") / 16);
                int mobile = Serial.NewMobile;
                World.SendToAll(new QueDele(player.Map, new CreateMagicEffect(mobile, 1, (short)targetLoc.X, (short)targetLoc.Y, new byte[] { 4, 0, 0, 0, 0, 0, 0, 0, 0, 110 }, 0).Compile()));
                var tmp = new QueDele(LKCamelot.Server.tickcount.ElapsedMilliseconds + 1300, player.m_Map, new DeleteObject(mobile).Compile());
                tmp.tempser = mobile;
                World.TickQue.Add(tmp);
            }
            return(take);
        }
Exemplo n.º 4
0
        public static Point2D AddMove(script.monster.Monster mob)
        {
            int face = mob.Face;
            int x    = mob.m_Loc.X;
            int y    = mob.m_Loc.Y;

            if (face == 0)
            {
                y -= 1;
            }
            if (face == 1)
            {
                x += 1;
                y -= 1;
            }
            if (face == 2)
            {
                x += 1;
            }
            if (face == 3)
            {
                x += 1;
                y += 1;
            }
            if (face == 4)
            {
                y += 1;
            }
            if (face == 5)
            {
                x -= 1;
                y += 1;
            }
            if (face == 6)
            {
                x -= 1;
            }
            if (face == 7)
            {
                y -= 1;
                x -= 1;
            }
            var p = new Point2D(x, y);

            return(p);
        }
Exemplo n.º 5
0
        public int Proc(Player player, script.monster.Monster mob, Player play = null)
        {
            int     take      = 0;
            Point2D targetLoc = (play != null) ? play.Loc : mob.m_Loc;

            if (Util.Random((20 + 15), 100) >= 100 * (10 * 0.1))
            {
                take += Util.Dice(((player.GetStat("str") + player.GetStat("dex")) / 1000), 10000, (player.GetStat("str") + player.GetStat("dex")) / 32);
                int mobile = Serial.NewMobile;
                World.SendToAll(new QueDele(player.Map, new CreateMagicEffect(mobile, 1, (short)targetLoc.X, (short)targetLoc.Y, new byte[] { 4, 0, 0, 0, 0, 0, 0, 0, 0, 21 }, 0).Compile()));
                var tmp = new QueDele(LKCamelot.Server.tickcount.ElapsedMilliseconds + 1300, player.m_Map, new DeleteObject(mobile).Compile());
                tmp.tempser = mobile;
                World.TickQue.Add(tmp);
            }

            //player.HPCur = player.HP;
            return(take);
        }
Exemplo n.º 6
0
        public SetObjectEffectsMonsterSpell(script.monster.Monster play, int spell)
            : base(0x34)
        {
            //  SetObjectEffects = 0x34; // 0x34 4id 1light 1trans 4byffs 1staticmagic
            m_Stream.Write(play.m_Serial);
            m_Stream.Write((byte)0);           //lightrad
            m_Stream.Write((byte)play.Transp); //transp
            m_Stream.Write((byte)spell);
            m_Stream.Fill(3);
            m_Stream.Write((byte)0); //cast once

            if (play.m_MonsterID >= 200)
            {
                m_Stream.Write((byte)0);
            }
            else
            {
                m_Stream.Write((byte)1); //sprite frame type
            }
            m_Stream.Write((byte)0);     // speed
            m_Stream.Write((byte)1);
        }