مشاهدة النسخة كاملة : طلب بسيط فى سورس ahmedfathy
MeGoo
2019-07-27, 06:49 PM
انا عاوز اعرف ازاى اعدل على واقت الاوتو انفت بتاع وحواش البانش
و الاوتو بتاع التوبات عاوز اغير الموعيد منين
انا بدور في الكورس كلها مش لاقى يا ريت حد يقولى
ElSaher
2019-07-27, 06:55 PM
بوص يا صحبي الوحوش هتخوش علي npc وتدور علي class بتاع الوحوش وتغير منه المواعديد ونفس الكلام في world تبحث عن اسم اي وحش من الوحوش وتخوش علي monster table وتغير منها السبس الي بيديه الوحوش ونفس الكلام في التوبات بس التوبات التغيير بتاع السبس من npc بتاعها بردو
MeGoo
2019-07-27, 07:19 PM
بوص يا صحبي الوحوش هتخوش علي npc وتدور علي class بتاع الوحوش وتغير منه المواعديد ونفس الكلام في world تبحث عن اسم اي وحش من الوحوش وتخوش علي monster table وتغير منها السبس الي بيديه الوحوش ونفس الكلام في التوبات بس التوبات التغيير بتاع السبس من npc بتاعها بردو
انا عاوز اغير في موعيد رساله الاوتو الي بتجى
Hassan Emprator
2019-07-27, 07:24 PM
انا عاوز اغير في موعيد رساله الاوتو الي بتجى
هتلاقيها في world ياحبي انزل تحت خالص هتلاقي #region All Qouest دا عندي بس هتلاقي حاجه عندك تانيه عا حسب سورسك هتلاقي الرساله الي بتيجي وبدايتها وكلو:emoji11:
MeGoo
2019-07-27, 07:29 PM
#region TeratoDragon
if ((DateTime.Now.Minute == 55 && DateTime.Now.Second == 35))
{
ushort x = 0, y = 0;
ushort MapID = 39984;
y = 93;
x = 212;
uint id = 4152;
string name = "TeratoDragon"; ;
if (Database.DMaps.LoadMap(MapID))
{
if (Program.TeratoDragon)
{
if (Kernel.Maps.ContainsKey(MapID))
{
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.C ontainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
Program.TeratoDragon = false;
mt.BoundY = y;
Entity entity = new Entity(EntityFlag.Monster, false);
entity.MapObjType = MapObjectType.Monster;
entity.MonsterInfo = mt.Copy();
entity.MonsterInfo.Owner = entity;
entity.Name = mt.Name;
entity.MinAttack = mt.MinAttack;
entity.MaxAttack = entity.MagicAttack = mt.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints;
entity.Defence = mt.Defence;
entity.Body = mt.Mesh;
entity.Level = mt.Level;
entity.UID = Map.EntityUIDCounter.Next;
entity.MapID = MapID;
entity.X = x;
entity.Boss = 1;
entity.Y = y;
if (x == 0 || y == 0)
{
var cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
do
{
cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
}
while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]);
}
Map.AddEntity(entity);
Network.GamePackets._String stringPacket =
new Network.GamePackets._String(true);
stringPacket.UID = entity.UID;
stringPacket.Type = Network.GamePackets._String.Effect;
stringPacket.Texts.Add("MBStandard");
Data data = new Data(true);
data.UID = entity.UID;
data.ID = Network.GamePackets.Data.AddEntity;
data.wParam1 = entity.X;
data.wParam2 = entity.Y;
foreach (Client.GameState clllient in Program.Values)
{
if (clllient.Map.ID == entity.MapID)
{
if (Kernel.GetDistance(clllient.Player.X, clllient.Player.Y, entity.X, entity.Y) <
Constants.nScreenDistance)
{
entity.SendSpawn(clllient, false);
clllient.Send(stringPacket);
clllient.Send(data);
if (entity.MaxHitpoints > 65535)
{
Update upd = new Update(true) { UID = entity.UID };
upd.Append(Update.MaxHitpoints, entity.MaxHitpoints);
upd.Append(Update.Hitpoints, entity.Hitpoints);
clllient.Send(upd);
}
}
}
}
foreach (var client10 in Program.Values)
{
client10.Player.SendSysMessage(name + " has appeared. Hurry and go defeat the beast!");
client10.MessageBox(name + " has appeared Would you Want to Kill-Monster?",
(p) => { p.Player.Teleport(MapID, x, y); }, null, 20);
}
}
}
}
}
}
#endregion
بوس كدا هنا
MeGoo
2019-07-27, 07:40 PM
و التوبات كتير اوي في اليوم
دا كل 5 دقائق توب التوب لازم يكون مرا او مرتين بس في اليوم
اعملها مرا واحدة فى اليوم ازاى
ElSaher
2019-07-27, 07:41 PM
لو انتا عايز تعمل لعبه صعبه استخدم سورس مار باندا بعد التحديث دا صحبي وفكسد ببردو
MeGoo
2019-07-27, 07:49 PM
لو انتا عايز تعمل لعبه صعبه استخدم سورس مار باندا بعد التحديث دا صحبي وفكسد ببردو
لو احسن من سورس احمد فتحى الاخير دا
يبقى تمام اوى
و يا ريت لو بعتلى اللينك يبقى كتر خيرك
#region TeratoDragon
if ((DateTime.Now.Minute == 55 && DateTime.Now.Second == 35))
{
ushort x = 0, y = 0;
ushort MapID = 39984;
y = 93;
x = 212;
uint id = 4152;
string name = "TeratoDragon"; ;
if (Database.DMaps.LoadMap(MapID))
{
if (Program.TeratoDragon)
{
if (Kernel.Maps.ContainsKey(MapID))
{
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.C ontainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
Program.TeratoDragon = false;
mt.BoundY = y;
Entity entity = new Entity(EntityFlag.Monster, false);
entity.MapObjType = MapObjectType.Monster;
entity.MonsterInfo = mt.Copy();
entity.MonsterInfo.Owner = entity;
entity.Name = mt.Name;
entity.MinAttack = mt.MinAttack;
entity.MaxAttack = entity.MagicAttack = mt.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints;
entity.Defence = mt.Defence;
entity.Body = mt.Mesh;
entity.Level = mt.Level;
entity.UID = Map.EntityUIDCounter.Next;
entity.MapID = MapID;
entity.X = x;
entity.Boss = 1;
entity.Y = y;
if (x == 0 || y == 0)
{
var cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
do
{
cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
}
while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]);
}
Map.AddEntity(entity);
Network.GamePackets._String stringPacket =
new Network.GamePackets._String(true);
stringPacket.UID = entity.UID;
stringPacket.Type = Network.GamePackets._String.Effect;
stringPacket.Texts.Add("MBStandard");
Data data = new Data(true);
data.UID = entity.UID;
data.ID = Network.GamePackets.Data.AddEntity;
data.wParam1 = entity.X;
data.wParam2 = entity.Y;
foreach (Client.GameState clllient in Program.Values)
{
if (clllient.Map.ID == entity.MapID)
{
if (Kernel.GetDistance(clllient.Player.X, clllient.Player.Y, entity.X, entity.Y) <
Constants.nScreenDistance)
{
entity.SendSpawn(clllient, false);
clllient.Send(stringPacket);
clllient.Send(data);
if (entity.MaxHitpoints > 65535)
{
Update upd = new Update(true) { UID = entity.UID };
upd.Append(Update.MaxHitpoints, entity.MaxHitpoints);
upd.Append(Update.Hitpoints, entity.Hitpoints);
clllient.Send(upd);
}
}
}
}
foreach (var client10 in Program.Values)
{
client10.Player.SendSysMessage(name + " has appeared. Hurry and go defeat the beast!");
client10.MessageBox(name + " has appeared Would you Want to Kill-Monster?",
(p) => { p.Player.Teleport(MapID, x, y); }, null, 20);
}
}
}
}
}
}
#endregion
بوس كدا هنا
انفيت تحت خالص
foreach (var client10 in Program.Values)
{
client10.Player.SendSysMessage(name + " has appeared. Hurry and go defeat the beast!");
client10.MessageBox(name + " has appeared Would you Want to Kill-Monster?",
(p) => { p.Player.Teleport(MapID, x, y); }, null, 20);
بتيجي لما الوحش يطلع
MeGoo
2019-07-27, 09:37 PM
انفيت تحت خالص
foreach (var client10 in program.values)
{
client10.player.sendsysmessage(name + " has appeared. Hurry and go defeat the beast!");
client10.messagebox(name + " has appeared would you want to kill-monster?",
(p) => { p.player.teleport(mapid, x, y); }, null, 20);
بتيجي لما الوحش يطلع
طب تمام انا بقى عاوز اغير معاد طلوع الوحش
محمد ياسر
2019-07-27, 09:38 PM
if ((DateTime.Now.Minute == 55 && DateTime.Now.Second == 35))
MeGoo
2019-07-27, 09:53 PM
if ((datetime.now.minute == 55 && datetime.now.second == 35))
مهو انا وصلت للسطر دا دلوقتى انا عاوز الوحش دا مثلا يطلع مرا واحدة فى اليوم الساعه 4 العصر
يعنى الساعه 16.00
اكتب فين مش فاهم اية 55 و 35 دي بتوع اية
مهو انا وصلت للسطر دا دلوقتى انا عاوز الوحش دا مثلا يطلع مرا واحدة فى اليوم الساعه 4 العصر
يعنى الساعه 16.00
اكتب فين مش فاهم اية 55 و 35 دي بتوع اية
امسح ده if ((datetime.now.minute == 55 && datetime.now.second == 35))
و حط مكانه ده
if (DateTime.Now.Hour == 16&&datetime.now.minute == 0 && datetime.now.second == 0)
MeGoo
2019-07-28, 11:25 AM
امسح ده if ((datetime.now.minute == 55 && datetime.now.second == 35))
و حط مكانه ده
if (DateTime.Now.Hour == 16&&datetime.now.minute == 0 && datetime.now.second == 0))
شكرا يا صحبي على المتابعه
انا عمل زي منتا قولت جاى ايررو
Error 1 Invalid expression term ')' E:\سورس league_legends اخيرآ سورس فكسد الناس تشتغل بي\Source Last update ahmedfthy 5ALY MN ALVYROS\World.cs 2276 94 ahmedfathy
Error 2 ; expected E:\سورس league_legends اخيرآ سورس فكسد الناس تشتغل بي\Source Last update ahmedfthy 5ALY MN ALVYROS\World.cs 2276 95 ahmedfathy
MeGoo
2019-07-28, 11:30 AM
عفواً لايمكن عرض الروابط في الإرشيف (عفواً لايمكن عرض الروابط في الإرشيف)
ف قوس زياده غلطه مني في اخر السطر في 2 قوس امسح واحد منهم
MeGoo
2019-07-28, 11:34 AM
انا غيرات
if (DateTime.Now.Hour == 16&&datetime.now.minute == 0 && datetime.now.second == 0))
با
if (DateTime.Now.Hour == 19 && DateTime.Now.Minute == 0 && DateTime.Now.Second == 0)
الارور اتشال فى حاجة تانى ولا كدا تمام
MeGoo
2019-07-28, 12:40 PM
كده تمام ان شاء الله
شكرا على المتابعه
و شكرا ليك يا صحبي الميعاد اتغيرات بس رساله الاوتو مبقتش بتجي
#region Fb&SS
if (DateTime.Now.Hour == 11 && DateTime.Now.Minute == 31 && Now64.Second == 15)
{
كدا المفروض مرا واحدة فى اليوم كدا صح ولا غلط
MeGoo
2019-07-28, 12:44 PM
دا المفروض يشتغل الساعه 8.30 و يخلص 9.30
#region elite gw
if (!game.eliteguildwar.iswar)
{
if (datetime.now.hour == 20 && datetime.now.minute == 31 && now64.second == 15)
{
game.eliteguildwar.start();
foreach (var client in program.values)
client.messagebox("eliteguildwar begin want join ?",
p => { p.player.teleport(1002, 285, 158); }, null);
}
}
if (game.eliteguildwar.iswar)
{
if (time32.now > game.eliteguildwar.scoresendstamp.addseconds(3))
{
game.eliteguildwar.scoresendstamp = time32.now;
game.eliteguildwar.sendscores();
}
if (now64.hour == 20 && now64.minute <= 30)
{
kernel.sendworldmessage(new network.gamepackets.message("elite guildwar will closed 5 minutes left till end hurry kick other guild's.", system.drawing.color.white, network.gamepackets.message.center), program.values);
}
}
if (game.eliteguildwar.iswar)
{
if (now64.hour == 21 && now64.minute == 30)
{
game.eliteguildwar.end();
{
kernel.sendworldmessage(new network.gamepackets.message("eliteguild war ended.", system.drawing.color.white, network.gamepackets.message.center), program.values);
}
}
}
#endregion
شغال دلوقتى الساعه 12 اية الى غلط
MeGoo
2019-07-28, 02:03 PM
انا خلصت من الواحوش و شغلتها
بس التوبات مش اتعدلت مش عارف لية ة الاوتو بتاعهم مش بيشتغل حد يعرف يقولى الصح بتعهم اية
مثلا
dialog.Text("HorsePK War is held during 12:15 To 12:18 in every Hour");
دا المفروض انا عملتة الساعه 12.15
شغال كل 15 دقيقه مش عارف اية السبب و الاوتو اتلغه
دي التوبات #region Questesr Join
case 141198:
{
switch (npcRequest.OptionID)
{
case 0:
{
{
dialog.Text("Hey there > " + client.Player.Name + " < No Questes for now -_-");
dialog.Option("Ok Thanks.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 00 && DateTime.Now.Minute <= 04)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join the top?.");
dialog.Option("Yea Please !!", 100);
dialog.Option("Thx.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 07 && DateTime.Now.Minute <= 11)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join the top?.");
dialog.Option("Yea Please !!", 101);
dialog.Option("Thx.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 14 && DateTime.Now.Minute <= 18)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join top?.");
dialog.Option("Yea Please !!", 102);
dialog.Option("Thx.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 21 && DateTime.Now.Minute <= 25)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join the top?.");
dialog.Option("Yea Please !!", 103);
dialog.Option("Thx.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 28 && DateTime.Now.Minute <= 32)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join the top ?.");
dialog.Option("Yea Please !!", 104);
dialog.Option("Thx.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 35 && DateTime.Now.Minute <= 39)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join the top ?.");
dialog.Option("Yea Please !!", 105);
dialog.Option("Thx.", 255);
dialog.Send();
}
if (DateTime.Now.Minute >= 42 && DateTime.Now.Minute <= 46)
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to join the top?.");
dialog.Option("Yea Please !!", 106);
dialog.Option("Thx.", 255);
dialog.Send();
}
break;
}
case 100:
{
if (DateTime.Now.Minute >= 00 && DateTime.Now.Minute <= 04)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1991, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("ConquerPK War is held during 10:15 To 10:19 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
case 101:
{
if (DateTime.Now.Minute >= 07 && DateTime.Now.Minute <= 11)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1992, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("DemonHellPK War is held during 11:15 To 11:19 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
case 102:
{
if (DateTime.Now.Minute >= 14 && DateTime.Now.Minute <= 18)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1993, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("HorsePK War is held during 12:15 To 12:18 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
case 103:
{
if (DateTime.Now.Minute >= 21 && DateTime.Now.Minute <= 25)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1994, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("SpeedPK War is held during 13:15 To 13:19 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
case 104:
{
if (DateTime.Now.Minute >= 28 && DateTime.Now.Minute <= 32)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1995, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("The Prince War is held during 14:15 To 18:19 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
case 105:
{
if (DateTime.Now.Minute >= 35 && DateTime.Now.Minute <= 39)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1996, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("The Duke War is held during 15:15 To 15:19 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
case 106:
{
if (DateTime.Now.Minute >= 42 && DateTime.Now.Minute <= 46)
{
client.Player.RemoveFlag(Update.Flags.Ride);
client.Player.Teleport(1997, 48, 48);
client.Player.PKMode = Game.Enums.PKMode.Team;
client.Send(new Data(true) { UID = client.Player.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Player.PKMode });
}
else
{
dialog.Text("ChampionPK War is held during 16:15 To 16:19 in every Hour");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
}
break;
}
#endregion
ده الراجل الي بيدخلك التوبات انما انفيت بتاعهم هتلاقيه في World.cs
MeGoo
2019-07-29, 12:31 PM
ده الراجل الي بيدخلك التوبات انما انفيت بتاعهم هتلاقيه في World.cs
اهو
#region Elite GW
if (!Game.EliteGuildWar.IsWar)
{
if (Now64.Minute == 44 && Now64.Second == 15)
{
Game.EliteGuildWar.Start();
foreach (var client in Program.Values)
client.MessageBox("EliteGuildWar Begin Want Join ?",
p => { p.Player.Teleport(1002, 285, 158); }, null);
}
}
if (Game.EliteGuildWar.IsWar)
{
if (Time32.Now > Game.EliteGuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.EliteGuildWar.ScoreSendStamp = Time32.Now;
Game.EliteGuildWar.SendScores();
}
if (Now64.Minute == 54 && Now64.Second <= 00)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("Elite GuildWar will closed 5 Minutes left till End Hurry kick other Guild's.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
}
}
if (Game.EliteGuildWar.IsWar)
{
if (Now64.Minute == 59 && Now64.Second == 00)
{
Game.EliteGuildWar.End();
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("EliteGuiLD War Ended.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
}
}
}
#endregion
MeGoo
2019-07-29, 12:37 PM
دول كدا 2 توب
واحد فيهم مره واحدة فى اليوم و التانى كل ساعه صح كدا
#region Mr/Ms Conquer
if (DateTime.Now.Hour == 19 && DateTime.Now.Minute == 31 && Now64.Second == 15)
{
Kernel.SendWorldMessage(new Message("Mr/Ms Conquer War began! Go Twin city ", Color.Red, Message.BroadcastMessage), Program.Values);
foreach (var client in Program.Values)
client.MessageBox("Mr/Ms Conquer began! Would you like to join Priz ?",
p => { p.Player.Teleport(1002, 290, 193); }, null, 60);
}
#endregion
#region Fb&SS
if (Now64.Minute == 25 && Now64.Second == 10)
{
Kernel.SendWorldMessage(new Message(" Fast blade and ScentSword war is began ", Color.White, Message.TopLeft), Program.Values);
foreach (var client in Program.Values)
client.MessageBox("Fast blade and ScentSword began Would you like to join?",
p => { p.Player.Teleport(1002, 295, 230); }, null, 20);
}
#endregion
-------------------------
#region Fb&SS
if (Now64.Minute == 25 && Now64.Second == 10)
{
Kernel.SendWorldMessage(new Message(" Fast blade and ScentSword war is began ", Color.White, Message.TopLeft), Program.Values);
foreach (var client in Program.Values)
client.MessageBox("Fast blade and ScentSword began Would you like to join?",
p => { p.Player.Teleport(1002, 295, 230); }, null, 20);
}
#endregion
ElSaher
2019-07-30, 07:40 PM
لو احسن من سورس احمد فتحى الاخير دا
يبقى تمام اوى
و يا ريت لو بعتلى اللينك يبقى كتر خيرك
اه يا صحبي احسن منو طلعن السورس بتاع مار بندا متكود علي اسا انو صعب خالص اشتغل بيه وهيكون تمم معاك ولو لقيت اي مشكلة معا ان ملفيش مشاكل اكتب موضوع وهيتم اضافت الرد بي اسرع وقت
MeGoo
2019-07-30, 08:15 PM
ارجو غلق الموضوع لا يوجد حل
vBulletin® v3.8.8 Beta 1, Copyright ©2000-2024, TranZ by code