Hi guys, If you have problem with Disguise Skill on your 5165 server, you may able to use this release. I hope my work may help a bit on your server.
some credits goes to glover.
here are some Screen shots:
here are the Steps:
1. Under Features folder create a new class with a name of CastEffect.cs (this class will make the effect viewable by all
players troughout the lifespan of the desguise effect)
2. paste this code to CastEffect.cs just below the { under namespace.
3.open your Character.cs and search for..
4. and change the entire method with this code
5. above public void AddBuff(Buff B) , add this codes
6. look for
7. and change the entire method with this codes..
8. search for
9. above it add this code
10. Open PacketHandler.cs and search for
11. Below it add this code
12. Open Database.cs and search for
13. and add the code below, in between SkillForLearning.Add((byte)1, Trojan);
14. search again for
15. and add the code below, in between SkillForLearning.Add((byte)13, WaterTaoist);
16. Open Mob.cs and search for
17. just below } add this region
you may change the value in color red to change the drop rate of NightDevil scroll..
Test Run Note: just like in real CO.
some credits goes to glover.
here are some Screen shots:
here are the Steps:
1. Under Features folder create a new class with a name of CastEffect.cs (this class will make the effect viewable by all
players troughout the lifespan of the desguise effect)
2. paste this code to CastEffect.cs just below the { under namespace.
Code:
class CastEffect
{
public int countdown;
public System.Threading.Timer timer;
public Buff B;
public Character C;
public ulong transValue;
public void executeEffect()
{
System.Threading.TimerCallback cb = new System.Threading.TimerCallback(ProcessTimerEvent);
timer = new System.Threading.Timer(cb, B, 0, 100);
}
private void ProcessTimerEvent(object obj)
{
--countdown;
Game.Buff B = (Game.Buff)obj;
if (countdown == 0)
{
C.MyClient.MyChar.RemoveBuff(B);
return;
}
if (obj is Game.Buff)
{
SendEffect(Packets.Status(C.EntityID, Status.Mesh, transValue), countdown);
}
}
public void SendEffect(COPacket Data, int c)
{
Game.Character[] Chars = new Game.Character[Game.World.H_Chars.Count];
Game.World.H_Chars.Values.CopyTo(Chars, 0);
if (c > 0)
foreach (Game.Character C in Chars)
if (MyMath.PointDistance(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y) <= 20)
C.MyClient.AddSend(Data);
Chars = null;
}
}
Code:
public void AddBuff(Buff B)
Code:
public void AddBuff(Buff B)
{
Buff ExBuff = BuffOf(B.Eff);
if (ExBuff.Eff == B.Eff)
Buffs.Remove(ExBuff);
if (B.Eff == SkillsClass.ExtraEffect.Transform)
{
switch (B.Transform)
{
case 2000:
case 2001:
case 2002:
case 2003:
case 2010:
case 2011:
case 2012:
case 2013:
transValue=(ulong)2141000000;
MyClient.AddSend(Packets.Status(EntityID, Status.Mesh,transValue));
break;
case 2005:
case 2006:
case 2007:
case 2008:
case 2009:
case 2040:
case 2041:
case 2042:
case 2043:
transValue=(ulong)2131000000;
MyClient.AddSend(Packets.Status(EntityID, Status.Mesh,transValue));
break;
case 2020:
case 2021:
case 2022:
case 2023:
case 2024:
transValue = (ulong)2071000000;
MyClient.AddSend(Packets.Status(EntityID, Status.Mesh, transValue));
break;
case 2030:
case 2031:
case 2032:
case 2033:
case 2034:
transValue = (ulong)2171000000;
MyClient.AddSend(Packets.Status(EntityID, Status.Mesh, transValue));
break;
default:
transValue=(ulong)(B.Transform * 10000000 + Avatar * 10000 + Mesh);
MyClient.AddSend(Packets.Status(EntityID, Status.Mesh, transValue));
break;
}
transEffect = new CastEffect();
transEffect.countdown = B.Lasts*10;
transEffect.B = B;
transEffect.C = this;
transEffect.transValue = transValue;
transEffect.executeEffect();
}
Buffs.Add(B);
StatEff.Add(B.StEff);
}
Code:
CastEffect transEffect;
static ulong transValue;
Code:
public void RemoveBuff(Buff B)
Code:
public void RemoveBuff(Buff B)
{
Buffs.Remove(B);
StatEff.Remove(B.StEff);
if (B.Eff == SkillsClass.ExtraEffect.Transform)
{
transEffect.timer.Dispose();
transEffect.countdown = 0;
Body = Body;
Hair = Hair;
Equips.Send(MyClient, false);
}
}
Code:
case 725018:
Code:
case 725016:
{
if (Level >= 80)
{
NewSkill(new Skill() { ID = 1360 });
RemoveItem(I);
}
else
{
MyClient.LocalMessage(2005, "Cannot use NightDevil at your Level!");
}
break;
}
Code:
switch (Data[16])
{
Code:
case 118:
{
Game.Buff B = GC.MyChar.BuffOf(CoPinoy.Features.SkillsClass.ExtraEffect.Transform);
GC.MyChar.RemoveBuff(B);
break;
}
Code:
Trojan.Add(new SkillLearn() { ID = (ushort)1190, LevelReq = (byte)40 });
Code:
Trojan.Add(new SkillLearn() { ID = (ushort)1270, LevelReq = (byte)41 });
Code:
WaterTaoist.Add(new SkillLearn() { ID = (ushort)5001, LevelReq = (byte)70 });
Code:
WaterTaoist.Add(new SkillLearn() { ID = (ushort)1280, LevelReq = (byte)50 });
Code:
else if (MyMath.ChanceSuccess(DropRates.Gem))
{
DI2.Info.ID = (uint)(700001 + Rnd.Next(8) * 10);
if (MyMath.ChanceSuccess(15)) DI2.Info.ID = 700121;
if (MyMath.ChanceSuccess(15)) DI2.Info.ID = 700101;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
Code:
#region NightDevil
else if (MyMath.ChanceSuccess([COLOR="Red"]0.5[/COLOR]) && Name == "HeavyGhostL23")
{
DI2.Info.ID = (uint)(725016);
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
else if (MyMath.ChanceSuccess([COLOR="Red"]0.5[/COLOR]) && Name == "Poltergeist")
{
DI2.Info.ID = (uint)(725016);
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
#endregion
Test Run Note: just like in real CO.
That's all! godspeed everyone!Quote:
* to attain NightDevil you need hunt the NightDevil Scroll from HeavyGhostL23 and Poltergeist. (for everyone)
* to attain Divine Hare buy it from Pharmacys in the Market (for firetao only)
* Water Tao can learn WaterElf from TaoistGod
* Trojan can learn Robot/Golem from TrojanGod