Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 02:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[FullRelease] 100% working Disguise Skills (5165)

Discussion on [FullRelease] 100% working Disguise Skills (5165) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: May 2006
Posts: 127
Received Thanks: 91
[FullRelease] 100% working Disguise Skills (5165)

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.
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;
        }
    }
3.open your Character.cs and search for..
Code:
public void AddBuff(Buff B)
4. and change the entire method with this code
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);
        }
5. above public void AddBuff(Buff B) , add this codes

Code:
        CastEffect transEffect;
        static ulong transValue;
6. look for
Code:
        public void RemoveBuff(Buff B)
7. and change the entire method with this codes..
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);
            }
        }
8. search for
Code:
case 725018:
9. above it add this code
Code:
  case 725016:
  {
   if (Level >= 80)
    {
      NewSkill(new Skill() { ID = 1360 });
      RemoveItem(I);
    }
    else
    {
     MyClient.LocalMessage(2005, "Cannot use NightDevil at your Level!");
    }
   break;
 }
10. Open PacketHandler.cs and search for
Code:
 switch (Data[16])
 {
11. Below it add this code
Code:
case 118:
        {
            Game.Buff B = GC.MyChar.BuffOf(CoPinoy.Features.SkillsClass.ExtraEffect.Transform);
            GC.MyChar.RemoveBuff(B);
            break;
       }
12. Open Database.cs and search for
Code:
    Trojan.Add(new SkillLearn() { ID = (ushort)1190, LevelReq = (byte)40 });
13. and add the code below, in between SkillForLearning.Add((byte)1, Trojan);
Code:
Trojan.Add(new SkillLearn() { ID = (ushort)1270, LevelReq = (byte)41 });
14. search again for
Code:
WaterTaoist.Add(new SkillLearn() { ID = (ushort)5001, LevelReq = (byte)70 });
15. and add the code below, in between SkillForLearning.Add((byte)13, WaterTaoist);
Code:
WaterTaoist.Add(new SkillLearn() { ID = (ushort)1280, LevelReq = (byte)50 });
16. Open Mob.cs and search for
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;
     }
17. just below } add this region
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
you may change the value in color red to change the drop rate of NightDevil scroll..

Test Run Note: just like in real CO.
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
That's all! godspeed everyone!
kamote is offline  
Thanks
23 Users
Old 03/13/2010, 06:43   #2
 
elite*gold: 0
Join Date: May 2008
Posts: 9
Received Thanks: 0
Just so you know, It's only Water Taos who can obtain divine hare and actually learn it.
In 5165 source

1190- Is Spirit Healing...
5001- Is Speed Lightning...

Neither of which are disguises. Just thought that might be a good note for you.
mynoob1 is offline  
Old 03/13/2010, 07:06   #3
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Nice release,
-Shunsui- is offline  
Old 03/13/2010, 08:36   #4
 
xI NiNJA DuCKey's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 51
Received Thanks: 17
Nice Release.
xI NiNJA DuCKey is offline  
Old 03/13/2010, 08:53   #5
 
NukingFuts's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 480
Received Thanks: 111
nice work bro
NukingFuts is offline  
Old 03/13/2010, 10:41   #6
 
salem rey's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
wow thankssssss...
salem rey is offline  
Old 03/13/2010, 11:13   #7
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
nice one
~Yuki~ is offline  
Old 03/13/2010, 11:16   #8
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Very, very neat

+Thanks
Paralyzer[GM] is offline  
Old 03/13/2010, 12:57   #9
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
nice release bro. keep up the good work.
Q) How do i change it to work on watertaos instead of fire taos?

**EDIT**
no worries i figured it out. i wasnt looking at the code properly lol
.Beatz is offline  
Old 03/13/2010, 15:10   #10
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
great release bro keep it up

but i have problem in this code give error in red

Quote:
CastEffect transEffect;
ramix is offline  
Thanks
1 User
Old 03/13/2010, 16:05   #11
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by ramix View Post
great release bro keep it up

but i have problem in this code give error in red
Make it so it uses
Code:
NewestCOServer.Game.Extra
instead of the normal one you have....i.e. click on it and a lil red line will appear at da end of da word, go over it with your mouse carefully den a lil box will show...click it and click the first option... hope I helped
killersub is offline  
Old 03/14/2010, 03:06   #12
 
gulpi_de_gulat's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 71
Received Thanks: 40
anak ng Kamote Oo. ang galing, thankz bro
gulpi_de_gulat is offline  
Old 03/14/2010, 15:08   #13
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Very great realease you got karma + from me.
glover is offline  
Old 03/14/2010, 19:19   #14
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
awesome release. =]

i'm just trying to figure out how to make it to that it sets your max hp to 4000 and curhp to 4000 but i'm having no luck.
-NewDawn- is offline  
Old 03/14/2010, 22:48   #15
 
elite*gold: 0
Join Date: Mar 2010
Posts: 6
Received Thanks: 5
Can someone help me fix these errors?




Code:
Game.Buff B = GC.MyChar.BuffOf([COLOR="Red"]CoPinoy[/COLOR].Features.SkillsClass.ExtraEffect.Transform);
Code:
SendEffect(Packets.[COLOR="Red"]Status[/COLOR](C.EntityID, Status.Mesh, transValue), countdown);
xDestroy is offline  
Closed Thread


Similar Threads Similar Threads
[RELEASE]Disguise Amulet (5165)
02/18/2011 - CO2 PServer Guides & Releases - 23 Replies
Hello again, I have not released anything in a while so I thought I would release the Disguise Amulet ok so first goto Character.cs and search "#region NinjaAmulet" and right under the #endregion add this #region DisguiseAmulet case 723724: { Random R = new Random(); int Nr = R.Next(1, 10); if (Nr == 1)
Disguise Skills Help
09/07/2010 - CO2 Private Server - 0 Replies
Hey guys...I used this guide http://www.elitepvpers.com/forum/co2-pserver-guides -releases/488668-fullrelease-100-working-disguise- skills-5165-a.html to make the disguises work...I realized that it crashes the server in some cases...I tried to fix it and I kind of made it a little better but not completely and by this I mean there are still times when it crashes the server... Now I am asking if anybody got a fixed disguise code that I may use or if anybody is willing to help me solve this...



All times are GMT +2. The time now is 02:25.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.