Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 18:25

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


can i get some Conquer_v2 Help.

Discussion on can i get some Conquer_v2 Help. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
can i get some Conquer_v2 Help.

ok i am trying to code the (accuracy system, miss system) what ever you want to call it how would i go about adding this system to the Source.
and what data to you use to calculate your chance of hitting/missing the target?



taylor2846 is offline  
Old 02/01/2011, 07:28   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,347
Depends how you want to code it.

Personally I'm working in other stats to the calculation so I do something like...

double Chancetohit = 90;
Chancetohit -= Attacked.Dodge /2;
if(Attacker.ActiveEffects.ContainsKey(Superman))
Chancetohit = 99;
elseif(Attacker.ActiveEffects.ContainsKey(Cyclone) )
Chancetohit = 99;
Chancetohit -= Attacked.Agi / 10;
Chanceothit += Attacker.agi / 10;

return ChanceSuccess(Chancetohit);


Then in your attack code where you are targeting a player run a accuracy check. if it fails then do not continue with attack code.


personally I added in agi cause it gives people who don't just stack all points in vit a bit of a benefit yet not a great one. Say a ninja has 100 more agi than me with my lowly blade... That gives them an extra 10 percent chance to melee me and a 10 percent chance to dodge my melees (not counting wep skills here). To me I'd say that's useful seeing as they are losing out on a thousand or more hp.


pro4never is offline  
Thanks
1 User
Old 02/01/2011, 10:55   #3
 
elite*gold: 0
Join Date: Apr 2009
Posts: 754
Received Thanks: 433
i maked that one:

Code:
        #region Boolean's
        public static bool Miss(int Percent)
        {
            if (Percent >= 100)
                return false;

            return Game.Calculations.ChanceSuccess(Percent, 100);
        }

        public static bool Miss(Entity Attacker, Entity Attacked)
        {
            if (Attacked.EntityFlag == EntityFlag.Player)
            {
                if (Attacked.ClientStats.Dodge > 0)
                {
                    Random Rand = new Random();
                    int Dodge = Attacked.ClientStats.Dodge;
                    int HitRate = (Attacker.Agility + Attacker.ClientStats.Agility);

                    if (Attacker.Buffers.Contains(Enums.SkillIDs.Accuracy))
                        HitRate = (int)(HitRate * Attacker.Buffers.Get(Enums.SkillIDs.Accuracy).Value);
                    if (Attacker.Buffers.Contains(Enums.SkillIDs.StarOfAccuracy))
                        HitRate = (int)(HitRate * Attacker.Buffers.Get(Enums.SkillIDs.StarOfAccuracy).Value);
                    if (Attacked.Buffers.Contains(Enums.SkillIDs.Dodge))
                        Dodge = (int)(Dodge * Attacked.Buffers.Get(Enums.SkillIDs.Dodge).Value);

                    return Calc_HitChance(HitRate, Dodge) < Rand.Next(100);
                }
            }

            return false;
        }
        #endregion
        #region Calculation's
        public static int Calc_HitChance(int hitrate, int dodge)
        {
            Random Rand = new Random();
            return Rand.Next(hitrate, 100 + hitrate - (dodge));
        }
        #endregion
maybe help's you....
12tails is offline  
Thanks
1 User
Old 02/02/2011, 02:39   #4
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
thanks you guys.
can magic miss?

and i like that agi ideal. but i was thanking conquer already did that but now i see they did not lmao i guess that is why my rb trojan always got pked so easy because i used alot of agi thanking it would help me doge atks lmao.

is it possible to have 0 agi in conquer because if so i need to add a check before i / the agi because you will get errors if you / bye 0 if i am not mistaken?


taylor2846 is offline  
Old 02/02/2011, 10:29   #5
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,293
Received Thanks: 919
Quote:
Originally Posted by taylor2846 View Post
thanks you guys.
can magic miss?

and i like that agi ideal. but i was thanking conquer already did that but now i see they did not lmao i guess that is why my rb trojan always got pked so easy because i used alot of agi thanking it would help me doge atks lmao.

is it possible to have 0 agi in conquer because if so i need to add a check before i / the agi because you will get errors if you / bye 0 if i am not mistaken?
Certain magic can miss, for example the pure fire skill.
Kiyono is offline  
Old 02/03/2011, 01:03   #6
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
hay pro4never please take a look at my AccuracyCheck code and tell me if you no any ways to improve it.

its not 100% done i just kinda got the base of the code still need to add the if player have a Accuracy skill stuff
and what is the def between Accuracy(Xp Skill) and Accuracy(water tao skill)?
Code:
public static bool AccuracyCheck(IBaseEntity AttackerEntity, IBaseEntity OpponentEntity)
        {
            double ChanceToHit = 90;
            ChanceToHit -= OpponentEntity.Dodge / 2;
            if (AttackerEntity.EntityFlag == EntityFlag.Player)
            {
                GameClient Attacker = null;
                Attacker = AttackerEntity.Owner as GameClient;
                if ((Attacker.Entity.StatusFlag & StatusFlag.Superman) != StatusFlag.Superman)
                {
                    ChanceToHit = 99;
                }
                else if ((Attacker.Entity.StatusFlag & StatusFlag.Cyclone) != StatusFlag.Cyclone)
                {
                    ChanceToHit = 99;
                }
                ChanceToHit += Attacker.Stats.Agility / 10;
            }
            else if (AttackerEntity.EntityFlag == EntityFlag.Monster || AttackerEntity.EntityFlag == EntityFlag.Pet)
            {
                Monster Attacker = null;
                Attacker = AttackerEntity.Owner as Monster;
            }
            if (OpponentEntity.EntityFlag == EntityFlag.Player)
            {
                GameClient Opponent = null;
                Opponent = OpponentEntity.Owner as GameClient;
                ChanceToHit -= Opponent.Stats.Agility / 10;
            }
            if (Kernel.ChanceSuccess(ChanceToHit))
                return true;
            else
                return false;
        }
and the content of my ChanceSuccess is
Code:
return ((double)Random.Next(1, 1000000)) / 10000 >= 100 - Chance;
Thank you


taylor2846 is offline  
Reply



« [DeV]Project X (5360) | NPCDiaglog »

Similar Threads
[Guide]Conquer_v2
05/31/2014 - CO2 PServer Guides & Releases - 181 Replies
you need Microsoft Visual Studio 2008 if you do not have you will get errors. download Conquer Client 5127 you can find it -HERE- //Credits to FuriousFang All Major Clients post then patch it up to 5135. Then download the source
Conquer_V2 ini to MySql item Database Command
01/11/2012 - CO2 Private Server - 2 Replies
` i do not want to spam the from with stuff so i am posting a ? here. in item the database item data what is Weight, Unknown1, Unknown2, Unknown3, what is the purpose of them?
[Release]Conquer_V2 Webpage
03/15/2011 - CO2 PServer Guides & Releases - 38 Replies
This is my Conquer_V2 Website for InfamousNoone Formal Release Here is V1 just a simple register page Sample Picture http://i128.photobucket.com/albums/p174/taylor284 6/webpage.png Download Webpage From MediaFire
[Release]Conquer_V2 Skills
01/25/2011 - CO2 PServer Guides & Releases - 2 Replies
ok i am going to release skills here as i code them just started working on this today xD. make a new class file named Roar - 1040.cs in Attack Processor/Spells and replace the content of the that file you just created with using ConquerServer_v2.Client; using ConquerServer_v2.Packet_Structures;
[Help] on Conquer_V2
01/10/2011 - CO2 Private Server - 0 Replies
hay can you help me on Conquer_V2. i am trying to convert the source to using OpenSSL. and i need some help doing this. i already have the source working with the blowfishCFB. i am just wanting to to edit it to using OpenSSL for the fun of doing it and learn a little. so can someone help me with this.



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


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

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

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