Register for your free account! | Forgot your password?

Go Back   elitepvpers > Conquer Online 2 > CO2 PServer - Discussions / Questions
You last visited: Today at 19:14

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


hello i have 5165 reflect problem

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2008
Posts: 49
Received Thanks: 1
hello i have 5165 reflect problem

hello again :
here is my problem ,when i attack other character the number of damage = - HP
, and the right way the reflect skill should work have max -HP like 1700 if attack up or down , so i hope any one get my point i mean and thanks



$-Tiger-$ is offline  
Old 11/27/2011, 01:47   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
There's lots of handy math functions built into C#... One you're thinking of would be something like...


target.Health -= Math.Min(1700, damage);

That will take whichever one is lower.

Personally I'd do something more like...

damage = Math.Min(1700, damage);
target.Health -= damage;

That way the actual attack packet will cap out at 1700 also rather then showing crazy high numbers that aren't actually being dealt


pro4never is offline  
Old 11/27/2011, 10:59   #3
 
elite*gold: 0
Join Date: Mar 2008
Posts: 49
Received Thanks: 1
thanks for your reply but did you mean make some thing like that

Code:
  public void GetReflect(uint Damage, AttackType AT)
        {
            if (Damage < CurHP)
            {
                Damage = Math.Min(1700, Damage);
                 Target.Health -= Damage;
               

                World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
            }


thanks pro4never i am done it now the damage number is 1700 but now the problem in ,when my attack anther character like noob no have stuff my attack number will be like 43368 and my hp= 30000 and when reflect come i dead 1 hit then i conclusion that "when my attack get number high than my hp i died 1 hit not just -hp 1700.i hope u get my point again thanks again
$-Tiger-$ is offline  
Old 11/27/2011, 20:14   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
You shouldn't need the damage < cur hp cause that only causes the code to run when it will NOT kill the user.

Reflect has a damage cap REGARDLESS of if it kills or not.


pro4never is offline  
Old 11/28/2011, 07:01   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 755
The damage cap is 2000, isn't it?
BaussHacker is offline  
Old 11/28/2011, 11:17   #6
 
elite*gold: 0
Join Date: Mar 2008
Posts: 49
Received Thanks: 1
Quote:
Originally Posted by pro4never View Post
You shouldn't need the damage < cur hp cause that only causes the code to run when it will NOT kill the user.

Reflect has a damage cap REGARDLESS of if it kills or not.
u mean to make the code like that
Code:
 public void GetReflect(uint Damage, AttackType AT)
        {
            {
                 Damage = Math.Min(1700, Damage);
                    CurHP -= (ushort)Damage;

                World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
            }
but when i make it like that the characters die 1 hit from ref

Quote:
Originally Posted by BaussHacker View Post
The damage cap is 2000, isn't it?
no i just make it 1700
$-Tiger-$ is offline  
Old 11/29/2011, 02:58   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
Quote:
Originally Posted by $-Tiger-$ View Post
u mean to make the code like that
Code:
 public void GetReflect(uint Damage, AttackType AT)
        {
            {
                 Damage = Math.Min(1700, Damage);
                    CurHP -= (ushort)Damage;

                World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
            }
but when i make it like that the characters die 1 hit from ref



no i just make it 1700

Breakpoint and see what the values are lol.

Sounds to me like it's just an issue of your source not handling reflect correctly.

For example it would call your GetReflect code but would then still continue on and run another GetDamage type method which would be of course using the initial damage that's being passed into the method.
pro4never is offline  
Old 11/29/2011, 19:42   #8
 
elite*gold: 0
Join Date: Mar 2008
Posts: 49
Received Thanks: 1
so can you tell me how to fix it or what part of reflect code is wrong to try to fix it thanks very much pro4never .


$-Tiger-$ is offline  
Reply



« can any one tell me how to change this name [Conquer2.0] | VPS under attack »

Similar Threads
[HELP] 5165 Problem
08/25/2012 - CO2 PServer - Discussions / Questions - 6 Replies
Ok, evertime a make a server for someone, i do everything correctly, but when they try to login it says loggin into account, and just sits there forever, any ideas how to fix this problem? #edit I know it ain't a login freeze cause I have reset it millions of times.
[Release] Reflect Code (5165 LOTF)
04/18/2012 - CO2 PServer Guides & Releases - 46 Replies
Maybe isn't very right but it works.... at Character.cs more ore less at line 1711 add this: public bool CanReflect = false; Now you have to make a check for the CanReflect become true.... go to LoadCharacter void at database.cs and add this after the load for skills:
[Help] Reflect on 5165
12/19/2009 - CO2 PServer - Discussions / Questions - 1 Replies
anyone know how to add reflect? i found reflect on skilladder.cs Reflect = 3060 and i edit the 2nd rb code found in character.cs with this code.. if (Reborns == 2) {
[HELP] 5165 Problem
12/07/2009 - CO2 PServer - Discussions / Questions - 7 Replies
Ok, I have filled out config and everything, but then when I run "NewestCOServer", this happens: http://img18.imageshack.us/img18/4520/problemxq.jpg What did I do wrong?



All times are GMT +1. The time now is 19:14.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.