Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 22:35

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

Advertisement



Packet Structure for Tempest Blade, Vortex and bomb for pirate

Discussion on Packet Structure for Tempest Blade, Vortex and bomb for pirate within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2007
Posts: 118
Received Thanks: 20
Packet Structure for Tempest Blade, Vortex and bomb for pirate

Anyone knows the packet structure of those skills being mentioned above. I mean the packet that send the character to certain coordinate once these skills will be activated.
xmen01235 is offline  
Old 04/01/2013, 12:28   #2
 
elite*gold: 0
Join Date: Jan 2007
Posts: 118
Received Thanks: 20
Figure it out already, it is just a matter of trigonometric formula.

DeltaY= CurrentY - TargetY
DeltaX= CurrentX- TargetX
Slope = DeltaY/DeltaX
Angle = Inv(tan(Slope))

DeltaYfinal=Maxdistance*sin(Angle)=CurrentY - FinalY
Therefore, FinalY=CurrentY - Maxdistance*sin(Angle)

DeltaXfinal=Maxdistance*cos(Angle)=CurrentX - FinalX
Therefore, FinalX=CurrentX - Maxdistance*cos(Angle)

For Tempest Blade Maxdistance = 10.

I will post the code later when I will reach home.

Code:
        
Public class coords
{
      private int _x;
      private int _y;
      
      public coords(){}
      ~coords(){}

      public int X
      {
            get{return this._x;}
            set{this._x=value;} 
      }
      public int Y
      {
            get{return this._y;}
            set{this._y=value;} 
      }

}

private static coords GetTempestBladeCoord(ushort X1, ushort X2, ushort Y1, ushort Y2, byte MaxDistance)
{
     coords tmp = new coords();
     double dx = X1 - X2, dy = Y1 - Y2;
     double angle;
            
     if (dx == 0) angle = 90;
     else if (dy == 0) angle = 0;
     else angle = Math.Atan(Math.Abs(dy) / Math.Abs(dx)) * 180 / Math.PI;
            
     double dxf = Math.Round(Math.Cos(angle * Math.PI / 180) * (double)MaxDistance);
     double dyf = Math.Round(Math.Sin(angle * Math.PI / 180) * (double)MaxDistance);

     if (X1 > X2) tmp.X = (int)((double)X1 - dxf);              
     else tmp.X = (int)((double)X1 + dxf);

     if (Y1 > Y2) tmp.Y = (int)((double)Y1 - dyf);
     else tmp.Y = (int)((double)Y1 + dyf);

     return tmp;
}
Application:
Code:
coords tmpcoord = GetTempestBladeCoord(myHero.CoordX, maction.AimX, myHero.CoordY, maction.AimY, 10);
xmen01235 is offline  
Reply


Similar Threads Similar Threads
anyone has a latest aimbot using fb/ss or tempest blade?
03/17/2013 - Conquer Online 2 - 1 Replies
Please make new aimbot to kill those assasins easy.
problem in Blade Tempest
07/22/2012 - CO2 Private Server - 3 Replies
hey guys , i have a problem in blade tempest skill when i do the skill http://store3.up-00.com/July12/k8M88920.jpg please help :D
[Pirate Help] Blade Tempest Skill Did not work !
06/11/2012 - CO2 Private Server - 17 Replies
when i was trying the pirate class i came across "Blade tempest" skill and i figuered that it did not work so i decided to go to the Handle.cs and found tha the "Blade Tempest" skill field is empty so what i really do to successfuly add Blade Tempest Skill to my source please i need help
[Request] Packet Structure for CharData Packet
05/16/2011 - Silkroad Online - 4 Replies
can someone tell me which structure the CharData packet has? i would really appreciate this, since im still noob in such things. its just too high for me/ too much information for my head. :handsdown: S->C(3013)...



All times are GMT +2. The time now is 22:35.


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.