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

مشاهدة النسخة كاملة : في اي بي ايام دا شغال تمام مش الي علي نت بيظ


MohamedModyAdel
2019-06-11, 01:22 PM
سلام عليكم انهاردة جيبلكو في اه بي ايام شغاله تمام
كلاس EntityTable
هتبحث عن

client.Entity.LoadTopStatus();

هتحط تحتها

client.VIPDays.Load(client);
وبعدين هتخش علي gamestate او gameclient
هتحط دا في اي مكان
public VIPDays VIPDays = new VIPDays();

هتبحث عن
private void ShutDown()
وبعدين لغيت

Kernel.GamePool.Remove(this.Entity.UID);
تحتيها دا

VIPDays.Save(this);
كلاس packethandle
هتبحث عن
case 2032:
هتنزل تحت
لغيت
#region Captchas
هتحط تحتها
#region VIIPDays.
if (client.ActiveNpc == 780000)
{
//Npcs dialog = new Npcs(client);
if (client.Inventory.Contains(client.ActiveNpc, 1))
{
if (req.OptionID == 1)
{
if (client.Entity.VIPLevel > 3)
{
dialog.Text("You are VIPLevel " + client.Entity.VIPLevel + ", So You Can't Unlock This Item.");
dialog.Option("Sorry.", 255);
dialog.Send();
}
else
{
if (client.Entity.VIPLevel < 4)
{
dialog.Text("Are You Sure You Want To Unlock This Item.");
dialog.Option("Yes I'M Sure.", 2);
dialog.Send();
}
}
}
if (req.OptionID == 2)
if (client.Entity.VIPLevel < 4)
{
client.VIPDays.Insert(DateTime.Now, DateTime.Now.AddHours(1), 4, client.Entity.VIPLevel, client);
client.Inventory.Remove(client.ActiveNpc, 1);
}
}
}
#endregion
#region VIIPDays.
if (client.ActiveNpc == 780001)
{
//Npcs dialog = new Npcs(client);
if (client.Inventory.Contains(client.ActiveNpc, 1))
{
if (req.OptionID == 1)
{
if (client.Entity.VIPLevel > 3)
{
dialog.Text("You are VIPLevel " + client.Entity.VIPLevel + ", So You Can't Unlock This Item.");
dialog.Option("Sorry.", 255);
dialog.Send();
}
else
{
if (client.Entity.VIPLevel < 4)
{
dialog.Text("Are You Sure You Want To Unlock This Item.");
dialog.Option("Yes I'M Sure.", 2);
dialog.Send();
}
}
}
if (req.OptionID == 2)
if (client.Entity.VIPLevel < 4)
{
client.VIPDays.Insert(DateTime.Now, DateTime.Now.AddDays(1), 4, client.Entity.VIPLevel, client);
client.Inventory.Remove(client.ActiveNpc, 1);
}
}
}
#endregion
#region VIIPDays.
if (client.ActiveNpc == 780010)
{
//Npcs dialog = new Npcs(client);
if (client.Inventory.Contains(client.ActiveNpc, 1))
{
if (req.OptionID == 1)
{
if (client.Entity.VIPLevel > 3)
{
dialog.Text("You are VIPLevel " + client.Entity.VIPLevel + ", So You Can't Unlock This Item.");
dialog.Option("Sorry.", 255);
dialog.Send();
}
else
{
if (client.Entity.VIPLevel < 4)
{
dialog.Text("Are You Sure You Want To Unlock This Item.");
dialog.Option("Yes I'M Sure.", 2);
dialog.Send();
}
}
}
if (req.OptionID == 2)
if (client.Entity.VIPLevel < 4)
{
client.VIPDays.Insert(DateTime.Now, DateTime.Now.AddDays(7), 4, client.Entity.VIPLevel, client);
client.Inventory.Remove(client.ActiveNpc, 1);
}
}
}
#endregion

وبعدين هتبحث عن
#region Misc
هتحط تختها

#region VIP4Days
case 780000:
{
Npcs dialog = new Npcs(client);
dialog.Avatar(item.ID);
dialog.Text("Hello " + client.Entity.Name + ", There is VIPLevel 4 For 1 Hour. If You Want To Get it Just Confirm.");
dialog.Option("Confirm.", 1);
dialog.Option("Cancel.", 255);
dialog.Send();
client.ActiveNpc = item.ID;
break;
}
#endregion
#region VIP4Days
case 780001:
{
Npcs dialog = new Npcs(client);
dialog.Avatar(item.ID);
dialog.Text("Hello " + client.Entity.Name + ", There is VIPLevel 4 For 1 Day. If You Want To Get it Just Confirm.");
dialog.Option("Confirm.", 1);
dialog.Option("Cancel.", 255);
dialog.Send();
client.ActiveNpc = item.ID;
break;
}
#endregion
#region VIP4Days
case 780010:
{
Npcs dialog = new Npcs(client);
dialog.Avatar(item.ID);
dialog.Text("Hello " + client.Entity.Name + ", There is VIPLevel 4 For 7 Days. If You Want To Get it Just Confirm.");
dialog.Option("Confirm.", 1);
dialog.Option("Cancel.", 255);
dialog.Send();
client.ActiveNpc = item.ID;
break;
}
#endregion
هتعمل كلاس بي الاسم دا VIPDays
هتحط فيه دول
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DarkWay.Database;
namespace DarkWay
{
public class VIPDays
{
public DateTime StartOn, EndOn;
public byte Level, OLDLevel;
public Time32 CheckStamp = Time32.Now;
public void Insert(DateTime _StartOn, DateTime _EndOn, byte _Level, byte _OLDLevel, Client.GameState client)
{
this.StartOn = _StartOn;
this.EndOn = _EndOn;
this.Level = _Level;
this.OLDLevel = _OLDLevel;
client.Entity.VIPLevel = this.Level;
#region Insert
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("vipdays").Where("UID", client.Entity.UID))
using (var reader = new MySqlReader(cmd))
{
if (!reader.Read())
using (var cmds = new MySqlCommand(MySqlCommandType.INSERT))
cmds.Insert("vipdays").Insert("UID", client.Entity.UID).Execute();
}
#endregion
this.Save(client);
client.Send("Your VIP, Now level " + this.Level + " will end in " + this.EndOn + "");
}

public void Check(Client.GameState client)
{
if (DateTime.Now >= this.EndOn)
{
client.Entity.VIPLevel = this.OLDLevel;
this.Level = 0;
this.OLDLevel = 0;
this.Delete(client);
client.Send("Your VIP, is ended, Now your VIP level is " + client.Entity.VIPLevel + "");
}
this.CheckStamp = Time32.Now;
}
public void Load(Client.GameState c)
{
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("vipdays").Where("UID", c.Entity.UID))
using (var reader = new MySqlReader(cmd))
{
if (reader.Read())
{
this.Level = reader.ReadByte("Level");
this.OLDLevel = reader.ReadByte("OLDLevel");
this.StartOn = Kernel.FromDateTimeInt(reader.ReadUInt64("StartOn"));
this.EndOn = Kernel.FromDateTimeInt(reader.ReadUInt64("EndOn"));
}
}
}
public void Save(Client.GameState client)
{
Database.MySqlCommand cmd = new Database.MySqlCommand(Database.MySqlCommandType.UP DATE);
cmd.Update("vipdays").Set("Level", this.Level).Set("OLDLevel", this.OLDLevel).Set("StartOn", Kernel.ToDateTimeInt(this.StartOn)).Set("EndOn", Kernel.ToDateTimeInt(this.EndOn))
.Where("UID", client.Entity.UID).Execute();
}
public void Delete(Client.GameState client)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.DELETE);
cmd.Delete("vipdays", "UID", client.Entity.UID).Execute();
}

}
}
هتخش علي كلاس world
هتبحث عن
private void CharactersCallback
هتحط تحتها دا

#region VIPDays
if (client.VIPDays.Level > 0 && Time32.Now >= client.VIPDays.CheckStamp.AddSeconds(2))
{

client.VIPDays.Check(client);
}
#endregion
الي هيطلعه ارور
خش علي كلاس
gamestate
ابحث عن دا

public DateTime LastVote;

هتلقي تحتها

public uint VIPDays;


تحميل ملف القاعده (عفواً لايمكن عرض الروابط في الإرشيف)

محمد ياسر
2019-06-11, 02:14 PM
جمـيـل لمـدة ايــاام !

MohamedModyAdel
2019-06-11, 07:47 PM
جرب الي عندك وهيطلع بيظ وجرب بتعي

محمد ياسر
2019-06-11, 08:07 PM
هو هو علي فكره

محمد ياسر
2019-07-08, 07:09 AM
تم فتح الموضوع

Hassan Emprator
2019-07-08, 07:13 AM
شكرا ليك

Mo Khalid
2019-07-09, 04:53 PM
تسلم ايديك

ابو حمزه9
2019-07-10, 03:03 AM
تسلم إيدك إستمر وشكراً على تعب حضريتك

photog
2019-07-30, 08:38 PM
عاش

3abqrino
2019-08-04, 01:43 PM
عااااااش

Matrix
2019-08-04, 08:03 PM
ناقص

Commander
2019-08-04, 10:48 PM
عاش بس هقولك علي حاجه ده كدا شرط مصيبه مينفعش يبقي كدا
if (client.VIPDays.Level > 0 && Time32.Now >= client.VIPDays.CheckStamp.AddSeconds(2))

AhmedBayoumi
2019-08-05, 12:42 AM
تمام

neno2052
2019-08-09, 02:51 PM
جارررررررري التجربه

ALz3em
2019-09-06, 09:28 PM
عاش

Omar Mohamed100
2019-10-30, 07:09 AM
عاش بس حاول تنزلو من غير مشاكل عشان فيه ناس مش هتعرف تحلها

MomenSaed
2019-11-19, 02:41 PM
تجربة

AliNasser
2020-02-22, 11:15 PM
تسلم

uncelsam
2020-03-07, 01:08 PM
عااااش

محمودمحمدسالم
2020-03-25, 07:05 PM
عاش

ToRWadA
2020-04-04, 12:08 AM
عاش يسطا

Diego
2020-04-10, 01:23 PM
عااااش

salah8
2021-07-21, 11:23 AM
.

apdoconquer1
2021-07-23, 01:55 AM
عاش

MostafaSambo
2021-09-03, 10:21 PM
عاااااااااااش

Rage
2022-04-11, 07:25 AM
3aaaaaa4

so3da
2022-04-12, 08:56 PM
عاش

khariy
2023-04-09, 03:33 AM
255

mohammedshafik
2023-05-25, 10:45 AM
thxxxx

محمد عبس
2023-07-26, 09:46 AM
عاش

eslaam
2023-09-08, 12:11 PM
a;vh

vvbb50009
2023-09-23, 04:19 PM
جمـيـل لمـدة

DarBaKa
2024-02-22, 10:15 AM
عاش

ahmedmatrix12
2024-02-29, 07:20 PM
جمـيـل لمـدة ايــاام !

hegazii4
2024-03-05, 04:16 PM
عااش

yousef here
2024-04-25, 10:29 PM
عاش

mohamed wadan
2024-08-30, 08:53 AM
nice

ahmedfathy96
2024-08-30, 10:59 AM
تسلم