المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : نظام التريد لوج


محمد ياسر
2019-07-20, 06:48 PM
السلام عليكم ورحمة الله وبركاته
نظام التريد لوج ذي الي منزله RIDER في السورس سورس KhaledMohamed V3 Golden Edition Update (عفواً لايمكن عرض الروابط في الإرشيف)
الي نزله من امبارح
عفواً لايمكن عرض الروابط في الإرشيف
النظام ده يخليك تعرف مين ترد مع مين وترد ايه وامتا وكل معلومه صغيره وكبيره
يلا نبداء الاضافه
هتفتح
PacketHandler
تدور على


static void AcceptTrade

اقفله من السالب وبدله بده
private static void AcceptTrade(CoFans.Network.GamePackets.Trade trade, GameState client)
{
GameState state = null;
if (Kernel.GamePool.TryGetValue(client.Trade.TraderUI D, out state))
{
client.Trade.Accepted = true;
state.Send(trade);
if (state.Trade.Accepted)
{
DateTime time;
string str;
if ((client.Inventory.Count + state.Trade.Items.Count) <= 40)
{
foreach (IConquerItem item in state.Trade.Items)
{
if (state.Inventory.ContainsUID(item.UID))
{
client.Inventory.Add(item, Enums.ItemUse.Move);
state.Inventory.Remove(item.UID, Enums.ItemUse.None, true);
time = DateTime.Now;
str = string.Concat(new object[] { time.Year, "-", time.Month, "//" });
string str2 = time.Day + "//";
if (!Directory.Exists(Application.StartupPath + @"gmlog"))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\");
}
if (!Directory.Exists(Application.StartupPath + @"gmlog\\Trade"))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\\Trade");
}
if (!Directory.Exists(Application.StartupPath + @"\gmlog\\Trade\" + str))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\\Trade\" + str);
}
if (!File.Exists(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" })))
{
File.CreateText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" }));
}
File.WriteAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" }), string.Concat(new object[] { File.ReadAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" })), "\r\n", state.Entity.Name, " gaved ", client.Entity.Name, " item:", item.UID, " Plus:", item.Plus, " Name: ", ConquerItemInformation.BaseInformations[item.ID].Name }));
}
}
}
if ((state.Inventory.Count + client.Trade.Items.Count) <= 40)
{
foreach (IConquerItem item in client.Trade.Items)
{
if (client.Inventory.ContainsUID(item.UID))
{
state.Inventory.Add(item, Enums.ItemUse.Move);
client.Inventory.Remove(item.UID, Enums.ItemUse.None, true);
time = DateTime.Now;
str = string.Concat(new object[] { time.Year, "-", time.Month, "//" });
if (!Directory.Exists(Application.StartupPath + @"gmlog"))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\");
}
if (!Directory.Exists(Application.StartupPath + @"gmlog\\Trade"))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\\Trade");
}
if (!Directory.Exists(Application.StartupPath + @"\gmlog\\Trade\" + str))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\\Trade\" + str);
}
if (!File.Exists(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" })))
{
File.CreateText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" }));
}
File.WriteAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" }), string.Concat(new object[] { File.ReadAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str, @"\", time.Day, ".txt" })), "\r\n", client.Entity.Name, " gaved ", state.Entity.Name, " item:", item.UID, " Plus:", item.Plus, " Name: ", ConquerItemInformation.BaseInformations[item.ID].Name }));
}
}
}
if (state.Trade.Money <= state.Entity.Money)
{
state.Entity.Money -= state.Trade.Money;
client.Entity.Money += state.Trade.Money;
}
if (client.Trade.Money <= client.Entity.Money)
{
client.Entity.Money -= client.Trade.Money;
state.Entity.Money += client.Trade.Money;
}
if (state.Trade.ConquerPoints <= state.Entity.ConquerPoints)
{
state.Entity.ConquerPoints -= state.Trade.ConquerPoints;
client.Entity.ConquerPoints += state.Trade.ConquerPoints;
}
if (client.Trade.ConquerPoints <= client.Entity.ConquerPoints)
{
client.Entity.ConquerPoints -= client.Trade.ConquerPoints;
state.Entity.ConquerPoints += client.Trade.ConquerPoints;
}
DateTime now = DateTime.Now;
string str3 = string.Concat(new object[] { now.Year, "-", now.Month, "//" });
if (!Directory.Exists(Application.StartupPath + @"gmlog"))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\");
}
if (!Directory.Exists(Application.StartupPath + @"gmlog\\Trade"))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\\Trade");
}
if (!Directory.Exists(Application.StartupPath + @"\gmlog\\Trade\" + str3))
{
Directory.CreateDirectory(Application.StartupPath + @"\gmlog\\Trade\" + str3);
}
if (!File.Exists(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str3, @"\", now.Day, ".txt" })))
{
File.CreateText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str3, @"\", now.Day, ".txt" }));
}
File.WriteAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str3, @"\", now.Day, ".txt" }), string.Concat(new object[] { File.ReadAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str3, @"\", now.Day, ".txt" })), "\r\nTrader:", client.Entity.Name, ": TradeWith: ", state.Entity.Name, " Cps1: ", client.Trade.ConquerPoints, " Cps2: ", state.Trade.ConquerPoints, " Time: ", DateTime.Now }));
File.WriteAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str3, @"\", now.Day, ".txt" }), File.ReadAllText(string.Concat(new object[] { Application.StartupPath, @"\gmlog\\Trade\", str3, @"\", now.Day, ".txt" })) + "\r\n-------------------------------------------------------------------");
trade.Type = 5;
trade.dwParam = client.Entity.UID;
client.Send(trade);
trade.dwParam = state.Entity.UID;
state.Send(trade);
state.Trade = new CoFans.Game.ConquerStructures.Trade();
client.Trade = new CoFans.Game.ConquerStructures.Trade();
client.Entity.Money = client.Entity.Money;
state.Entity.Money = state.Entity.Money;
client.Entity.ConquerPoints = client.Entity.ConquerPoints;
state.Entity.ConquerPoints = state.Entity.ConquerPoints;
EntityTable.UpdateCps(client);
EntityTable.UpdateCps(state);
}
}
}

بعد كدا نفتح
ServerBase,Constants.cs
ندور على
public static Message Accuracy

نحط فوقها بالظبط الكود دا
public const string Unhandledgmlog = @"gmlog";

ممكن يظهر لبعض الناس ايرور فى
Application

هتخليها كدا
System.Windows.Forms.Application

ممكن يظهر ايرور فى
ConquerItemInformation
هتخليها كدا
CoFans.Database.ConquerItemInformation

طبعا غير اسم البروجيكت الى هو CoFans

تكمله للموضوع فى ناس عاوزه تشوف الشات بس فى حاجه هنا
موضوع الشات هيجبلك كل يوم جديد لما اللعبه ترستر ايرور 1
موضوع سهل و خفيف و مفيد فى نفس الوقت

اللسستم ده قديم كان بتاع واحد اسمه khalidwepas
وياريت يكون موضوع مفيد

Tefa
2019-07-20, 09:15 PM
عاش

AMREL3FREIT
2019-07-20, 11:50 PM
استمر

MahmoudElsndbad
2019-07-23, 02:28 AM
تسلم ايدك

abuhaneen
2019-07-30, 06:06 PM
تسلم ع مجهودك والله

ALz3em
2019-08-08, 04:39 PM
عاش

faresali2
2019-08-08, 06:23 PM
شكرا لك على مجهودك

asmo2003
2019-09-08, 11:05 AM
شكرا

Mr.MoZa
2019-09-10, 04:51 PM
استمرررر ♥

ElSaher
2019-09-10, 06:14 PM
موضوع مفيد حقن

MohamedModyAdel
2019-09-20, 12:07 AM
عاش

HBESA
2019-09-22, 12:35 PM
شكرا

Zombie
2019-09-24, 03:18 AM
تسلم

انت عمري
2019-10-02, 03:41 AM
لو سمحت ممكن النظام دة لسورس msg

eslambakr
2019-10-03, 11:10 AM
شكرا

انت عمري
2019-10-23, 11:37 AM
ينفع الطريقة لسورس اليكس ؟

ModyMohamedAdel
2019-11-05, 09:12 PM
عاش

مصطفي رمضانى
2020-02-14, 08:55 PM
عاش

Mr.Hero
2020-02-14, 10:35 PM
عاش فشخ بالتوفيق

asd201230099
2020-02-21, 10:09 PM
عععععاااااااااااااش

Tarek Roshdi
2020-03-10, 02:56 AM
شكرا

Tyranny-Team's
2020-04-05, 04:43 AM
thx

ahmed.rashad
2021-08-21, 03:50 AM
تمام

ahmed.rashad
2021-08-21, 04:30 AM
OK

Zuko
2021-12-07, 01:45 PM
ty

zorom
2021-12-15, 12:42 AM
عاااااااااااااش

mohammedshafik
2023-05-25, 08:52 AM
thankssss

DarBaKa
2024-03-24, 05:54 PM
عاش

ahmedmatrix12
2024-03-25, 01:14 AM
شكرا