Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bueno, se Dirigen a Handler.cs #region Melee y Si no tienen el Codigo lo Pegan!
- if (attacker.Assassin() || attacker.IsBowEquipped || attacker.IsChaser() && attacker.IsChaser1() && attacker.IsChaser2())
- {
- attack.InteractType = Attack.Ranged;
- new Game.Attacking.Handle(attack, attacker, attacked);
- return;
- }
- =================================================================================
- En #region Ranged Abajo de
- if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= Constants.pScreenDistance)
- Deberian tener un codigo de Assassin, bueno lo borran y lo dejan asi :
- if (!attacker.Assassin() && attacker.IsChaser2())
- damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack);
- else damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
- attack.Damage = damage / 4;//En caso de que les Pegue Poquito le dividen 2 / 2
- ==================================================================================
- En Handler.cs en la Variable de void StomperMelee la Reemplazan por la mia :
- public static void StomperMelee(FloorItem item, ushort SpellID)
- {
- Attack attack = new Attack(true);
- attack.Attacker = item.Owner.Player.UID;
- var spell = Database.SpellTable.GetSpell(SpellID, item.Owner);
- MsgMagicEffect suse = new MsgMagicEffect(true);
- suse.Attacker = SpellID == 12990 ? item.UID : item.Owner.Player.UID;
- suse.SpellID = SpellID;
- attack.SpellID = suse.SpellLevel = spell.Level;
- suse.SpecialEffect = 1;
- if (SpellID == 12990)
- {
- suse.X = item.Start;
- suse.Y = item.End;
- foreach (Interfaces.IMapObject _obj in item.Owner.Screen.Objects)
- {
- if (_obj.MapObjType == MapObjectType.Monster)
- {
- if (_obj == null) continue;
- var attacked1 = _obj as Player;
- if (CanAttack(item.Owner.Player, attacked1, spell, false))
- {
- {
- var spellange = Enums.HorrorofStomperAngle(item.Angle);
- ushort xxxx = item.X;
- ushort yyyy = item.Y;
- Map.Pushback(ref xxxx, ref yyyy, spellange, 7);
- Fan sector = new Fan(item.X, item.Y, xxxx, yyyy, spell.Range, spell.Sector);
- if (sector.IsInFan(attacked1.X, attacked1.Y))
- {
- uint damage = (uint)(Game.Attacking.Calculate.Melee(item.Owner.Player, attacked1, ref attack));
- attack.Damage = damage / 2;
- ReceiveAttack(item.Owner.Player, attacked1, attack, ref damage, spell);
- suse.AddTarget(attacked1.UID, damage, null);
- continue;
- }
- }
- {
- var spellange = Enums.OppositeAngle(Enums.HorrorofStomperAngle(item.Angle));
- ushort xxxx = item.X;
- ushort yyyy = item.Y;
- Map.Pushback(ref xxxx, ref yyyy, spellange, 7);
- Fan sector = new Fan(item.X, item.Y, xxxx, yyyy, spell.Range, spell.Sector);
- if (sector.IsInFan(attacked1.X, attacked1.Y))
- {
- uint damage = (uint)(Game.Attacking.Calculate.Melee(item.Owner.Player, attacked1, ref attack));
- attack.Damage = damage / 2;
- ReceiveAttack(item.Owner.Player, attacked1, attack, ref damage, spell);
- suse.AddTarget(attacked1.UID, damage, null);
- }
- }
- }
- }
- }
- }
- else
- {
- suse.X = item.X;
- suse.Y = item.Y;
- foreach (Interfaces.IMapObject _obj in item.Owner.Screen.Objects)
- {
- if (_obj.MapObjType == MapObjectType.Monster)
- {
- if (_obj == null) continue;
- var attacked1 = _obj as Player;
- if (Kernel.GetDistance(item.X, item.Y, attacked1.X, attacked1.Y) <= spell.Range)
- {
- if (CanAttack(item.Owner.Player, attacked1, spell, false))
- {
- uint damage = (Game.Attacking.Calculate.Melee(item.Owner.Player, attacked1, ref attack));
- attack.Damage = damage / 2;
- ReceiveAttack(item.Owner.Player, attacked1, attack, ref damage, spell);
- suse.AddTarget(attacked1.UID, damage, null);
- }
- }
- }
- }
- }
- item.Owner.SendScreen(suse.ToArray(), true);
- item.Owner.Player.AttackPacket = null;
- }
- =================================================================
- En FloorItem.cs o MsgMapItem.cs como lo tengan si no los tienen los agregan :
- public ushort Start
- {
- get { return Buffer[61]; }
- set { Writer.WriteUInt32(value, 61, Buffer); }
- }
- public ushort Now
- {
- get { return Buffer[62]; }
- set { Writer.WriteUInt32(value, 62, Buffer); }
- }
- public ushort End
- {
- get { return Buffer[63]; }
- set { Writer.WriteUInt32(value, 63, Buffer); }
- }
- ===================================================================
- En Handler.cs #region Melee debajo de if (attacker.Owner.Screen.TryGetValue(attack.Attacked, out attacked)) Pegaran:
- #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
- {
- MsgMagicEffect suse = new MsgMagicEffect(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 Player;
- if (attacked == null) continue;
- if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) <= spell5.Range)
- {
- if (_obj.MapObjType == MapObjectType.Player)
- {
- if (!CanAttack(attacker, attacked, null, attack.InteractType == MsgInteract.Melee)) continue;
- attack.Effect = MsgInteract.InteractEffects.None;
- uint damage5 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack) / 2;
- damage5 = (uint)(damage5 * .5);
- suse.Effect = attack.Effect;
- attack.Damage = damage5 / 2;
- ReceiveAttack(attacker, attacked, attack,ref damage5, spell5);
- suse.AddTarget(attacked.UID, damage5, attack);
- }
- else if (_obj.MapObjType == MapObjectType.Monster)
- {
- if (!CanAttack(attacker, attacked, null, attack.InteractType == MsgInteract.Melee)) continue;
- uint damage5 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack) / 2;
- attack.Damage = damage5 / 2;
- ReceiveAttack(attacker, attacked, attack,ref damage5, spell5);
- suse.AddTarget(attacked.UID, damage5, 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 = 1;
- MsgMagicEffect suse = new MsgMagicEffect(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 MsgMapItem
- var map = Kernel.Maps[attacker.MapID];
- MsgMapItem MsgMapItem = new MsgMapItem(true);
- MsgMapItem.UID = MsgMapItem.FloorUID.Next;
- while (map.Npcs.ContainsKey(MsgMapItem.UID))
- MsgMapItem.UID = MsgMapItem.FloorUID.Next;
- MsgMapItem.ItemID = MsgMapItem.HorrorofStomper;
- MsgMapItem.X = lastattacked.X;
- MsgMapItem.Y = lastattacked.Y;
- MsgMapItem.Type = MsgMapItem.Effect;
- MsgMapItem.mColor = 14;
- MsgMapItem.OwnerUID = attacker.UID;
- MsgMapItem.OwnerGuildUID = attacker.GuildID;
- MsgMapItem.FlowerType = 3;
- MsgMapItem.Unknown37 = 1;
- MsgMapItem.X2 = attacker.X;
- MsgMapItem.Y2 = attacker.Y;
- MsgMapItem.Angle = attacker.Facing;
- MsgMapItem.MapID = map.ID;
- MsgMapItem.Attack = attack;
- MsgMapItem.OnFloor = Time32.Now;
- MsgMapItem.Owner = attacker.Owner;
- map.AddFloorItem(MsgMapItem);
- attacker.Owner.SendScreenSpawn(MsgMapItem, true);
- #endregion
- }
- #endregion
- #region PeaceofStomper
- {
- var spell3 = Database.SpellTable.GetSpell(13000, attacker.Owner);
- if (!attacker.Owner.Spells.ContainsKey(13000)) return;
- attack.Damage = 1;
- MsgMagicEffect suse = new MsgMagicEffect(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 MsgMapItem
- var map = Kernel.Maps[attacker.MapID];
- MsgMapItem MsgMapItem = new MsgMapItem(true);
- MsgMapItem.UID = MsgMapItem.FloorUID.Next;
- while (map.Npcs.ContainsKey(MsgMapItem.UID))
- MsgMapItem.UID = MsgMapItem.FloorUID.Next;
- MsgMapItem.ItemID = MsgMapItem.PeaceofStomper;
- MsgMapItem.X = lastattacked.X;
- MsgMapItem.Y = lastattacked.Y;
- MsgMapItem.X2 = attacker.X;
- MsgMapItem.Y2 = attacker.Y;
- MsgMapItem.Type = MsgMapItem.Effect;
- MsgMapItem.mColor = 14;
- MsgMapItem.OwnerUID = attacker.UID;
- MsgMapItem.OwnerGuildUID = attacker.GuildID;
- MsgMapItem.FlowerType = 3;
- MsgMapItem.Unknown37 = 1;
- MsgMapItem.MapID = map.ID;
- MsgMapItem.Attack = attack;
- MsgMapItem.OnFloor = Time32.Now;
- MsgMapItem.Owner = attacker.Owner;
- map.AddFloorItem(MsgMapItem);
- attacker.Owner.SendScreenSpawn(MsgMapItem, true);
- #endregion
- }
- #endregion
- return;
- }
- #endregion
- else if (attacker.IsStomper1())
- {
- #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);
- MsgMagicEffect suse = new MsgMagicEffect(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.Player || _obj.MapObjType == MapObjectType.Monster)
- {
- if (_obj == null) continue;
- attacked = _obj as Player;
- if (attacked == null) continue;
- if (!CanAttack(attacker, attacked, null, attack.InteractType == MsgInteract.Melee)) continue;
- if (sector.IsInFan(attacked.X, attacked.Y))
- {
- if (CanAttack(attacker, attacked, spell, attack.InteractType == MsgInteract.Melee))
- {
- attack.Effect = MsgInteract.InteractEffects.None;
- uint damages = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack) / 4;
- damages = (uint)(damages * .5);
- attack.Damage = damages / 2;
- suse.Effect = attack.Effect;
- ReceiveAttack(attacker, attacked, attack,ref damages, spell);
- suse.AddTarget(attacked.UID, damages, attack);
- }
- }
- }
- }
- }
- }
- #endregion
- #region Circle
- if (attack.SpellID == 13050)
- {
- var spell = Database.SpellTable.GetSpell(13050, attacker.Owner);
- MsgMagicEffect suse = new MsgMagicEffect(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.Player || _obj.MapObjType == MapObjectType.Monster)
- {
- if (_obj == null)
- continue;
- attacked = _obj as Player;
- if (attacked == null) continue;
- if (!CanAttack(attacker, attacked, null, attack.InteractType == MsgInteract.Melee)) continue;
- if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 5) continue;
- attack.Effect = MsgInteract.InteractEffects.None;
- uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack) / 4;
- damage = (uint)(damage * .5);
- attack.Damage = damage / 2;
- ReceiveAttack(attacker, attacked, attack,ref damage, spell);
- suse.AddTarget(attacked.UID, damage, attack);
- }
- }
- attacker.Owner.SendScreen(suse, true);
- return;
- }
- #endregion
- #region Rectangle
- if (attack.SpellID == 13060)
- {
- var spell = Database.SpellTable.GetSpell(13060, attacker.Owner);
- MsgMagicEffect suse = new MsgMagicEffect(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 = damage2 / 2;
- ReceiveAttack(attacker, attacked, attack,ref damage2, spell);
- suse.AddTarget(attacked.UID, damage2, attack);
- foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
- {
- if (_obj.MapObjType == MapObjectType.Player || _obj.MapObjType == MapObjectType.Monster)
- {
- if (_obj == null) continue;
- attacked = _obj as Player;
- if (attacked == null) continue;
- if (!CanAttack(attacker, attacked, null, attack.InteractType == MsgInteract.Melee)) continue;
- if (sector.IsInFan(attacked.X, attacked.Y))
- {
- if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 7) continue;
- attack.Effect = MsgInteract.InteractEffects.None;
- uint damage43 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack) / 4;
- damage43 = (uint)(damage43 * .5);
- attack.Damage = damage43 / 2;
- ReceiveAttack(attacker, attacked, attack, ref damage43, spell);
- suse.AddTarget(attacked.UID, damage43, attack);
- }
- }
- }
- attacker.Owner.SendScreen(suse, true);
- return;
- }
- #endregion
- }
- #endregion
- }
- #endregion
- y Acomodaran el Daño a su Gusto, los fallos que tengan relacionados a MsgMapItem lo cambian a FloorItem y asi sucesivamente.
- Ahora mas Abajo if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= range || pass) Pegan lo Mismo que arriba y reparan etc, si les aparece error de que la Variable denominada damage esta siendo usada o demas mamadas buscan el uint damage de las skills y lo cambian a uint damage456465465 o el numero o ponen lo que quieran.
- ==================================================0
- Bueno, otra cosa en EntityTable.cs en la parte de CreateEntity en la parte de switch class donde dice ejemplo windwalker = 8; o como sea que lo tengan recomiendo que los acomoden junto a las Variables de Stomper1 IsChase1 2 3 IsStomper1 2 3 el Numero Correcto en la parte de this.Windwalker ejemplo esta:
- public bool IsChaser()//Rango
- {
- if (PlayerFlag == Game.PlayerFlag.Player)
- {
- if (this.Class >= 160 && this.Class <= 165)
- if (this.Windwalker == 0)//Esta en 0 por que en mi Source 2D Throne el Windwalker 0 es Rango y Windwalker 8 es Meleè miren el ejemplo del Melee
- return true;
- }
- return false;
- }
- public bool IsStomper1()//Melee
- {
- if (PlayerFlag == Game.PlayerFlag.Player)
- {
- var weapons = Owner.Weapons;
- if (weapons.Item1 != null)
- if (weapons.Item1.ID / 1000 == 626)
- if (this.Class >= 160 && this.Class <= 165)
- if (this.Windwalker == 8)// ----> Esta en 8 .
- return true;
- }
- return false;
- }
- Verifiquen que los tienen identicos en sus Sourcer`s la creacion de Winds (Recomiendo que prueben manualmente cuando se crean un aire melee o rango y miren en la base de datos cual numero llevan cada 1 ) y despues acomodar las Variables para que salgan la Skills sin Problema alguno!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement