Quote:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace NewestCOServer.Features
{
class GemEffect
{
public static void GemEffects(Game.Item.Gem Gem, Main.GameClient MyClient)
{
switch (Gem)
{
#region GemEffects
case Game.Item.Gem.SuperDragonGem:
{
if (MyMath.ChanceSuccess(1.0)) { MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "goldendragon")); }
break;
}
case Game.Item.Gem.SuperPhoenixGem:
{
if (MyMath.ChanceSuccess(1.0)) { MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "phoenix")); }
break;
}
case Game.Item.Gem.SuperRainbowGem:
{
if (MyMath.ChanceSuccess(1.0)) { MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "rainbow")); }
break;
}
case Game.Item.Gem.SuperMoonGem:
{
if (MyMath.ChanceSuccess(1.0)) { MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "moon")); }
break;
}
case Game.Item.Gem.SuperFuryGem:
{
if (MyMath.ChanceSuccess(1.0)) { MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "fastflash")); }
break;
}
case Game.Item.Gem.SuperKylinGem:
{
if (MyMath.ChanceSuccess(1.0)) { MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "goldenkylin")); }
break;
}
#endregion
}
}
}
}
Second go to Attack.cs in PacketHandling and search for
Code:
and paste bellowQuote:
else if (AttackType == 44)
{
ushort SkillId = 6003;
ushort x = GC.MyChar.Loc.X;
ushort y = GC.MyChar.Loc.Y;
uint Target = GC.MyChar.EntityID;
Code:
and search forQuote:
for (byte i = 1; i < 8; i++)
{
Game.Item I = GC.MyChar.Equips.Get(i);
if (I.ID != 0 && I.Soc1 != Game.Item.Gem.EmptySocket)
{
Features.GemEffect.GemEffects(I.Soc1, GC);
}
}
Code:
bellow code, pasteQuote:
else if (AttackType == 24)
{
ushort SkillId;
long x;
long y;
uint Target;
#region GetSkillID
SkillId = Convert.ToUInt16(((long)Data[24] & 0xFF) | (((long)Data[25] & 0xFF) << 8));
SkillId ^= (ushort)0x915d;
SkillId ^= (ushort)GC.MyChar.EntityID;
SkillId = (ushort)(SkillId << 0x3 | SkillId >> 0xd);
SkillId -= 0xeb42;
#endregion
#region GetCoords
x = (Data[16] & 0xFF) | ((Data[17] & 0xFF) << 8);
x = x ^ (uint)(GC.MyChar.EntityID & 0xffff) ^ 0x2ed6;
x = ((x << 1) | ((x & 0x8000) >> 15)) & 0xffff;
x |= 0xffff0000;
x -= 0xffff22ee;
y = (Data[18] & 0xFF) | ((Data[19] & 0xFF) << 8);
y = y ^ (uint)(GC.MyChar.EntityID & 0xffff) ^ 0xb99b;
y = ((y << 5) | ((y & 0xF800) >> 11)) & 0xffff;
y |= 0xffff0000;
y -= 0xffff8922;
#endregion
#region GetTarget
Target = ((uint)Data[12] & 0xFF) | (((uint)Data[13] & 0xFF) << 8) | (((uint)Data[14] & 0xFF) << 16) | (((uint)Data[15] & 0xFF) << 24);
Target = ((((Target & 0xffffe000) >> 13) | ((Target & 0x1fff) << 19)) ^ 0x5F2D2463 ^ GC.MyChar.EntityID) - 0x746F4AE6;
#endregion
Code:
Quote:
for (byte i = 1; i < 8; i++)
{
Game.Item I = GC.MyChar.Equips.Get(i);
if (I.ID != 0 && I.Soc1 != Game.Item.Gem.EmptySocket)
{
Features.GemEffect.GemEffects(I.Soc1, GC);
}
}
Credits Go To felipeboladao !