محمد ياسر |
2019-04-23 02:17 PM |
System GameUpdates
ده سستم الي اول ما الاعب يفتح اللعبه يلاقي رساله رزقه
بتقوله في تحديث في اللعبه وده كلام انت الي اتكتبه براحتك
ۈآڤـﭥﺢـ ڤـۈلْـﮈړ
اٌعٍمِـلِـ كُلِـاٌسُ جِدّيٌـدّ بّــ اٌسُمِـ ,
ﺿﯾﭬ ﭴۆاھَہّ ﮃا
كود PHP:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LordsRoad.Network.GamePackets
{
public class GameUpdates : Writer, Interfaces.IPacket
{
private byte[] Buffer;
public const byte
Header = 0,
Body = 1,
Footer = 2;
public GameUpdates(byte _Type, string _String)
{
this.Buffer = new byte[29 + _String.Length];
WriteUInt16((ushort)(Buffer.Length - Cool, 0, Buffer);
WriteUInt16(2032, 2, Buffer);
WriteUInt32((uint)Time32.timeGetTime().GetHashCode(), 4, Buffer);
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(Buffer, 18, Buffer[17]); }
set { WriteStringWithLength(value, 17, Buffer); }
}
public void Send(Client.GameClient client)
{
client.Send(Buffer);
}
public void Deserialize(byte[] buffer)
{
this.Buffer = buffer;
}
public byte[] ToArray()
{
return Buffer;
}
}
}
خًشْ عٍ كُلِـاٌسُ
ﯚﺂ̣̥̐ﺑـﺣﺜ ﻋﻧـ ,
كود PHP:
static void AppendConnect(Connect appendConnect, Client.GameClient client)
آقٍّفٍّلِّهِّ مِّـنِّ آلِّسَّآلِّبٍّ وٍّحَّطِّ تٍّحَّتٍّيِّهِّ دٍّهِّ ,
كود PHP:
private static void HeaderUpdates(string update, GameClient client)
{
client.Send(new GameUpdates(GameUpdates.Header, update));
}
private static void BodyUpdates(string update, GameClient client)
{
client.Send(new GameUpdates(GameUpdates.Body, update));
}
private static void FooterUpdates(string update, GameClient client)
{
client.Send(new GameUpdates(GameUpdates.Footer, update));
}
خـشًـ ﻋ ڤـۈلْـﮈړ
آعَمـَلَ ﻛَلَآسُ جَدِيْدِ بِـ آسُمـَ ,
ﺿﯾﭬ ﭴۆاھَہّ ﮃا
كود PHP:
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.");
}
}
}
رًّوّحّْ عَّلَّيٌّ كّْلَّاٍّسًّ
ابحث عن ,
تحت القوس عـ طول ضيف ,
كود PHP:
public static void WriteStringWithLength(string arg, int offset, byte[] buffer)
{
if (buffer == null)
return;
if (offset > buffer.Length - 1)
return;
int till = buffer.Length - offset;
till = Math.Min(arg.Length, till);
buffer[offset] = (byte)arg.Length;
offset++;
byte[] argEncoded = Program.Encoding.GetBytes(arg);
Array.Copy(argEncoded, 0, buffer, offset, till);
}
خش ع كلاس
ابحث عن ,
كود PHP:
client.UnionExploits = client.UnionExploits;
هتلاقي تحتيه ,
تحتيها عـ طول ضيف ,
كود PHP:
#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
لو عايز تعدل ع الرسائل عدل عليها من هنا
كود PHP:
#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
|