|
المشاركات 1,372 |
+التقييم 0.67 |
تاريخ التسجيل Apr 2019 |
الاقامة شرقيه/زقازيق |
نظام التشغيل |
رقم العضوية 30 |
#region Stomper(Melee)
#region Stomper(Melee)
#region Anger-Horror-Peace~of~Stomper(Windwalker-Stomper-Passive)
var lastattacked = attacked;
var spell5 = Database.SpellTable.GetSpell(12980, attacker.Owner);
if (Kernel.Rate(spell5.Percent) && attacker.Owner.Spells.ContainsKey(12980) && attacker.IsStomper2())
{
#region AngerofStomper
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell5.ID;
suse.SpellLevel = spell5.Level;
suse.X = lastattacked.X;
suse.Y = lastattacked.Y;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) <= spell5.Range)
{
if (_obj.MapObjType == MapObjectType.Entity)
{
if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
suse.Effect1 = attack.Effect1;
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell5);
suse.AddTarget(attacked, damage, attack);
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) continue;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell5);
suse.AddTarget(attacked, damage, attack);
}
}
}
attacker.AttackPacket = null;
attacker.Owner.SendScreen(suse, true);
}
#endregion
#region HorrorofStomper
{
var spell2 = Database.SpellTable.GetSpell(12990, attacker.Owner);
if (!attacker.Owner.Spells.ContainsKey(12990)) return;
attack.Damage = 0;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell2.ID;
suse.SpellLevel = spell2.Level;
suse.X = lastattacked.X;
suse.Y = lastattacked.Y;
attacker.AttackPacket = null;
attacker.Owner.SendScreen(suse, true);
#region Flooritem
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.HorrorofStomper;
flooritem.X = lastattacked.X;
flooritem.Y = lastattacked.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 14;
flooritem.OwnerUID = attacker.UID;
flooritem.OwnerGuildUID = attacker.GuildID;
flooritem.FlowerType = 3;
flooritem.Unknown37 = 1;
flooritem.X2 = attacker.X;
flooritem.Y2 = attacker.Y;
flooritem.Angle = attacker.Facing;
flooritem.MapID = map.ID;
flooritem.Attack = attack;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
#endregion
}
#endregion
#region PeaceofStomper
{
var spell3 = Database.SpellTable.GetSpell(13000, attacker.Owner);
if (!attacker.Owner.Spells.ContainsKey(13000)) return;
attack.Damage = 0;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellLevel = spell3.Level;
suse.SpellID = spell3.ID;
suse.X = lastattacked.X;
suse.Y = lastattacked.Y;
attacker.AttackPacket = null;
attacker.Owner.SendScreen(suse, true);
#region Flooritem
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.PeaceofStomper;
flooritem.X = lastattacked.X;
flooritem.Y = lastattacked.Y;
flooritem.X2 = attacker.X;
flooritem.Y2 = attacker.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 14;
flooritem.OwnerUID = attacker.UID;
flooritem.OwnerGuildUID = attacker.GuildID;
flooritem.FlowerType = 3;
flooritem.Unknown37 = 1;
flooritem.MapID = map.ID;
flooritem.Attack = attack;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
#endregion
}
#endregion
return;
}
#endregion
else if (attacker.Class >= 160&&attacker.Class <= 165)
{
#region Sector-Circle-Rectangle(Windwalker-Stomper-Melee)
if (attack.SpellID == 13040 || attack.SpellID == 13050 || attack.SpellID == 13060)
{
#region Sector
if (attack.SpellID == 13040)
{
var spell = Database.SpellTable.GetSpell(13040, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = attack.SpellID;
suse.X = attacker.X;
suse.Y = attacker.Y;
var angle = Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y);
Map.UpdateCoordonatesForAngle(ref X, ref Y, angle);
Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector);
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 7)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee))
{
if (sector.IsInFan(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
damage = (uint)(damage * 0.2);
attack.Damage = 0;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
}
}
}
#endregion
#region Circle
if (attack.SpellID == 13050)
{
var spell = Database.SpellTable.GetSpell(13050, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = attack.SpellID;
suse.X = attacker.X;
suse.Y = attacker.Y;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 5) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
damage = (uint)(damage * 0.4);
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
#endregion
#region Rectangle
if (attack.SpellID == 13060)
{
var spell = Database.SpellTable.GetSpell(13060, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = attack.SpellID;
suse.X = attacker.X;
suse.Y = attacker.Y;
var angle = Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y);
Map.UpdateCoordonatesForAngle(ref X, ref Y, angle);
Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector);
uint damage2 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
attack.Damage = 0;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
ReceiveAttack(attacker, attacked, attack, ref damage2, spell);
suse.AddTarget(attacked, damage2, attack);
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (sector.IsInFan(attacked.X, attacked.Y))
{
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 7) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
damage = (uint)(damage * 0.2);
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
#endregion
}
#endregion
}
#endregion
#region Stomper(Melee)
#region Stomper(Melee)
#region Anger-Horror-Peace~of~Stomper(Windwalker-Stomper-Passive)
var lastattacked = attacked;
var spell5 = Database.SpellTable.GetSpell(12980, attacker.Owner);
if (Kernel.Rate(spell5.Percent) && attacker.Owner.Spells.ContainsKey(12980) && attacker.IsStomper2())
{
#region AngerofStomper
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell5.ID;
suse.SpellLevel = spell5.Level;
suse.X = lastattacked.X;
suse.Y = lastattacked.Y;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) <= spell5.Range)
{
if (_obj.MapObjType == MapObjectType.Entity)
{
if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
suse.Effect1 = attack.Effect1;
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell5);
suse.AddTarget(attacked, damage, attack);
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) continue;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell5);
suse.AddTarget(attacked, damage, attack);
}
}
}
attacker.AttackPacket = null;
attacker.Owner.SendScreen(suse, true);
}
#endregion
#region HorrorofStomper
{
var spell2 = Database.SpellTable.GetSpell(12990, attacker.Owner);
if (!attacker.Owner.Spells.ContainsKey(12990)) return;
attack.Damage = 0;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell2.ID;
suse.SpellLevel = spell2.Level;
suse.X = lastattacked.X;
suse.Y = lastattacked.Y;
attacker.AttackPacket = null;
attacker.Owner.SendScreen(suse, true);
#region Flooritem
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.HorrorofStomper;
flooritem.X = lastattacked.X;
flooritem.Y = lastattacked.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 14;
flooritem.OwnerUID = attacker.UID;
flooritem.OwnerGuildUID = attacker.GuildID;
flooritem.FlowerType = 3;
flooritem.Unknown37 = 1;
flooritem.X2 = attacker.X;
flooritem.Y2 = attacker.Y;
flooritem.Angle = attacker.Facing;
flooritem.MapID = map.ID;
flooritem.Attack = attack;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
#endregion
}
#endregion
#region PeaceofStomper
{
var spell3 = Database.SpellTable.GetSpell(13000, attacker.Owner);
if (!attacker.Owner.Spells.ContainsKey(13000)) return;
attack.Damage = 0;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellLevel = spell3.Level;
suse.SpellID = spell3.ID;
suse.X = lastattacked.X;
suse.Y = lastattacked.Y;
attacker.AttackPacket = null;
attacker.Owner.SendScreen(suse, true);
#region Flooritem
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.PeaceofStomper;
flooritem.X = lastattacked.X;
flooritem.Y = lastattacked.Y;
flooritem.X2 = attacker.X;
flooritem.Y2 = attacker.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 14;
flooritem.OwnerUID = attacker.UID;
flooritem.OwnerGuildUID = attacker.GuildID;
flooritem.FlowerType = 3;
flooritem.Unknown37 = 1;
flooritem.MapID = map.ID;
flooritem.Attack = attack;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
#endregion
}
#endregion
return;
}
#endregion
else if (attacker.Class >= 160&&attacker.Class <= 165)
{
#region Sector-Circle-Rectangle(Windwalker-Stomper-Melee)
if (attack.SpellID == 13040 || attack.SpellID == 13050 || attack.SpellID == 13060)
{
#region Sector
if (attack.SpellID == 13040)
{
var spell = Database.SpellTable.GetSpell(13040, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = attack.SpellID;
suse.X = attacker.X;
suse.Y = attacker.Y;
var angle = Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y);
Map.UpdateCoordonatesForAngle(ref X, ref Y, angle);
Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector);
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 7)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee))
{
if (sector.IsInFan(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
damage = (uint)(damage * 0.2);
attack.Damage = 0;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
}
}
}
#endregion
#region Circle
if (attack.SpellID == 13050)
{
var spell = Database.SpellTable.GetSpell(13050, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = attack.SpellID;
suse.X = attacker.X;
suse.Y = attacker.Y;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 5) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
damage = (uint)(damage * 0.4);
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
#endregion
#region Rectangle
if (attack.SpellID == 13060)
{
var spell = Database.SpellTable.GetSpell(13060, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = attack.SpellID;
suse.X = attacker.X;
suse.Y = attacker.Y;
var angle = Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y);
Map.UpdateCoordonatesForAngle(ref X, ref Y, angle);
Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector);
uint damage2 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
attack.Damage = 0;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
ReceiveAttack(attacker, attacked, attack, ref damage2, spell);
suse.AddTarget(attacked, damage2, attack);
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (sector.IsInFan(attacked.X, attacked.Y))
{
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 7) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
damage = (uint)(damage * 0.2);
attack.Damage = 0;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
#endregion
}
#endregion
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حـل آولـ مشكـلة هتقآبـلك فـ سـورسـ رآيزرو v3 | MaZzGanGYy | تطوير سيرفرات كونكر | 20 | 2024-07-20 01:12 PM |