|
|
المشاركات 203 |
+التقييم 0.08 |
تاريخ التسجيل Oct 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 2284 |
ulong _BankCps;
public ulong BankCps
{
get { return _BankCps; }
set
{
if (Owner.FullLoading)
{
_BankCps = value;
}
}
}
write.Write<uint>("Character", "ConquerPoints", client.Player.ConquerPoints);
write.Write<ulong>("Character", "BankCps ", client.Player.BankCps);
client.Player.ConquerPoints = reader.ReadUInt32("Character", "ConquerPoints", 0);
client.Player.BankCps = (ulong)reader.ReadInt64("Character", "BankCps ", 0);
[NpcAttribute(NpcID.BankCpsV5)]
public static void BankCpsV5(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
{
Dialog dialog = new Dialog(client, stream);
switch (Option)
{
case 0:
{
dialog.AddText("Hello <tip color=0xfff05050>");
dialog.AddText(client.Player.Name + "</tip>,");
dialog.AddText("i'm the new stream bank npc that can help you get on the top faster ! \n");
dialog.AddOption("Deposit My Cps", 6);
dialog.AddOption("Withdraw My Cps", 7);
dialog.AddOption("My Total BankCps", 8);
dialog.AddOption("#Thnx .", 255);
dialog.AddAvatar(329).FinalizeDialog();
break;
}
#region Deposit
case 6:
{
dialog.AddText("Hello <tip color=0xfff05050>");
dialog.AddText(client.Player.Name + "</tip>,");
dialog.AddText("i'm the new stream npc that can help you get on the top faster ! \n");
dialog.AddInput("Insert Amount:", 1);
dialog.AddOption("#Thnx .", 255);
dialog.AddAvatar(329).FinalizeDialog();
break;
}
case 1:
{
uint input;
if (uint.TryParse(Input, out input))
{
if (input < 60)
{
dialog.AddText("You need to input more or atleast 60 CPs..");
dialog.AddInput("Insert amount:", 1);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
return;
}
if (client.Player.ConquerPoints >= input)
{
client.NpcCpsInput = input;
dialog.AddText("Are you sure you want to Deposit " + input + " CPs?");
dialog.AddOption("Yes", 2);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
}
else
{
dialog.AddText("You don't have that much CPs. Try again.");
dialog.AddInput("Insert amount:", 1);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
}
}
else
{
dialog.AddText("Try again. .");
dialog.AddInput("Insert amount:", 1);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
}
break;
}
case 2:
{
if (client.Player.ConquerPoints >= client.NpcCpsInput && client.NpcCpsInput != 0)
{
client.Player.ConquerPoints -= client.NpcCpsInput;
client.Player.BankCps += client.NpcCpsInput;
client.NpcCpsInput = 0;
}
break;
}
#endregion
#region Withdraw
case 7:
{
dialog.AddText("Hello <tip color=0xfff05050>");
dialog.AddText(client.Player.Name + "</tip>,");
dialog.AddText("i'm the new stream npc that can help you get on the top faster ! \n");
dialog.AddInput("Insert Amount:", 4);
dialog.AddOption("#Thnx .", 255);
dialog.AddAvatar(329).FinalizeDialog();
break;
}
case 4:
{
uint input;
if (uint.TryParse(Input, out input))
{
if (input < 60)
{
dialog.AddText("You need to input more or atleast 60 CPs..");
dialog.AddInput("Insert amount:", 4);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
return;
}
if (client.Player.BankCps >= input)
{
client.NpcCpsInput = input;
dialog.AddText("Are you sure you want to Withdraw " + input + " CPs?.");
dialog.AddOption("Yes", 5);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
}
else
{
dialog.AddText("You don't have that much CPs. Try again.");
dialog.AddInput("Insert amount:", 4);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
}
}
else
{
dialog.AddText("Try again.");
dialog.AddInput("Insert amount:", 4);
dialog.AddOption("No thank you.", 255);
dialog.AddAvatar(48).FinalizeDialog();
}
break;
}
case 5:
{
if (client.Player.ConquerPoints >= client.NpcCpsInput && client.NpcCpsInput != 0)
{
client.Player.ConquerPoints += client.NpcCpsInput;
client.Player.BankCps -= client.NpcCpsInput;
client.NpcCpsInput = 0;
}
break;
}
#endregion
#region To Know Cps
case 8:
{
dialog.AddText("Your BankCps Is " + client.Player.BankCps + ".");
dialog.AddOption("Okay.", 255);
dialog.AddAvatar(48).FinalizeDialog();
break;
}
#endregion
}
}
BankCpsV5 = 102105,
public uint ConquerPoints
if (value > uint.MaxValue)
{
uint transfared = value - uint.MaxValue;
BankCps += (uint)transfared;
value -= transfared;
this.Owner.SendSysMesage(transfared + " Gold has transfare to your bankcps you can't hold more than " + uint.MaxValue + " into your inventory.", MsgMessage.ChatMode.Monster, MsgMessage.MsgColor.yellow);
string logs = "[CallStack]" + Name + " transfare " + transfared + " to bankcps";
logs += Environment.StackTrace;
Database.ServerDatabase.LoginQueue.Enqueue(logs);
}
102105,BankCps,2,29260,5000,57,53,0,0,1,1
| الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| شـرح تـركيـب سـورس الـيكس !! | virus7x | تطوير سيرفرات كونكر | 129 | 2021-07-09 07:42 PM |