osama
2019-08-03, 06:52 PM
بسم الله الرحمن الرحيم
انهردة جبتلكو انبى سى الشحن بتاع البوشى كامل + تعديل بسيط لمعرفة اكواد الايتم الى الاعب عاوز يشحنها فكرة بسيطة بس انشاء الله تعجبكم
اول حاجة هنروح لى كلاس Npc.Cs ونحط فية دا
#region Charge System
case 300121:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Welcome to the EgyArmy-Co[Helpdesk]. Do you want to charge?");
dialog.Option("Charge", 1);
dialog.Option("If*You*Need*Code*Item*For*Charge", 55);
dialog.Option("Not now.", 255);
dialog.Avatar(175);
dialog.Send();
break;
}
case 1:
{
dialog.Text("Welcome to the helpdesk. Do you want to charge?");
dialog.Option("yes", 100);
dialog.Option("Not Now", 255);
dialog.Avatar(0x5f);
dialog.Send();
break;
}
case 55:
{
dialog.Text("Copy/the/code/Items/And/Past/In/Check box/charge?");
dialog.Option("ColdPrize <50> ConquerAssuit Point//Code//This/Item/Is 50 ", 102);
dialog.Option("200k <50> ConquerAssuit Point//Code//This/Item/Is 50 ", 102);
dialog.Option("VIP 7 <50> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 WindWalker <100> ConquerAssuit Point//Code//This/Item/Is 50", 102);
dialog.Option("Soul P9 Bruce_Lee <100> ConquerAssuit Point //Code//This/Item/Is 50", 102);
dialog.Option("Soul P9 ninja <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Monk <100> ConquerAssuit Point //Code//This/Item/Is 50", 102);
dialog.Option("Soul P9 Fire And Water <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Trojan <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Pirate <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Warrior <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Archer <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Back*To*charge", 255);
dialog.Send();
break;
}
case 100://New Charge
{
dialog.Text("Hello. I'm the one that was choosen to Make your Charge.");
dialog.Option("I want to Charge.", 102);
dialog.Option("Nooooo.", 255);
dialog.Send();
break;
}
////////////////////////////////////////////
case 102:
{
dialog.Text("Please insert the Your Account Name If you Want now to charge for.");
dialog.Input("Here:", 106, 16);
dialog.Option("Forget it.", 110);
dialog.Send();
break;
}
//////////////////////////////////////////////////
case 106:
try
{
string Username;
Username = npcRequest.Input;
client.Username = Username;
if (!Exists(Username))
{
dialog.Text("Please insert Card Number .");
dialog.Input("Here:", 107, 14);
dialog.Option("No.", 255);
}
else
{
dialog.Text("Account Name already Exit.");
dialog.Option("Alright.", 255);
}
dialog.Send();
break;
}
catch
{
dialog.Text("Please write the correct value.");
dialog.Option("Try Again.", 102);
dialog.Option("Quit.", 110);
dialog.Send();
}
break;
/////////////////////////////////////////////////////
case 107:
try
{
string Numberofcard;
Numberofcard = npcRequest.Input;
client.Numberofcard = Numberofcard;
dialog.Text("Please insert Card Number again.");
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("Please insert Item Code.");
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 cmd = new MySqlCommand(MySqlCommandType.INSERT))
cmd.Insert("Charge").Insert("Username", client.Username)
.Insert("Numberofcard", client.Numberofcard).Insert("Numberofitem", client.Numberofitem)
.Execute();
client.Username = "";
client.Numberofcard = "";
client.Numberofitem = "";
dialog.Text("New Charge Successfully Done. || All rights® reserved to Phoenix ©");
dialog.Option("Wait GM.", 255);
dialog.Send();
//client.Player.Teleport(1860, 55, 62);
//Entity.SendReload(client);
break;
}
}
break;
}
#endregion
وبعدين نروح لى كلاس GameState.cs ونبحث عن public bool Fake; ونحط دا فوقيها علطول
#region Charge
public string Username;
public string Numberofcard;
public string Numberofitem;
#endregion
اخر حاجه كده حمل الملف ده وارفعه للقاعده
تحميل الملف (عفواً لايمكن عرض الروابط في الإرشيف)
و بكدا نكون خلصنا يا رب الفكرة تعجبكو انشاء الله :)
وما توفيقى الا بالله
انهردة جبتلكو انبى سى الشحن بتاع البوشى كامل + تعديل بسيط لمعرفة اكواد الايتم الى الاعب عاوز يشحنها فكرة بسيطة بس انشاء الله تعجبكم
اول حاجة هنروح لى كلاس Npc.Cs ونحط فية دا
#region Charge System
case 300121:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Welcome to the EgyArmy-Co[Helpdesk]. Do you want to charge?");
dialog.Option("Charge", 1);
dialog.Option("If*You*Need*Code*Item*For*Charge", 55);
dialog.Option("Not now.", 255);
dialog.Avatar(175);
dialog.Send();
break;
}
case 1:
{
dialog.Text("Welcome to the helpdesk. Do you want to charge?");
dialog.Option("yes", 100);
dialog.Option("Not Now", 255);
dialog.Avatar(0x5f);
dialog.Send();
break;
}
case 55:
{
dialog.Text("Copy/the/code/Items/And/Past/In/Check box/charge?");
dialog.Option("ColdPrize <50> ConquerAssuit Point//Code//This/Item/Is 50 ", 102);
dialog.Option("200k <50> ConquerAssuit Point//Code//This/Item/Is 50 ", 102);
dialog.Option("VIP 7 <50> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 WindWalker <100> ConquerAssuit Point//Code//This/Item/Is 50", 102);
dialog.Option("Soul P9 Bruce_Lee <100> ConquerAssuit Point //Code//This/Item/Is 50", 102);
dialog.Option("Soul P9 ninja <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Monk <100> ConquerAssuit Point //Code//This/Item/Is 50", 102);
dialog.Option("Soul P9 Fire And Water <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Trojan <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Pirate <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Warrior <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Soul P9 Archer <100> ConquerAssuit Point //Code//This/Item/Is 50 ", 102);
dialog.Option("Back*To*charge", 255);
dialog.Send();
break;
}
case 100://New Charge
{
dialog.Text("Hello. I'm the one that was choosen to Make your Charge.");
dialog.Option("I want to Charge.", 102);
dialog.Option("Nooooo.", 255);
dialog.Send();
break;
}
////////////////////////////////////////////
case 102:
{
dialog.Text("Please insert the Your Account Name If you Want now to charge for.");
dialog.Input("Here:", 106, 16);
dialog.Option("Forget it.", 110);
dialog.Send();
break;
}
//////////////////////////////////////////////////
case 106:
try
{
string Username;
Username = npcRequest.Input;
client.Username = Username;
if (!Exists(Username))
{
dialog.Text("Please insert Card Number .");
dialog.Input("Here:", 107, 14);
dialog.Option("No.", 255);
}
else
{
dialog.Text("Account Name already Exit.");
dialog.Option("Alright.", 255);
}
dialog.Send();
break;
}
catch
{
dialog.Text("Please write the correct value.");
dialog.Option("Try Again.", 102);
dialog.Option("Quit.", 110);
dialog.Send();
}
break;
/////////////////////////////////////////////////////
case 107:
try
{
string Numberofcard;
Numberofcard = npcRequest.Input;
client.Numberofcard = Numberofcard;
dialog.Text("Please insert Card Number again.");
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("Please insert Item Code.");
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 cmd = new MySqlCommand(MySqlCommandType.INSERT))
cmd.Insert("Charge").Insert("Username", client.Username)
.Insert("Numberofcard", client.Numberofcard).Insert("Numberofitem", client.Numberofitem)
.Execute();
client.Username = "";
client.Numberofcard = "";
client.Numberofitem = "";
dialog.Text("New Charge Successfully Done. || All rights® reserved to Phoenix ©");
dialog.Option("Wait GM.", 255);
dialog.Send();
//client.Player.Teleport(1860, 55, 62);
//Entity.SendReload(client);
break;
}
}
break;
}
#endregion
وبعدين نروح لى كلاس GameState.cs ونبحث عن public bool Fake; ونحط دا فوقيها علطول
#region Charge
public string Username;
public string Numberofcard;
public string Numberofitem;
#endregion
اخر حاجه كده حمل الملف ده وارفعه للقاعده
تحميل الملف (عفواً لايمكن عرض الروابط في الإرشيف)
و بكدا نكون خلصنا يا رب الفكرة تعجبكو انشاء الله :)
وما توفيقى الا بالله