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

مشاهدة النسخة كاملة : هديه منى ل Harry*Potter كويست look for prey ‏


ChuMChuM
06-02-2012, 08:34 PM
عفواً لايمكن عرض الروابط في الإرشيف
بوص يا معلم ,
انا والله عملتها ,
ومكنت ناوى انزلها ,
عشان اكون صريح ,
بس بردو اهوه نفيد الناس ,
بحاجه مش عند حد ,
النظام عباره عن ,
البحث عن مخلص ,
يعنى ,
انته هتروح للانبى سى ,
وهتحط اسم واحد خنقك فى السرفر ,
ومش عارف تموتو بمقابل ,
10 تلاف سى بى اس ,
ويجي واحد قولى مثلن يقوم مختارو ,
فا يقوم رايح قتلو لو قتلو هياخد ال 10 ,
تلاف سى بى اس ,
تعال على الشرح ,
صور الاول ,
عفواً لايمكن عرض الروابط في الإرشيف (عفواً لايمكن عرض الروابط في الإرشيف)
عفواً لايمكن عرض الروابط في الإرشيف (عفواً لايمكن عرض الروابط في الإرشيف)
نيجى للشرح
ده الانبى سى
#region Hunter
case 10101:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello you hunter or need to sat Prey");
dialog.Option("Sat a Prey", 1);
dialog.Option("I will Back Later", 255);
dialog.Option("Iam Hunter looking for a Prey", 3);
dialog.Send();
break;

}
case 3:
{
Conquer_Online_Server.Database.EntityTable.LoadPre y();
dialog.Text("Chosse The prey you need to kill");
dialog.Option("Select " + GameState.Hunter.Prey1 + "", 11);
dialog.Option("Select " + GameState.Hunter.Prey2 + "", 12);
dialog.Option("Select " + GameState.Hunter.Prey3 + "", 13);
dialog.Option("Next", 100);
dialog.Send();
break;
}
case 100 :
{

dialog.Text("Chosse The prey you need to kill");
dialog.Option("Select " + GameState.Hunter.Prey4 + "", 14);
dialog.Option("Select " + GameState.Hunter.Prey5 + "", 15);
dialog.Option("Select " + GameState.Hunter.Prey6 + "", 16);
dialog.Option("Next", 101);
dialog.Send();
break;
}
case 101:
{

dialog.Text("Chosse The prey you need to kill");
dialog.Option("Select " + GameState.Hunter.Prey7 + "", 17);
dialog.Option("Select " + GameState.Hunter.Prey8 + "", 18);
dialog.Option("Select " + GameState.Hunter.Prey9 + "", 19);
dialog.Option("Next", 102);
dialog.Send();
break;
}
case 102:
{

dialog.Text("Chosse The prey you need to kill");
dialog.Option("Select " + GameState.Hunter.Prey10 + "", 20); ;
dialog.Option("Later", 255);
dialog.Send();
break;
}
case 1:
{
dialog.Text("Write Prey Name");
dialog.Input("here :", 2, 14);
dialog.Option("I See", 255);
dialog.Send();
break;
}
#region Prey
case 2:

if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey1 == "" )
{

MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())

{
string _name = npcRequest.Input;
GameState.Hunter.Prey1 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}


else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey2 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey2 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey3 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey3 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey4 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey4 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey5 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey5 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey6 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey6 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey7 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey7 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey8 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey8 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey9 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey9 =_name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (client.Entity.ConquerPoints >= 10000 && GameState.Hunter.Prey10 == "" )
{
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.SELECT);
cmd5.Select("entities").Where("name", client.Entity.Name);
MySqlReader r = new MySqlReader(cmd5);
if (r.Read())
{
string _name = npcRequest.Input;
GameState.Hunter.Prey10 = _name;
client.Entity.ConquerPoints -= 10000;
Conquer_Online_Server.Database.EntityTable.SavePre ys();
Program.WriteLine("New Prey Has Send");


}
}
else if (GameState.Hunter.Prey1 != "" && GameState.Hunter.Prey2 != "" && GameState.Hunter.Prey3 != "" && GameState.Hunter.Prey4 != "" && GameState.Hunter.Prey5 != "" && GameState.Hunter.Prey6 != "" && GameState.Hunter.Prey7 != "" && GameState.Hunter.Prey8 != "" && GameState.Hunter.Prey9 != "" && GameState.Hunter.Prey10 != "")
{
dialog.Text( "Sry no place yo set you Prey Come agine later");


}
break;
#endregion
#region A.K
case 11:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey1 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey1;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey1 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 12:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey2 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey2;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey2 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 13:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey3 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey3;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey3 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 14:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey4 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey4;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey4 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 15:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey5 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey5;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey5 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 16:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey6 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey6;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey6 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 17:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey7 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey7;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey7 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 18:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey8 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey8;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey8 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 19:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey9 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey9;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey9 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}
break;
case 20:
{
if (client.Entity.MyPrey == "" && GameState.Hunter.Prey10 != client.Entity.Name)
{
client.Entity.MyPrey = GameState.Hunter.Prey10;
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("entities").Set("MyPrey", client.Entity.MyPrey).Where("UID", client.Entity.UID).Execute();
GameState.Hunter.Prey10 = "";
Conquer_Online_Server.Database.EntityTable.SavePre ys();
}
}

#endregion
break;
}
break;
}
#endregionالانبى سى كبير شويه
ربنا يخلى لى ايديه :D
نخش على
gamestats
نبحث عن ده
public void AddBless(uint value)ونضيف ده فوقيه
public class Hunter
{
public static string Prey1 = "";
public static string Prey2 = "";
public static string Prey3 = "";
public static string Prey4 = "";
public static string Prey5 = "";
public static string Prey6 = "";
public static string Prey7 = "";
public static string Prey8 = "";
public static string Prey9 = "";
public static string Prey10 = "";
}ونخش على entity

نبحث عن ده
public Entity Killer;ونضيف ده فوقيه
public string MyPrey = "";
نخش على
EntityTable.cs
ابحث عن ده
[ public static void ResetLottery/CODE]
وضيف ده فوقيه
[CODE] public static void SavePreys()
{
MySqlCommand cmd1 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd1.Update("Hunter").Set("Pray1", GameState.Hunter.Prey1).Execute();
MySqlCommand cmd2 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd2.Update("Hunter").Set("Pray2", GameState.Hunter.Prey2).Execute();
MySqlCommand cmd3 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd3.Update("Hunter").Set("Pray3", GameState.Hunter.Prey3).Execute();
MySqlCommand cmd4 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd4.Update("Hunter").Set("Pray4", GameState.Hunter.Prey4).Execute();
MySqlCommand cmd5 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd5.Update("Hunter").Set("Pray5", GameState.Hunter.Prey5).Execute();
MySqlCommand cmd6 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd6.Update("Hunter").Set("Pray6", GameState.Hunter.Prey6).Execute();
MySqlCommand cmd7 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd7.Update("Hunter").Set("Pray7", GameState.Hunter.Prey7).Execute();
MySqlCommand cmd8 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd8.Update("Hunter").Set("Pray8", GameState.Hunter.Prey8).Execute();
MySqlCommand cmd9 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd9.Update("Hunter").Set("Pray9", GameState.Hunter.Prey9).Execute();
MySqlCommand cmd10 = new MySqlCommand(MySqlCommandType.UPDATE);
cmd10.Update("Hunter").Set("Pray10", GameState.Hunter.Prey10).Execute();

}
public static void LoadPrey()
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("Hunter");
MySqlReader d = new MySqlReader(cmd);
while (d.Read())
{
GameState.Hunter.Prey1 = d.ReadString("Pray1");
GameState.Hunter.Prey2 = d.ReadString("Pray2");
GameState.Hunter.Prey3 = d.ReadString("Pray3");
GameState.Hunter.Prey4 = d.ReadString("Pray4");
GameState.Hunter.Prey5 = d.ReadString("Pray5");
GameState.Hunter.Prey6 = d.ReadString("Pray6");
GameState.Hunter.Prey7 = d.ReadString("Pray7");
GameState.Hunter.Prey8 = d.ReadString("Pray8");
GameState.Hunter.Prey9 = d.ReadString("Pray9");
GameState.Hunter.Prey10 = d.ReadString("Pray10");
}
}تمام كده
كده احنا خلصنا اصعب حاجه نيجى لملفات الانافى كات
ده تيبول جديد
/*
Navicat MySQL Data Transfer

Source Server : silnethillco
Source Server Version : 50051
Source Host : localhost:3306
Source Database : silenthillco

Target Server Type : MYSQL
Target Server Version : 50051
File Encoding : 65001

Date: 2012-05-31 15:14:57
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `hunter`
-- ----------------------------
DROP TABLE IF EXISTS `hunter`;
CREATE TABLE `hunter` (
`Pray10` varchar(16) character set latin1 default NULL,
`Pray9` varchar(16) character set latin1 default NULL,
`Pray8` varchar(16) character set latin1 default NULL,
`Pray7` varchar(16) character set latin1 default NULL,
`Pray6` varchar(16) character set latin1 default NULL,
`Pray5` varchar(16) character set latin1 default NULL,
`Pray4` varchar(16) character set latin1 default NULL,
`Pray3` varchar(16) character set latin1 default NULL,
`Pray2` varchar(16) character set latin1 default NULL,
`Pray1` varchar(16) character set latin1 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of hunter
-- ----------------------------
INSERT INTO `hunter` VALUES ('', '', '', '', '', '', '', '', 'SunriseAreBles', 'ahmed');
تمام وركز على ديه
هتعمل زيها فى
entites
دوس Desing Table
دوس Insert field
وديه البنات
عفواً لايمكن عرض الروابط في الإرشيف (عفواً لايمكن عرض الروابط في الإرشيف)

وده سطر الانى بى سى
10101 0 0 prey 2 1457 -1 1002 417 289 0 0 0
كده مش ناقص غير اكواد
انى الى يموت ويكون حاطط اسمو ياخد الجايزه بس
زديه سهله اى حد يعملها
نهايه الموضوع
السام عليكم ورحمه الله
:SugarwareZ-244:

medaatef
12-05-2012, 10:18 PM
شـكــ وبارك الله فيك ـــرا لك ... لك مني أجمل تحية .

gogolook
01-02-2013, 01:02 PM
بسم الله الرحمن الرحيم جميل جدا