|
المشاركات 599 |
+التقييم 0.29 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل Windows 7 Ultimate |
رقم العضوية 116 |
public
public unsafe ServerSockets.Packet GetArray(ServerSockets.Packet stream, bool WindowsView)
{
// Console.WriteLine(this.GetHashCode());
stream.InitWriter();
stream.Write(Extensions.Time32.Now.Value);
stream.Write(Mesh);//(uint)(TransformationID * 10000000 + Face * 10000 + Body));
stream.Write(UID);
stream.Write(GuildID);
if (Program.ServerConfig.IsInterServer == false && Owner.OnInterServer == false)
stream.Write((ushort)GuildRank);
else
stream.ZeroFill(2);
stream.Write((uint)0);//unknow
for (int x = 0; x < BitVector.bits.Length; x++)
stream.Write(BitVector.bits[x]);
if (Game.MsgTournaments.MsgSchedules.CurrentTournament.Type == Game.MsgTournaments.TournamentType.FreezeWar
|| Game.MsgTournaments.MsgSchedules.CurrentTournament.Type == Game.MsgTournaments.TournamentType.FootBall
|| Game.MsgTournaments.MsgSchedules.CurrentTournament.Type == Game.MsgTournaments.TournamentType.TeamDeathMatch)
{
if (Game.MsgTournaments.MsgSchedules.CurrentTournament.InTournament(Owner))
stream.Write((ushort)0);
else
stream.Write((ushort)AparenceType);
}
else
stream.Write((ushort)AparenceType);//apparence type
stream.Write(HeadId);
stream.Write(GarmentId);
stream.Write(ArmorId);
stream.Write(LeftWeaponId);
stream.Write(RightWeaponId);
stream.Write(LeftWeaponAccessoryId);
stream.Write(RightWeaponAccessoryId);
stream.Write(SteedId);
stream.Write(MountArmorId);
stream.Write(WingId);
stream.Write((byte)WingPlus);//talisman plus
stream.Write(WingProgress);
stream.Write((uint)0);//?? unknow
stream.ZeroFill(6);//unknow
stream.Write(HitPoints);
stream.Write((ushort)0);//unknow
stream.Write((ushort)0);//monster level
stream.Write(X);
stream.Write(Y);
stream.Write(Hair);
stream.Write((byte)Angle);
stream.Write((uint)Action);
stream.Write((ushort)0);//unknow
stream.Write((byte)0);//padding?
stream.Write(Reborn);
stream.Write(Level);
stream.Write((byte)(WindowsView ? 1 : 0));
stream.Write((byte)Away);//away
stream.Write(ExtraBattlePower);
stream.Write((uint)0);//unknow position = 125
stream.Write((uint)0);//unknow position = 129
stream.Write((uint)0);//unknow p = 133;
stream.Write((uint)(FlowerRank + 10000));
stream.Write((uint)NobilityRank);
stream.Write(ColorArmor);
stream.Write(ColorShield);
stream.Write(ColorHelment);
stream.Write((uint)0);//quiz points
stream.Write(SteedPlus);
stream.Write((ushort)0);//unknow
stream.Write(SteedColor);
stream.Write((ushort)Enilghten);
stream.Write((ushort)0);//merit points
stream.Write((uint)0);//unknow
stream.Write((uint)0);//unknow
stream.Write(ClanUID);
stream.Write((uint)ClanRank);
stream.Write((uint)0);//unknow
stream.Write((ushort)MyTitle);
stream.Write((uint)PokerTableID);
stream.Write((uint)PokerSeat);
stream.Write((byte)0);
stream.Write((byte)(Owner.IsWatching() ? 1 : 0));//1 == invisible player watcher
stream.Write((byte)0);
stream.Write((byte)0);
stream.Write((byte)0);
// stream.ZeroFill(14);
stream.Write(HeadSoul);
stream.Write(ArmorSoul);
stream.Write(LeftWeapsonSoul);
stream.Write(RightWeapsonSoul);
stream.Write((byte)ActiveSublass);
stream.Write(SubClassHasPoints);
stream.Write((uint)0);//unknow
stream.Write((ushort)FirstClass);
stream.Write((ushort)SecoundeClass);
stream.Write((ushort)Class);
stream.Write((ushort)CountryID);//country
if (Owner.Team != null)
{
stream.Write((uint)Owner.Team.UID);
}
else
stream.Write(0);
stream.Write(BattlePower);
stream.Write(JiangHuTalent);
stream.Write(JiangHuActive);
// stream.Write((ushort)2);
stream.Write((byte)0);
if (OnMyOwnServer == false)
stream.Write(ServerID);
else
stream.ZeroFill(2);
stream.Write((uint)RealUID);
stream.Write((byte)2);//clone count
stream.Write((ushort)0); // clone ID
stream.Write(0); //clone owner
if (InUnion)
{
stream.Write((uint)MyUnion.UID);
stream.Write((uint)ExploitsRank);//??
stream.Write((uint)Role.Instance.Union.Member.GetRank(UnionMemeber.Rank));//UnionMemeber.Rank);
stream.Write((byte)(UnionMemeber.Rank == Instance.Union.Member.MilitaryRanks.Emperor ? 1 : 0));
stream.Write((byte)MyUnion.IsKingdom);
}
else
{
stream.ZeroFill(4);
stream.Write((uint)ExploitsRank);
stream.ZeroFill(6);
}
stream.Write(SpecialTitleID);
stream.Write(SpecialTitleScore);
stream.Write(SpecialWingID);
stream.Write((uint)MainFlag);
stream.Write(0);
stream.Write((byte)0);
stream.Write((uint)0);
if (OnMyOwnServer == false)
{
if (InUnion)
stream.Write(Name, string.Empty, ClanName, string.Empty, string.Empty, MyGuild != null ? MyGuild.GuildName : string.Empty, MyUnion.Name);
else
stream.Write(Name, string.Empty, ClanName, string.Empty, string.Empty, MyGuild != null ? MyGuild.GuildName : string.Empty, string.Empty);
}
else
{
if (InUnion)
stream.Write(Name, string.Empty, ClanName, string.Empty, string.Empty, string.Empty, MyUnion.Name);
else
stream.Write(Name, string.Empty, ClanName, string.Empty, string.Empty, string.Empty, string.Empty);
}
stream.Finalize(Game.GamePackets.SpawnPlayer);
return stream;
}
public uint GetShareBattlePowers(uint target_battlepower)
{
return (uint)Database.TutorInfo.ShareBattle(this.Owner, (int)target_battlepower);
}
public string NewUser = "";
}
}
public
public unsafe ServerSockets.Packet GetArray(ServerSockets.Packet stream, bool view)
{
if (IsFloor && Mesh != 980)
{
return stream.ItemPacketCreate(this.FloorPacket);
}
stream.InitWriter();
stream.Write(Extensions.Time32.Now.Value);
stream.Write(Mesh);
stream.Write(UID);
stream.ZeroFill(10);
for (int x = 0; x < BitVector.bits.Length; x++)
stream.Write(BitVector.bits[x]);
stream.ZeroFill(57);
if (Boss > 0)
{
if (IsFloor)
{
stream.Write(StampFloorSecounds);
}
else
{
uint key = (uint)(Family.MaxHealth / 10000);
if (key != 0)
stream.Write((uint)(HitPoints / key));
else
stream.Write((uint)(HitPoints * Family.MaxHealth));
}
}
else
{
if (IsFloor)
{
stream.Write(StampFloorSecounds);
}
else
stream.Write(HitPoints);
}
stream.Write((ushort)0);
stream.Write((ushort)Level);
stream.Write(X);
stream.Write(Y);
stream.Write((ushort)0);
stream.Write((byte)Facing);
stream.Write((byte)Action);
stream.ZeroFill(93);
stream.Write((byte)Boss);
stream.ZeroFill(50);
if (IsFloor)
{
stream.Write((ushort)FloorPacket.m_ID);
stream.Write((byte)0);
stream.Write((uint)(OwnerFloor.Player.UID));
stream.Write((ushort)9);
}
else
{
stream.ZeroFill(7);
stream.Write((ushort)0);
}
stream.Write(0);
stream.Write(0);
stream.Write(0);
//
stream.Write(0);
stream.Write(0);
stream.Write(0);
stream.Write(0);
if (IsFloor)
{
stream.Write(PetFlag);//3?
}
else
stream.Write(0);
stream.Write((byte)0);
stream.Write((uint)0);
stream.Write(Name, string.Empty, string.Empty, string.Empty);
stream.Finalize(Game.GamePackets.SpawnPlayer);
// MyConsole.PrintPacketAdvanced(stream.Memory, stream.Size);
return stream;
}
public unsafe void SendUpdate(uint[] Value, Game.MsgServer.MsgUpdate.DataType datatype)
{
using (var rec = new ServerSockets.RecycledPacket())
{
var stream = rec.GetStream();
Game.MsgServer.MsgUpdate packet = new Game.MsgServer.MsgUpdate(stream, UID, 1);
stream = packet.Append(stream, datatype, Value);
stream = packet.GetArray(stream);
Send(stream);
}
}
}
}
public class TutorInfo
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Project_Terror_v2.Database
{
public class TutorInfo
{
public class TutorType
{
public int Index;
public int MinLevel;
public int MaxLevel;
public int StudentNum;
public int BattleLevShare;
}
public static List<TutorType> TutorTypes = new List<TutorType>();
public static int[] BattleLimit = new int[400];
public static void Load()
{
string[] baseText = File.ReadAllLines(Program.ServerConfig.DbLocation +
"cq_tutor_type.txt");
foreach (var bas_line in baseText)
{
string[] line = bas_line.Split(',');
TutorType obj = new TutorType();
obj.Index = int.Parse(line[0]);
obj.MinLevel = int.Parse(line[1]);
obj.MaxLevel = int.Parse(line[2]);
obj.StudentNum = int.Parse(line[3]);
obj.BattleLevShare = int.Parse(line[4]);
TutorTypes.Add(obj);
}
baseText = File.ReadAllLines(Program.ServerConfig.DbLocation +
"cq_tutor_battle_limit_type.txt");
BattleLimit = new int[baseText.Length + 1];
foreach (var bas_line in baseText)
{
string[] line = bas_line.Split(',');
BattleLimit[int.Parse(line[0])] = int.Parse(line[1]);
}
}
public static TutorType GetTutorInfo(Client.GameClient user)
{
foreach (var obj in TutorTypes)
{
if (user.Player.Level >= obj.MinLevel && Math.Min(140, (int)
user.Player.Level) <= obj.MaxLevel)
return obj;
}
return null;
}
public static int AddAppCount(Client.GameClient user)
{
var info = GetTutorInfo(user);
if (info != null)
return info.StudentNum;
return 0;
}
public static int ShareBattle(Client.GameClient Mentor, int Student_battle)
{
if (Student_battle >= Mentor.Player.RealBattlePower)
return 0;
var Tutor = GetTutorInfo(Mentor);
if (Tutor != null)
{
int battle_lev_share = Tutor.BattleLevShare;
int share = (Mentor.Player.RealBattlePower - Student_battle) *
battle_lev_share / 100;
int share_limit = BattleLimit[Math.Min(BattleLimit.Length - 1,
Student_battle)];
return Math.Min(share, share_limit);
}
return 0;
}
}
}
[NpcAttribute(NpcID.Epic)]
public static void Epic(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
{
Dialog dialog = new Dialog(client, stream);
switch (Option)
{
case 0:
{
dialog.AddText("Hello <tip color=0xfff05050> i have some Epic And Skills for you");
dialog.AddText(client.Player.Name + "</tip> ,, i Have Created By MR.Bodawail The Best,");
dialog.AddText(" how can i help you?");
dialog.AddOption("ShadowScroll.", 1);
dialog.AddOption("TwilightScroll.", 2);
dialog.AddOption("FatalScroll.", 3);
dialog.AddOption("BreakingTouchScroll.", 4);
dialog.AddOption("BlessingTouchScroll.", 5);
dialog.AddOption("AuroraLotusScroll.", 6);
dialog.AddOption("FlameLotusScroll.", 7);
dialog.AddOption("Life`sEye.", 8);
dialog.AddOption("DivinePanacea.", 9);
dialog.AddOption("SuperHossuToken.", 10);
dialog.AddOption("WrathoftheEmperorScroll.", 11);
dialog.AddOption("InfernalEchoScroll.", 12);
dialog.AddOption("GraceofHeavenScroll.", 13);
dialog.AddOption("Later.", 255);
dialog.AddAvatar(255).FinalizeDialog();
break;
}
#region ShadowScroll
case 1:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3004459);
client.SendSysMesage("Congratz you got a ShadowScroll in your inventory.");
}
break;
}
#endregion
/////////////////
#region TwilightScroll
case 2:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3004460);
client.SendSysMesage("Congratz you got a TwilightScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////////////////////////
#region FatalScroll
case 3:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3004461);
client.SendSysMesage("Congratz you got a FatalScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
///////////
#region BreakingTouchScroll
case 4:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3006019);
client.SendSysMesage("Congratz you got a BreakingTouchScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////////
#region BlessingTouchScroll
case 5:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3006020);
client.SendSysMesage("Congratz you got a BlessingTouchScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
//////
#region AuroraLotusScroll
case 6:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3006018);
client.SendSysMesage("Congratz you got a AuroraLotusScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
//////
#region FlameLotusScroll
case 7:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3006017);
client.SendSysMesage("Congratz you got a FlameLotusScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
//
#region Life`sEye
case 8:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3004464);
client.SendSysMesage("Congratz you got a Life`sEye in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////
#region DivinePanacea
case 9:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3006016);
client.SendSysMesage("Congratz you got a DivinePanacea in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////
#region SuperHossuToken
case 10:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3006226);
client.SendSysMesage("Congratz you got a SuperHossuToken in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////
#region WrathoftheEmperorScroll
case 11:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3007567);
client.SendSysMesage("Congratz you got a WrathoftheEmperorScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////
#region InfernalEchoScroll
case 12:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3007568);
client.SendSysMesage("Congratz you got a InfernalEchoScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
////
#region GraceofHeavenScroll
case 13:
{
if (!client.Inventory.HaveSpace(1))
{
client.SendSysMesage("Plz Fee up some space 1 Slots.");
// System.Windows.Forms.MessageBox.Show("Character must have 36 free slots into inventory");
return;
}
else if (client.Player.ConquerPoints < 500000)
{
client.SendSysMesage("You don't have Enough Cps i need 500k Cps.");
return;
}
else
{
client.Player.ConquerPoints -= 500000;
client.Inventory.Add(stream, 3007566);
client.SendSysMesage("Congratz you got a GraceofHeavenScroll in your inventory.");
}
break;
}
#endregion #region Stuff trojan
}
}
الذين يشاهدون محتوى الموضوع الآن : 3 ( الأعضاء 0 والزوار 3) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
كيفيت تركيب لودر ميجو في سورس ال3دي بتاع الاجنبي | ElSaher | تطوير سيرفرات كونكر | 21 | 2024-09-29 06:04 PM |
كيفيت الغاء ال3دي من السورس كلو وا البدش | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-03-09 01:39 PM |