بسم الله الرحمن الرحيم
موضوعنا النهارده ازاى نخلى الوحوش توقع ايتميات معينه
يلا ندخل في الموضوع علي طول
في كلاس
- MonsterTable
اتنزل لحد ماتلقي
- #region
اتحط دول تحيهم بعد ما تقفل من السالب
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
#region DB CPS uint ran13 = (uint)Kernel.Random.Next(1, 50); if (ran13 > 15) { if (this.Name == "Pheasant") { if (killer.Name.Contains("Guard")) return; uint Uid = 0; Random R = new Random(); //int Nr = R.Next(1, 1); switch (((byte)Kernel.Random.Next(1, 50))) { case 1: Uid = 720996;//SmallCPBox break; case 2: Uid = 1088000; break; case 3: Uid = 720998;//LargCPBox break; case 4: Uid = 1088000; break; case 5: Uid = 720996;//SmallCPBox break; case 6: Uid = 1088001; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (DeadPool.Game.Enums.Color)Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.UID = Program.NextItemID; ; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = Uid; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } } #endregion |
تعال نفهم شويه حجات
1 |
if (this.Name == "Pheasant") |
- Pheasant
- ده اسم الوحش الي في التون وممكن تغير لي وحش حسب مانت عايز الوحوش
1 |
Uid = 720996;//SmallCPBox |
- 720996
- ده ايتيم الي الوحش المفترض يوقعه بعد ما يموت
وكده انا خلصت شرح بالتوفيق