Register for your free account! | Forgot your password?

You last visited: Today at 00:49

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

Advertisement



Repair Calculation

Discussion on Repair Calculation within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 912
Repair Calculation

Here is the correct gold calculation for repairing an item:

Code:
                int nRecoverDurability = Math.Max(0, Item.Stats.Durability - Item.CurDurability);
                if (nRecoverDurability == 0)
                    return;

                byte Quality = ItemManipulation.GetQuality((int)Item.Stats.ID);
                double QualityMultipier = 0;

                switch (Quality)
                {
                    case 9: QualityMultipier = 1.125; break;
                    case 8: QualityMultipier = 0.975; break;
                    case 7: QualityMultipier = 0.9; break;
                    case 6: QualityMultipier = 0.825; break;
                    default: QualityMultipier = 0.75; break;
                }

                int nRepairCost = 0;
                if (Item.Item.ShopBuyPrice > 0)
                    nRepairCost = (int)Math.Ceiling((Item.Stats.ShopBuyPrice * nRecoverDurability / Item.Stats.Durability) * QualityMultipier);

                nRepairCost = Math.Max(1, nRepairCost);
kinshi88 is offline  
Thanks
4 Users
Reply


Similar Threads Similar Threads
Exp calculation?
01/09/2011 - CO2 Programming - 3 Replies
Hey, Does anyone has a decent exp calculation, or show me atleast how it is calculated? I really have no idea when it comes to conquer. Thanks in advance, ImmuneOne.
Damage Calculation
08/02/2010 - CO2 PServer Guides & Releases - 12 Replies
Okay. I haven't found any physical damage calculations out there that involves BP. Maybe nobody wants it or what but Ive been lurking these forums for a while looking for ideas for my server. Anyway, here's my ROUGH (+- 1.5k) damage compared to the real co. If anyone got any ideas on how to improve my equation by all means please post. I use 5165 but the gist of it should be the same as other servers. also, thanks to CoEmu v2, I used some of the damage calculation from there namely the...
5165 Damage Calculation
03/07/2010 - CO2 Private Server - 7 Replies
Fixes around the forum are useless and no where near good enough if you want to make a server public. Someone should go ahead and fix it then release their code. Get some thanks and make everyone happy. I wont because I can't, I would if i could. ^^
AL Damage Calculation
07/15/2007 - Archlord - 0 Replies
Does anyone know how AL computes damage? I have been playing with combinations of weapons and stones and can't find the magic equation. Here is what I have been doing: Ab = Base Attack (without weapon) Aw = Attack with Weapon Ae = Attack bonus due to Elemental Stones (e.g. 4 level 3 stones is 5+5+1+5+1+5+1 = 23) Sb = Skill bonus for Basic Attack (%) Se = Skill bonus for Elemental Attack (%) a = attenuation factor based on mob level and player level b = boolean for elemental damage...
Disconnect bei route calculation
01/16/2006 - Ragnarok Online - 1 Replies
also wenn ich Xkore aufmach einlogg etc dann auf der map stehe, steht im Opencore calculating map... danach bekomm ich sofort nen disconnect from server. also weder das ich Irgendwas mache oder irgendwer bei mir ist. Habe versucht die autorestarts umzustellen aber das problem tritt immernoch auf. mfg. T2B btw habe die Such funkt. benutzt nur leider nix gefunden



All times are GMT +2. The time now is 00:49.


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.