Register for your free account! | Forgot your password?

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

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

Advertisement



5518 source how to add cp drop help

Discussion on 5518 source how to add cp drop help within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
lawanko's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 31
Received Thanks: 0
5518 source how to add cp drop help

can someone help me i still can't get it..no cp drop..i already edited the monster.cs and debugging done too..can someone post here the exact code with cp droprate configured already..(im doing this for 4day and still cant make it drop cp)

Code:
void DropItems(Entity killer)
       {
           if (killer is Player)
           {
               var role = (killer as Player).CP += CPVALUE;
               #region CP Award
               if (BaseMonster.Level > 3)
                   if (Level + 1 >= killer.Level && Calculations.Damage.PercentSuccess(100.0))
                   {
                       var cp = Kernel.RandomNext(1, 16);
                       if (cp > 15)
                           return;
                       role.SendMessage("SYSTEM", role.Name, "You received " + cp + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System);
                       role.CP += cp;
                   }
               #endregion
lawanko is offline  
Old 05/07/2012, 22:52   #2
 
CriticallyDev's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 87
Received Thanks: 4
Quote:
Originally Posted by lawanko View Post
can someone help me i still can't get it..no cp drop..i already edited the monster.cs and debugging done too..can someone post here the exact code with cp droprate configured already..(im doing this for 4day and still cant make it drop cp)

Code:
void DropItems(Entity killer)
       {
           if (killer is Player)
           {
               var role = (killer as Player).CP += CPVALUE;
               #region CP Award
               if (BaseMonster.Level > 3)
                   if (Level + 1 >= killer.Level && Calculations.Damage.PercentSuccess(100.0))
                   {
                       var cp = Kernel.RandomNext(1, 16);
                       if (cp > 15)
                           return;
                       role.SendMessage("SYSTEM", role.Name, "You received " + cp + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System);
                       role.CP += cp;
                   }
               #endregion
ConquerPoints are already coded on the source, they just drop depending on your character level and monsters you attack within the range of your level.
Why not just change the lines of code(which i wouldn't because it keeps the server stable as it already is) with no random chance?
CriticallyDev is offline  
Old 05/07/2012, 23:11   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
He already changed it...

What you posted shouldn't even compile from what I see.


var role = (killer as Player).CP += CPVALUE;

Role in this case is going to be the value of CP + CPVALUE and not refer to a player. I could be wrong but looks that way to me.

As said, change it back to how it was when you downloaded the source and change the calculation as you wish.

Code:
 if (BaseMonster.Level > 3)//Only drop from mobs over level 3. no pheasant dropping cp
                   if (Level + 1 >= killer.Level && Calculations.Damage.PercentSuccess(100.0))//Only drop if monster is higher level than player... If you want it 100 percent success... just remove the **** percentSuccess check rofl!
                   {
                       var cp = Kernel.RandomNext(1, 16);//Amount to award, random 1-15
                       if (cp > 15)
                           return;
                       role.SendMessage("SYSTEM", role.Name, "You received " + cp + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System);//Inform them they gained cp
                       role.CP += cp;//Add their cp
                   }
Commented it for you. Please, learn some basic C# so you understand what you're reading before you go and try to change it.
pro4never is offline  
Old 05/08/2012, 07:10   #4
 
lawanko's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 31
Received Thanks: 0
sorry guys =D and tnx for the help gonna try it now ty

like diz?still aint working...
Code:
  void DropItems(Entity killer)
       {
           if (killer is Player)
           {
               var role = (killer as Player).CP += CPVALUE;
               #region CP Award
               if (BaseMonster.Level > 3)    
                   if (Level + 1 >= killer.Level)    
                   {
                       var cp = Kernel.RandomNext(1, 16);
                       if (cp > 15)
                           return;
                       role.SendMessage("SYSTEM", role.Name, "You received " + cp + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System);
                       role.CP +=1000 cp;
                   }
               #endregion
lawanko is offline  
Old 05/10/2012, 04:58   #5
 
lawanko's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 31
Received Thanks: 0
i finally get it into work but how can i edit it to drop 1000 CP's or more plz post the guide tnx cuz i already edit it and it gives me ramdom drop...frustrating really =(
lawanko is offline  
Old 05/10/2012, 06:02   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
go read the most basic information about programming or C# and you'll understand...

You keep posting completely incorrect codes and doing things completely wrong.

Whatever you add to your cp is what is gained... everything inside the code you're editing is to do with generating a random amount of cp (or chance to gain cp) and then add it.

If you wanted to just give the cp regardless you'd remove what's there and simply say role.CP += 1000;. Again... boils down to basic understanding of coding. That's something you're going to need to learn if you hope to do anything with pserver sources.
pro4never is offline  
Reply


Similar Threads Similar Threads
[Question/Request] Alberto's 5518 source.
03/27/2012 - CO2 Private Server - 8 Replies
Hey guys....first of all I am a noob and I am going to learn C# and C++ in this summer so please just help me.... I started using Alberto's source and I just need help and I am not trying to take your work I am just trying to learn.... Some questions please tell me what to edit and where please.. 1.How do I allow equip tower and fan and drop? 2.How do I code Toxic Fog? 3.How do I code reborn? 4.How do I allow 140 items equip? (it keeps saying Unable or Unknown Use) 5.How do I code...
[Question]5518 Albetros Source
03/03/2012 - CO2 Private Server - 3 Replies
Hi guys! As some of you guys know, I started on creating a Conquer P-server recently.. using Albetros Source (Thanks to Pro4never):handsdown: But still I got lots to learn about creating a p-server :o I got lots of Question and I hope lots of good guys help me out with it :) I somehow manage to make it inside the game, but I encountered lots of things that arent working.:( Question: *How do I add Tower and Fan on Albetros Source and In-game? *How do I remove the the Quest In-game?
[Source Rel]Individuelles Drop System
02/18/2012 - Flyff Private Server - 23 Replies
Ich release hier mal jff yannik's ach so tolles drop system es müsste soweit vollständig sein einfach am ende #define __INDIVIDUAL_WEAPON machen in version common Es gibt den drops individuelle effekte
Quiz Show Source 5518+
10/17/2011 - CO2 Private Server - 4 Replies
how to fix this Quiz Show ? http://www.freeimagehosting.net/newuploads/a7eee. jpg http://www.freeimagehosting.net/newuploads/f8f91. jpg http://www.freeimagehosting.net/newuploads/80462. jpg
Can Anyone Help me to increase the money drop and CPs drop for CoV2 source??
05/06/2009 - CO2 Private Server - 9 Replies
Firstly i would like to thanks CoV2 and ahmedandkhalid for the source if it happen you all read.But now I do have 1 problem. How can I increase the gold drop rate and the Cpsbag amount drop????



All times are GMT +1. The time now is 15:52.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.