|
المشاركات 1,940 |
+التقييم 0.95 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل windows 7 |
رقم العضوية 1 |
#region Charge card System
//code.vpscairo.com
// code by Hazem , Rider , Rayzo,HassanEmprator:)
case 3001215:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Welcome to the shop using card. Do you want to user card TQ?");
dialog.Option("use card", 102);
dialog.Option("Not now.", 255);
dialog.Avatar(175);
dialog.Send();
break;
}
case 102:
try
{
string Numberofcard;
Numberofcard = npcRequest.Input;
client.Numberofcard = Numberofcard;
dialog.Text("Please insert Card Number.");
dialog.Input("Here:", 108, 14);
dialog.Option("No.", 110);
dialog.Send();
break;
}
catch
{
dialog.Text("Please write the correct value.");
dialog.Option("Try Again.", 106);
dialog.Option("Quit.", 110);
dialog.Send();
}
break;
//////////////////////////////////////////
case 108:
try
{
string Numberofcard;
Numberofcard = npcRequest.Input;
client.Numberofcard = Numberofcard;
if (Numberofcard == client.Numberofcard)
{
dialog.Text("enter the password card number");
dialog.Input("Here:", 109, 100);
dialog.Option("No.", 10);
}
else
{
dialog.Text("Wrong Code.");
dialog.Option("Alright.", 10);
}
dialog.Send();
break;
}
catch
{
dialog.Text("Please write the correct value.");
dialog.Option("Try Again.", 7);
dialog.Option("Quit.", 0xff);
dialog.Send();
}
break;
//////////////////////////////////////////
case 109:
{
string Numberofitem;
Numberofitem = npcRequest.Input;
client.Numberofitem = Numberofitem;
string str2 = client.Socket.IP.ToString().Split(new char[] { ':' })[0].ToString();
client.Account.IP = str2;
using (var reader = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("cards").Where("card", client.Numberofcard)))
{
if (reader.Read())
{
if (client.Numberofitem == "" + reader.ReadUInt32("pass") + "")
{
if (reader.ReadUInt32("uses") == 0)
{
using (var items = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("item_card").Where("id_order", reader.ReadString("id"))))
{
if (client.Inventory.Count < 40 - reader.ReadUInt32("items"))
{
dialog.Text("Congratulations, the card was successfully shipped and received");
while (items.Read())
{
if (items.ReadUInt32("uses") == 0)
{
if (items.ReadString("type") == "entities")
{
if (items.ReadString("name") == "ConquerPoints") client.Entity.ConquerPoints += items.ReadUInt32("item");
if (items.ReadString("name") == "Level") client.Entity.Level = items.ReadByte("item");
if (items.ReadString("name") == "Money") client.Entity.Money += items.ReadUInt32("item");
if (items.ReadString("name") == "VIPLevel") client.Entity.VIPLevel = items.ReadByte("item");
if (items.ReadString("name") == "Domino") client.Entity.Domino = items.ReadByte("item");
dialog.Option("You Get [ " + items.ReadString("item") + " ] " + items.ReadString("name") + " ");
}
else if (items.ReadString("type") == "items")
{
client.Inventory.Add(items.ReadUInt32("item"), 0, 1);
dialog.Option("You Get item [ " + items.ReadString("name") + " ]");
}
client.Send(new NpcReply(NpcReply.MessageBox, "The card was successfully shipped"));
new Database.MySqlCommand(Database.MySqlCommandType.Update).Update("cards").Set("uses", 1).Set("user", client.Entity.Name).Set("uid", client.Entity.UID).Where("card", client.Numberofcard).Execute();
new Database.MySqlCommand(Database.MySqlCommandType.Update).Update("item_card").Set("uses", 1).Set("user", client.Entity.Name).Set("uid", client.Entity.UID).Where("id_order", reader.ReadString("id")).Execute();
}
}
} else
{
dialog.Text("You need to [ " + reader.ReadUInt32("items") + " ] In the bag to complete charging the card");
}
}
}
else
{
dialog.Text("This card has already been used");
}
}
else {
dialog.Text("Card data mistake, please make sure the card data is correct");
}
}
else
{
dialog.Text("You entered an error data. Please try again later");
}
}
client.Numberofcard = "";
client.Numberofitem = "";
dialog.Option("Team code.", 255);
dialog.Send();
break;
}
}
break;
}
#endregion
public string Numberofcard;
public string Numberofitem;
ConquerPoints
Level
Money
VIPLevel
Domino
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اضافة الموتوسكل داخل اللعبه | محمد ياسر | تطوير سيرفرات كونكر | 74 | 2024-11-20 12:07 AM |
متجر الشحن بعد اضافة انبى سى اضافى فية لمعرفة اسعار الشحن والاكواد بتعتها | osama | تطوير سيرفرات كونكر | 43 | 2024-07-12 12:26 AM |
ازى اعمل بوتات داخل الجيم زى كدا | amosha | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-09-15 09:34 PM |
ان بي سي معلومات عن الجي ام و الشحن | محمد ياسر | تطوير سيرفرات كونكر | 0 | 2019-04-27 09:53 AM |
متجر شحن داخل اللعبه | محمد ياسر | تطوير سيرفرات كونكر | 0 | 2019-04-20 11:13 AM |