|
You last visited: Today at 13:48
Advertisement
[HELP] Conquer-Sx v8.0 problem.
Discussion on [HELP] Conquer-Sx v8.0 problem. within the CO2 Private Server forum part of the Conquer Online 2 category.
03/29/2011, 20:38
|
#1
|
elite*gold: 0
Join Date: Aug 2010
Posts: 64
Received Thanks: 2
|
[HELP] Conquer-Sx v8.0 problem.
Hello guys, I took an Conquer-Sx client v8.0 whch i think it's the last one and edited and edited and solved almost all the problems.
1 more error appears that I can't solve because i hadn't been coding in sql before and don't know how to solve it./
USED THE SEARCH FUNCTION ON E-PVP and I couldn't find a post with this problem.
So the problem it's the next :
FireTao full +12 givving 1 with nado to a Troj full +6
Archers 1 hitting everything ( monsters , people ) scatter and normal click.
If you could give me a direct link of solving the problem or helping me out with the exact information of this problem +k and Thanks to that person and probably some special prize if he/she wants to join my server.
|
|
|
03/29/2011, 20:50
|
#2
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
NewestCo is well known for having very poorly handled gear/attack calculations.
Questions:
-Does this happen only after you upgrade an item? (I know market upgrades caused this where stats would multiply)
-Try breakpointing the attack calculations to see where it goes wrong (most common issue I've seen like this is where they use an unsigned value and it essentially loops back around into a massive value)
-Try writing out the attack/defense of players involved in attacks to console to make sure they match/are close to what they should be.
-Try reading through how the source calculates archer/magic dmg and just double check everything there once you sort out the other issues.
No, there is not a simple 'copy and paste this code in this file' type solution. You will need to do some investigation/work
Best of luck,
P4N
Alternatively, you could search the forum more.. cause this has been discussed many, many times.
|
|
|
03/29/2011, 21:37
|
#3
|
elite*gold: 0
Join Date: Aug 2010
Posts: 64
Received Thanks: 2
|
@pro4never, no, it's not about the market upgrade , it's about the NewestCo
}
else if (AT == AttackType.Ranged)
{
Damage = (uint)((double)Damage * (((double)(110 - EqStats.Dodge) / 110))) + (Attacker.EqStats.FanAtack - EqStats.TowerDef);
if (EqStats.Dodge >= Damage)
Damage = 1;
else
Damage -= EqStats.Dodge;
Damage = Damage * 1 / 3;
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 180) + (Attacker.EqStats.FanAtack - EqStats.TowerDef);
if (EqStats.TowerMeleeDamageDecrease >= Damage)
Damage = 1;
else
Damage -= EqStats.TowerMeleeDamageDecrease;
}
else
{
Damage = (uint)((double)Damage * (((double)(100 - EqStats.MDef1) / 110)));
if (EqStats.MDef2 >= Damage)
Damage = 1;
else
Damage -= EqStats.MDef2;
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 110);
if (EqStats.FanMagicDamageIncrease >= Damage)
Damage = 1;
else
Damage -= EqStats.FanMagicDamageIncrease;
deleted the HeavenFan attack bonus thing but still same
|
|
|
03/29/2011, 21:39
|
#4
|
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 422
|
The source ain't stable all I can say.
|
|
|
03/29/2011, 21:42
|
#5
|
elite*gold: 0
Join Date: Aug 2010
Posts: 64
Received Thanks: 2
|
@alexalx
Yes your right but i can stable it and I did but only what remained was this thing because i'm learning things about sql very fast but this kind of things are on a superior level than mine
|
|
|
03/29/2011, 21:49
|
#6
|
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 422
|
@urbansstyle
Thats awesome if you stabled it,keep up the good work.
|
|
|
03/29/2011, 22:00
|
#7
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Place breakpoints and writelines all through there to determine where it's going wrong.
That's the simplest way to debug your own problems.
EG: say you breakpoint it and find that the min/max attack are all messed up and are reading as like 999999 then you know you need to be working on how gear is calculated vs how damage is calculated in an actual attack. Vice versa the more likely conclusion is that somewhere along the line you're running into invalid values (Such as someone having bless > 100 pct or something) and it's inverting the damage calculations.
NOTE: You should definitely be placing a cap on how much effective blessing a character can have... say 70 percent.
Notex2: looking at that code for 2 seconds... my *** it's messy and poorly done...
Personally I'd do calculations more along the lines of...
double dmg = new Random.Next(attacker.Minatk, attacker.Maxatk);
dmg *= .5;//or w/e you wanna use for base bow dmg reduction... I think it's like 50 pct reduction
dmg *= 1 + attacker.DragonGems;
if(attacker.HasEffect(Stigma))
dmg *= 1 * .3;//stigma level boost don't care to write it all out for you atm, just using generic examples
dmg *= 1 - attacked.Dodge;//make sure dodge is capped at say 80 percent when calculating gears
dmg *= 1 - attacked.TortiseGems;
dmg += attacker.FanAttack;
dmg -= attacked.TowerDefense;
if(dmg <1)
dmg = 1;
something that follows logic more like that would make sense... calculate things in the correct order, then check if < 1 then correct if needed... also be sure your dmg is a double or int (double is recommended seeing as you WILL be using decimals for your gems, saves casting it every time) so that it can handle negative values and will not loop around to a massive value if it goes < 0
If you don't understand why that's an issue try this..
ushort dmg = 1;
dmg -=100;
Console.WriteLine(dmg);
"65437"
This is because ushort/uint/ulong cannot hold a negative value (it's unsigned)
int dmg = 1;
dmg -=100;
Console.WriteLine(dmg);
"-99"
Etc.
Hope that clears up some things.
Personally though I'd just ditch the entire damage calculations and re-write it in a more logical/less error prone way.
|
|
|
03/30/2011, 09:14
|
#8
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
I love breakpoints. They are really good to use.
|
|
|
03/30/2011, 13:54
|
#9
|
elite*gold: 0
Join Date: Aug 2010
Posts: 64
Received Thanks: 2
|
wow guys, thx alexalx you too  and thx pro4never
If you got any more cool ideas , just post them here
|
|
|
 |
Similar Threads
|
Conquer.exe problem
08/02/2009 - CO2 Private Server - 4 Replies
I made my server using mysql and everything was going fine until I got to the part where I had to run my loader (the wake n bake file, im using powersourceCO client) and it says conquer.exe is not found. This works on vista but not on this computer of mine which is xp, so can anyone help?
|
Conquer.exe Problem?
10/02/2008 - Conquer Online 2 - 4 Replies
Hey, i for some odd reason, no matter what conquer.exe i put in there, no matter it is, i always get an error which causes conquer to close, it appear upon loading of conquer.
any suggestions that aren't re-installing?
|
conquer problem
11/12/2007 - Conquer Online 2 - 0 Replies
well i had installed venom an had cotobo up but it seems that the new conquer changes wont come up like chat boxes and my items type dats wont work for sum reason can sumone help me with this?
|
Conquer Problem
03/14/2007 - Conquer Online 2 - 4 Replies
Hello..
i visit this forum for like 2 years,played CO for like 4 years..
Now im trying to play Japan Conquer... and things are misplaced.
Would like some help,im tryin to replace files but seems like aint working (i really dont know what to replace tho)
So,help me please?
|
All times are GMT +1. The time now is 13:48.
|
|