الموضوع: System GameUpdates
عرض مشاركة واحدة
احصائياتى

الردود
2

المشاهدات
2825
 
محمد ياسر

محمد ياسر is on a distinguished road

    غير متواجد

المشاركات
1,940

+التقييم
0.89

تاريخ التسجيل
Apr 2019

الاقامة
https://www.facebook.com/daany

نظام التشغيل

رقم العضوية
1
2019-04-23, 02:17 PM
المشاركة 1 
#1  
افتراضي System GameUpdates

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

كود:
Network 

ۈآڤـﭥﺢـ ڤـۈلْـﮈړ


كود:
 GamePackets 

اٌعٍمِـلِـ كُلِـاٌسُ جِدّيٌـدّ بّــ اٌسُمِـ ,

كود:
GameUpdates 

ﺿﯾﭬ ﭴۆاھَہّ ﮃا


كود:
using System
using System.Collections.Generic
using System.Linq
using System.Text

namespace 
LordsRoad.Network.GamePackets 

public class 
GameUpdates WriterInterfaces.IPacket 

private 
byte[] Buffer

public const 
byte 
Header 
0
Body 1
Footer 2

public 
GameUpdates(byte _Typestring _String

this.Buffer = new byte[29 _String.Length]; 
WriteUInt16((ushort)(Buffer.Length Cool0Buffer); 
WriteUInt16(20322Buffer); 
WriteUInt32((uint)Time32.timeGetTime().GetHashCode(), 4Buffer); 
Buffer[15] = 112
Buffer[16] = 1
Type _Type
_string _String


public 
byte Type 

get { return Buffer[14]; } 
set Buffer[14] = value; } 


public 
string _string 

get { return System.BitConverter.ToString(Buffer18Buffer[17]); } 
set WriteStringWithLength(value17Buffer); } 

public 
void Send(Client.GameClient client

client.Send(Buffer); 

public 
void Deserialize(byte[] buffer

this.Buffer buffer


public 
byte[] ToArray() 

return 
Buffer




خًشْ عٍ كُلِـاٌسُ

كود:
PacketHandler.cs 

ﯚﺂ̣̥̐ﺑـﺣﺜ ﻋﻧـ ,


كود:
static void AppendConnect(Connect appendConnectClient.GameClient client

آقٍّفٍّلِّهِّ مِّـنِّ آلِّسَّآلِّبٍّ وٍّحَّطِّ تٍّحَّتٍّيِّهِّ دٍّهِّ ,


كود:
 private static void HeaderUpdates(string updateGameClient client

client.Send(new GameUpdates(GameUpdates.Headerupdate)); 

private static 
void BodyUpdates(string updateGameClient client

client.Send(new GameUpdates(GameUpdates.Bodyupdate)); 

private static 
void FooterUpdates(string updateGameClient client

client.Send(new GameUpdates(GameUpdates.Footerupdate)); 


خـشًـ ﻋ ڤـۈلْـﮈړ

كود:
System 

آعَمـَلَ ﻛَلَآسُ جَدِيْدِ بِـ آسُمـَ ,


كود:
GameUpdetess 

ﺿﯾﭬ ﭴۆاھَہّ ﮃا

كود:
using System
using System.Collections.Generic
using System.Linq
using System.Text

namespace 
TroZenA.Database 

internal class GameUpdetess 

public static 
string Header ""
public static 
string Body1 ""
public static 
string Body2 ""
public static 
string Body3 ""
public static 
string Body4 ""
public static 
string Body5 ""
public static 
string Body6 ""
public static 
string Date ""


public static 
void LoadRates() 

MySqlReader reader = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("gameupdates")); 
if (
reader.Read()) 

Header reader.ReadString("Header"); 
Body1 reader.ReadString("Body1"); 
Body2 reader.ReadString("Body2"); 
Body3 reader.ReadString("Body3"); 
Body4 reader.ReadString("Body4"); 
Body5 reader.ReadString("Body5"); 
Body6 reader.ReadString("Body6"); 
// Body6 = reader.ReadString("Date"); 



Console.WriteLine("System GameUpdates Loaded."); 





رًّوّحّْ عَّلَّيٌّ كّْلَّاٍّسًّ

كود:
 Writer 

ابحث عن ,

كود:
public class Writer 


تحت القوس عـ طول ضيف ,

كود:
public static void WriteStringWithLength(string argint offsetbyte[] buffer

if (
buffer == null
return; 
if (
offset buffer.Length 1
return; 
int till buffer.Length offset
till Math.Min(arg.Lengthtill); 
buffer[offset] = (byte)arg.Length
offset++; 
byte[] argEncoded Program.Encoding.GetBytes(arg); 
Array.
Copy(argEncoded0bufferoffsettill); 


خش ع كلاس

كود:
PacketHandler.cs 

ابحث عن ,

كود:
client.UnionExploits client.UnionExploits

هتلاقي تحتيه ,

كود:
client.LoadItemStats(); 

تحتيها عـ طول ضيف ,

كود:
#region Game Updates 


HeaderUpdates("Welcome All in Server" DateTime.Now.ToString(), client); 
BodyUpdates("The Server Has Hard Drops 200 Cps Randomn "client); 
BodyUpdates("All New Characters And System Is Here ! Smile"client); 
BodyUpdates("Guild War Start Eevry Friday At [20:00] End Every At [24:00]"client); 
BodyUpdates("Any One Need Any Help"client); 
FooterUpdates("Enjoy With Us in Server! Smile"client); 


#endregion 

لو عايز تعدل ع الرسائل عدل عليها من هنا

كود:
#region Game Updates 


HeaderUpdates("Welcome All in Server" DateTime.Now.ToString(), client); 
BodyUpdates("The Server Has Hard Drops 200 Cps Randomn "client); 
BodyUpdates("All New Characters And System Is Here ! Smile"client); 
BodyUpdates("Guild War Start Eevry Friday At [20:00] End Every At [24:00]"client); 
BodyUpdates("Any One Need Any Help"client); 
FooterUpdates("Enjoy With Us in Server! Smile"client); 


#endregion