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

مشاهدة النسخة كاملة : اضافة online point كامله


محمد ياسر
2019-05-06, 11:00 PM
السلام عليكم ورحمة الله وبركاته
اضافة online point كامله
ده ياعني لو الاعب واقف في التون للفتره الي انت اتحدده اياخد نقاط
النقاط ده يبدله من انبي سي
اول حاجه npcs.cs
#region Online Points Changer
case 50544:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello " + client.Entity.Name + " I am changing OnlinePoints. Your OnlinePoints : " + client.Entity.OnlinePoints + " ");
// dialog.Option("VIP", 12);
// dialog.Option("GoldPrize -1[Prem] (100,000) OnlinePoints.", 11);
dialog.Option("50 OP To 100,000,000 CPs", 13);
dialog.Option("100 OP To 250,000,000 CPs", 14);
dialog.Option("200 OP To 500,000,000 CPs", 15);
dialog.Option("Stone +8 = 60 Points", 16);
dialog.Option("Stone +7 = 40 Points", 17);
dialog.Option("Just passing by.", 255);
dialog.Send();
break;
}
case 13:
{
if (client.Entity.OnlinePoints >= 50)
{
client.Entity.OnlinePoints -= 50;
client.Entity.ConquerPoints += 100000000;
}
else
{
dialog.Text("Please take 50 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 15:
{
if (client.Entity.OnlinePoints >= 200)
{
client.Entity.OnlinePoints -= 200;
client.Entity.ConquerPoints += 500000000;
}
else
{
dialog.Text("Please take 200 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 16:
{
if (client.Entity.OnlinePoints >= 60)
{
client.Entity.OnlinePoints -= 60;
client.Inventory.Add(730008, 0, 1);
}
else
{
dialog.Text("Please take 60 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 17:
{
if (client.Entity.OnlinePoints >= 40)
{
client.Entity.OnlinePoints -= 40;
client.Inventory.Add(730007, 0, 1);
}
else
{
dialog.Text("Please take 40 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 14:
{
if (client.Entity.OnlinePoints >= 100)
{
client.Entity.OnlinePoints -= 100;
client.Entity.ConquerPoints += 250000000;
}
else
{
dialog.Text("Please take 100 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 11:
{
dialog.Option("GoldPrize -1 (100,000) Online Points ", 7);
dialog.Option("Just passing by.", 255);
dialog.Avatar(116);
dialog.Send();
break;
}
case 12:
{
dialog.Option("( VIP 1 ) 100 Online Points.", 1);
dialog.Option("( VIP 2 ) 500 Online Points.", 2);
dialog.Option("( VIP 3 ) 1000 Online Points.", 3);
dialog.Option("( VIP 4 ) 2000 Online Points.", 4);
dialog.Option("( VIP 5 ) 3000 Online Points.", 5);
dialog.Option("( VIP 6 ) 4000 Online Points.", 6);
dialog.Option("Just passing by.", 255);
dialog.Avatar(116);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.VIPLevel == 0 && client.Entity.VIPLevel < 1)
{
if (client.Entity.OnlinePoints >= 100)
{
client.Entity.OnlinePoints -= 100;
client.Entity.VIPLevel = 1;
}
else
{
dialog.Text("Please take 100 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 2:
{
if (client.Entity.VIPLevel == 1)
{
if (client.Entity.OnlinePoints >= 500)
{
client.Entity.OnlinePoints -= 500;
client.Entity.VIPLevel = 2;
}
else
{
dialog.Text("Please take 500 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 3:
{
if (client.Entity.VIPLevel == 2)
{
if (client.Entity.OnlinePoints >= 1000)
{
client.Entity.OnlinePoints -= 1000;
client.Entity.VIPLevel = 3;
}
else
{
dialog.Text("Please take 1000 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 4:
{
if (client.Entity.VIPLevel == 3)
{
if (client.Entity.OnlinePoints >= 2000)
{
client.Entity.OnlinePoints -= 2000;
client.Entity.VIPLevel = 4;
}
else
{
dialog.Text("Please take 2000 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 5:
{
if (client.Entity.VIPLevel == 4)
{
if (client.Entity.OnlinePoints >= 3000)
{
client.Entity.OnlinePoints -= 3000;
client.Entity.VIPLevel = 5;
}
else
{
dialog.Text("Please take 3000 OnlinePoints..");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 6:
{
if (client.Entity.VIPLevel == 5)
{
if (client.Entity.OnlinePoints >= 4000)
{
client.Entity.OnlinePoints -= 4000;
client.Entity.VIPLevel = 6;
}
else
{
dialog.Text("Please take 4000 OnlinePoints.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 7:
{
if (client.Entity.OnlinePoints >= 100000)
{
client.Entity.OnlinePoints -= 100000;
client.Inventory.Add(2100075, 0, 1);
}
else
{
dialog.Text("you don't have 100,000 Online Points!");
dialog.Option("i'll see.", 255);
}
break;
}
}
break;
}
#endregion

اول حاجه اتاخد ان كود
OnlinePoints
موجود في EntityTable.cs
لو مش موجود ضفوها في EntityTable.cs وملف ال entite في القاعده

نكمل
في world
#region Cpsonline - Points online By Mohamed_Yasser
if (client.Entity.Level >= 140)
{
if (!client.Entity.Dead)
if (Time32.Now > client.Entity.OnlinePointStamp.AddMinutes(15))
{
uint Cpscount = 0;
client.Entity.OnlinePoints += 15;
client.Entity.OnlinePointStamp = Time32.Now;
client.Entity.ConquerPoints += Cpscount;
client.MessageBox("You Got [15] OnlinePoints For Being Online Those 15 Minutes, Stay online and Gain More - " + Program.NameGame + "",
p => { p.Entity.Teleport(1002, 268, 299); }, null, 60);
}
}
#endregion

الشخصية لازم تكون 140 علشان تاخد نقاط تقدر تحدد المستوي بنفسك
بياخد 15 نقطه كل 15 دفيقه طبعا تقدر تغيرها براحتك

MohamedModyAdel
2019-06-20, 07:07 PM
جميل