|
|
المشاركات 144 |
+التقييم 0.07 |
تاريخ التسجيل Aug 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 925 |
أفضل جواب - كتبه Tefa |
مشكله من اسكل تربل سواء مونك او قرصان هتفتح handle.cs هتبحث عن كود:
لقيت فوقها او تحتها كود:
تمام لو ملفتش بعد ما تخلص الي هتعمله ف الاولي هتعمله ف تانيه المهم هتروح فوق كود:
و تحط كود ده لحد ما تقلله لحد ما تظبط معاك كود:
بتعدل علي رقم 50 |
#region PirateSpells
#region GaleBomb
case 11070:
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Map map;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
MessiProject.Network.GamePackets.SpellUse.DamageClass tar = new SpellUse.DamageClass();
int num = 0;
switch (spell.Level)
{
case 0:
case 1:
num = 3;
break;
case 2:
case 3:
num = 4;
break;
default:
num = 5;
break;
}
int i = 0;
Kernel.Maps.TryGetValue(attacker.Owner.Map.BaseID, out map);
foreach (var t in attacker.Owner.Screen.Objects)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (Kernel.GetDistance(X, Y, target.X, target.Y) <= spell.Range)
{
if (CanAttack(attacker, target, spell, false))
{
tar.Damage = Calculate.Ranged(attacker, target, spell, ref attack);
tar.Hit = true;
tar.newX = target.X;
tar.newY = target.Y;
Map.Pushback(ref tar.newX, ref tar.newY, attacker.Facing, 5);
if (map != null)
{
if (map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
tar.newX = target.X;
tar.newY = target.Y;
}
}
else
{
if (attacker.Owner.Map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
target.X = tar.newX;
target.Y = tar.newY;
}
}
suse.AddTarget(target, tar, attack);
ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
i++;
if (i > num) break;
}
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
}
break;
#endregion
#region BladeTempest
case 11110:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
//suse.SpellLevelHu = 0;
suse.SpellLevel = spell.Level;
ushort _X = attacker.X, _Y = attacker.Y;
ushort _tX = X, _tY = Y;
byte dist = (byte)spell.Distance;
var Array = attacker.Owner.Screen.Objects;
InLineAlgorithm algo = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, dist,
InLineAlgorithm.Algorithm.DDA);
X = attacker.X;
Y = attacker.Y;
int i = 0;
for (i = 0; i < algo.lcoords.Count; i++)
{
if (attacker.Owner.Map.Floor[algo.lcoords[i].X, algo.lcoords[i].Y, MapObjectType.Entity]
&& !attacker.ThroughGate(algo.lcoords[i].X, algo.lcoords[i].Y))
{
X = (ushort)algo.lcoords[i].X;
Y = (ushort)algo.lcoords[i].Y;
}
else
{
break;
}
}
suse.X = X;
suse.Y = Y;
if (!attacker.Owner.Map.Floor[X, Y, MapObjectType.Entity, null])
return;
double disth = 1.6;
foreach (Interfaces.IMapObject _obj in Array)
{
bool hit = false;
for (int j = 0; j < i; j++)
if (Kernel.GetDDistance(_obj.X, _obj.Y, (ushort)algo.lcoords[j].X, (ushort)algo.lcoords[j].Y) <= disth)
hit = true;
if (hit)
{
if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, 0);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, 0);
damage = (uint)(damage * 1.1);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (CanAttack(attacker, attackedsob, spell))
{
var damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) * 3;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
attacker.PX = attacker.X;
attacker.PY = attacker.Y;
attacker.X = X;
attacker.Y = Y;
attacker.Owner.SendScreen(suse, true);
attacker.Owner.Screen.Reload(suse);
}
break;
}
#endregion
#region Kraken`sRevenge
case 11100:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
int num = 0;
switch (spell.Level)
{
case 0:
case 1:
num = 3;
break;
case 2:
case 3:
num = 4;
break;
default:
num = 5;
break;
}
int i = 0;
BlackSpotPacket bsp = new BlackSpotPacket();
foreach (var t in attacker.Owner.Screen.Objects/*.OrderBy(x => Kernel.GetDistance(x.X, x.Y, attacker.Owner.Entity.X, attacker.Owner.Entity.Y))*/)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (CanAttack(attacker, target, spell, false))
{
target.IsBlackSpotted = true;
target.BlackSpotStamp = Time32.Now;
target.BlackSpotStepSecs = spell.Duration;
Kernel.BlackSpoted.TryAdd(target.UID, target);
suse.AddTarget(target, new SpellUse.DamageClass(), attack);
i++;
if (i == num) break;
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
foreach (var h in Program.Values)
{
foreach (var t in suse.Targets.Keys)
{
h.Send(bsp.ToArray(true, t));
}
}
}
break;
}
#endregion
#region ScurvyBomb
case 11040:
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Map map;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
MessiProject.Network.GamePackets.SpellUse.DamageClass tar = new SpellUse.DamageClass();
int num = 0;
switch (spell.Level)
{
case 0:
case 1:
num = 3;
break;
case 2:
case 3:
num = 4;
break;
default:
num = 5;
break;
}
int i = 0;
Kernel.Maps.TryGetValue(attacker.Owner.Map.BaseID, out map);
foreach (var t in attacker.Owner.Screen.Objects)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (Kernel.GetDistance(X, Y, target.X, target.Y) <= spell.Range)
{
if (CanAttack(attacker, target, spell, false))
{
tar.Damage = Calculate.Ranged(attacker, target, ref attack);
tar.Hit = true;
tar.newX = target.X;
tar.newY = target.Y;
Map.Pushback(ref tar.newX, ref tar.newY, attacker.Facing, 5);
if (map != null)
{
if (map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
tar.newX = target.X;
tar.newY = target.Y;
}
}
else
{
if (attacker.Owner.Map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
target.X = tar.newX;
target.Y = tar.newY;
}
}
suse.AddTarget(target, tar, attack);
ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
i++;
if (i > num) break;
}
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
}
break;
#endregion
#region Cannon Barrage
case 11050:
{
if (attacker.Owner.Entity.ContainsFlag(MessiProject.Network.GamePackets.Update.Flags.XPList))
{
attacker.Owner.Entity.RemoveFlag(MessiProject.Network.GamePackets.Update.Flags.XPList);
attacker.Owner.Entity.AddFlag2(MessiProject.Network.GamePackets.Update.Flags2.CannonBarrage);
attacker.Owner.Entity.CannonBarrageStamp = Time32.Now;
return;
}
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
MessiProject.Network.GamePackets.SpellUse.DamageClass tar = new SpellUse.DamageClass();
foreach (var t in attacker.Owner.Screen.Objects)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (Kernel.GetDistance(attacker.Owner.Entity.X, attacker.Owner.Entity.Y, target.X, target.Y) <= spell.Range)
{
if (CanAttack(attacker, target, spell, false))
{
tar.Damage = Calculate.Ranged(attacker, target, ref attack, client_Spell.LevelHu2);
suse.AddTarget(target, tar, attack);
ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
}
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
break;
}
#endregion
#region Blackbeard`sRage
case 11060:
{
if (attacker.Owner.Entity.ContainsFlag(MessiProject.Network.GamePackets.Update.Flags.XPList))
{
attacker.Owner.Entity.RemoveFlag(MessiProject.Network.GamePackets.Update.Flags.XPList);
attacker.Owner.Entity.AddFlag2(MessiProject.Network.GamePackets.Update.Flags2.BlackbeardsRage);
attacker.Owner.Entity.BlackbeardsRageStamp = Time32.Now;
return;
}
int num = 0;
switch (spell.Level)
{
case 0:
case 1:
num = 3;
break;
case 2:
case 3:
num = 4;
break;
default:
num = 5;
break;
}
int i = 0;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
MessiProject.Network.GamePackets.SpellUse.DamageClass tar = new SpellUse.DamageClass();
foreach (var t in attacker.Owner.Screen.Objects)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (Kernel.GetDistance(attacker.Owner.Entity.X, attacker.Owner.Entity.Y, target.X, target.Y) <= spell.Range)
{
if (CanAttack(attacker, target, spell, false))
{
tar.Damage = Calculate.Ranged(attacker, target, ref attack, client_Spell.LevelHu2);
suse.AddTarget(target, tar, attack);
ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
i++;
if (i == num) break;
}
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
break;
}
#endregion
#endregion
case 10490:
case 11140:
ReceiveAttack(
damage = damage * 50 / 100;
|
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اسكل اكس بي القرصان | Tefa | قسم الاقتراحات والابداع | 1 | 2020-02-23 01:20 PM |
مشكلة في ضربة الاكونت الفيزيكال | Omar | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-12-18 09:44 PM |
مشكلة في ضربة الاكونت ف الاتكات | Omar | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-12-17 05:12 AM |
تقليل ضربة ال bot بتاع الحرب | Tefa | تطوير سيرفرات كونكر | 3 | 2019-10-04 03:15 PM |
سكل ابيك القرصان | اسلام | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-09-29 03:48 AM |