Register for your free account! | Forgot your password?

You last visited: Today at 19:08

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

Advertisement



Is there any way.

Discussion on Is there any way. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2009
Posts: 70
Received Thanks: 3
Question Is there any way.

Is there any way to make an one monster drop x amount of CP's,and when someone kill him,or when it respawn all get message?
Im using 5165 Source.
buckeyes10 is offline  
Old 08/22/2010, 15:54   #2
 
elite*gold: 0
Join Date: Aug 2010
Posts: 20
Received Thanks: 5
in mob.cs
BLASTER!!!! is offline  
Old 08/22/2010, 16:06   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 70
Received Thanks: 3
But how,can u say?
buckeyes10 is offline  
Old 08/22/2010, 16:14   #4
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Go into mob.cs and search for
Code:
if (MyMath.ChanceSuccess(30))
above that add something like
Code:
if (MyMath.ChanceSuccess(100))
                {
                    if (Char != null)
                    if (Name == "Pheasant") // Change this to the name of the mob
                    {
                        Char.CPs += 50; // Change this to the amount of CPs you want to drop
                        SendMsgToAll("SYSTEM", Name + " has killed a monster and recieved 50 CPs", 2000, 0);
                        return;
                    }
                }
.Beatz is offline  
Old 08/22/2010, 16:58   #5
 
elite*gold: 0
Join Date: Oct 2009
Posts: 70
Received Thanks: 3
****,doesn't work for me :/
It builds witchout any error,but when i kill the mob,nothing happends :/
buckeyes10 is offline  
Old 08/22/2010, 17:16   #6
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by buckeyes10 View Post
****,doesn't work for me :/
It builds witchout any error,but when i kill the mob,nothing happends :/
add me on msn buck I will try and help you out a bit more
.Beatz is offline  
Old 08/22/2010, 19:25   #7
 
elite*gold: 0
Join Date: Aug 2010
Posts: 20
Received Thanks: 5
Code:
if (MyMath.ChanceSuccess(100))
                {
                    if (Char != null)
{
                    if (Name == "Pheasant") // Change this to the name of the mob
                    {
                        Char.CPs += 50; // Change this to the amount of CPs you want to drop
                        SendMsgToAll("SYSTEM", Name + " has killed a monster and recieved 50 CPs", 2000, 0);
                        return;
                    }
}
                }
fixed
BLASTER!!!! is offline  
Old 08/22/2010, 19:53   #8
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by BLASTER!!!! View Post
Code:
if (MyMath.ChanceSuccess(100))
                {
                    if (Char != null)
{
                    if (Name == "Pheasant") // Change this to the name of the mob
                    {
                        Char.CPs += 50; // Change this to the amount of CPs you want to drop
                        SendMsgToAll("SYSTEM", Name + " has killed a monster and recieved 50 CPs", 2000, 0);
                        return;
                    }
}
                }
fixed
Blaster you don't need the extra curly brackets there. That is just a drain on resources. Learn to code properly before failing at "fixing" other peoples posts. I have pretty much the EXACT same code in my source and works 100%.
If you want the same amount dropped for every mob it would be
Code:
if (MyMath.ChanceSuccess(100))
{ if (Char != null) { MyChar.CPs += 50; return; } }
.Beatz is offline  
Old 08/22/2010, 20:11   #9
 
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
how about u send the packet to update the cps :O
µ~Xero~µ is offline  
Old 08/22/2010, 20:12   #10
 
elite*gold: 0
Join Date: Aug 2010
Posts: 20
Received Thanks: 5
Quote:
Originally Posted by mattyc2580 View Post
Blaster you don't need the extra curly brackets there. That is just a drain on resources. Learn to code properly before failing at "fixing" other peoples posts. I have pretty much the EXACT same code in my source and works 100%.
If you want the same amount dropped for every mob it would be
Code:
if (MyMath.ChanceSuccess(100))
{ if (Char != null) { MyChar.CPs += 50; return; } }
dont talk before u got ur info.
u were the one who made one that didn't work.
I fixed ur brackets.
Code:
                    if (Char != null)
                    if (Name == "Pheasant") // Change this to the name of the mob
would never work

why?
Code:
                    if (Char != null)//checks only the next line after
                    if (Name == "Pheasant") // Change this to the name of the mob
when to use if without brackets then?
Code:
if (Char != null)
   //if not null
else
   //if null
u can only use 1 line methodes there.

so whos right or wrong?
BLASTER!!!! is offline  
Thanks
1 User
Old 08/22/2010, 23:07   #11
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 912
Quote:
Originally Posted by mattyc2580 View Post
Blaster you don't need the extra curly brackets there. That is just a drain on resources. Learn to code properly before failing at "fixing" other peoples posts. I have pretty much the EXACT same code in my source and works 100%.
A drain on resources!? For a bracket!?? Are you fucking kidding me?
No, adding a bracket won't drain your resources.


Quote:
Originally Posted by BLASTER!!!! View Post
dont talk before u got ur info.
u were the one who made one that didn't work.
I fixed ur brackets.
Code:
                    if (Char != null)
                    if (Name == "Pheasant") // Change this to the name of the mob
would never work

why?
Code:
                    if (Char != null)//checks only the next line after
                    if (Name == "Pheasant") // Change this to the name of the mob
when to use if without brackets then?
Code:
if (Char != null)
   //if not null
else
   //if null
u can only use 1 line methodes there.

so whos right or wrong?
You're both wrong in your own special little ways.

Blaster, you're right that an if statement without brackets can only affect one line, but if that line is another if statement then if will keep going.

Code:
if (x)
    if (y)
        if (z)
            Console.WriteLine("x, y, and z all have to be true for this to appear!");
kinshi88 is offline  
Thanks
2 Users
Old 08/22/2010, 23:14   #12
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by kinshi88 View Post
A drain on resources!? For a bracket!?? Are you ******* kidding me?
No, adding a bracket won't drain your resources.




You're both wrong in your own special little ways.

Blaster, you're right that an if statement without brackets can only affect one line, but if that line is another if statement then if will keep going.

Code:
if (x)
    if (y)
        if (z)
            Console.WriteLine("x, y, and z all have to be true for this to appear!");
lol I didn't mean drain on resources I couldn't think of the right word to use haha. Still can't think of the right word either lmao. But thanks for clearing that up
.Beatz is offline  
Old 08/22/2010, 23:19   #13
 
elite*gold: 0
Join Date: Aug 2010
Posts: 20
Received Thanks: 5
Quote:
Originally Posted by kinshi88 View Post
A drain on resources!? For a bracket!?? Are you ******* kidding me?
No, adding a bracket won't drain your resources.




You're both wrong in your own special little ways.

Blaster, you're right that an if statement without brackets can only affect one line, but if that line is another if statement then if will keep going.

Code:
if (x)
    if (y)
        if (z)
            Console.WriteLine("x, y, and z all have to be true for this to appear!");
i know, but it wasnt a bool
BLASTER!!!! is offline  
Old 08/22/2010, 23:48   #14
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
@Blaster, you were wrong twice.
@Matty, so were you.

Matty: It is not something you HAVE to do, Its style.
Matty: Resources won't really affect resources.
Blaster: You should never comment someone for his style, unless you OBVIOUSLY pointed out that you were commenting on his style, which you didn't.
Blaster: You corrected Matty saying he was wrong, but he wasn't.

@Kinshi,
You sir, posted a excellent answer on this page. <3
Basser is offline  
Thanks
1 User
Old 08/25/2010, 10:00   #15
 
elite*gold: 0
Join Date: Oct 2009
Posts: 70
Received Thanks: 3
I've got
Code:
                if (MyMath.ChanceSuccess(100))
                {
                    if (MobID == 11169 || MobID == 83 || MobID == 1 || MobID == 2 || MobID == 3 || MobID == 4 || MobID == 5 || MobID == 6 || MobID == 7 || MobID == 8 || MobID == 9 || MobID == 10 || MobID == 11 || MobID == 12 || MobID == 13 || MobID == 14 || MobID == 15 || MobID == 16 || MobID == 17 || MobID == 18 || MobID == 19 || MobID == 20 || MobID == 21 || MobID == 22 || MobID == 23 || MobID == 24 || MobID == 25 || MobID == 26 || MobID == 27 || MobID == 28 || MobID == 29 || MobID == 30 || MobID == 31 || MobID == 32 || MobID == 33 || MobID == 34 || MobID == 35 || MobID == 36 || MobID == 37 || MobID == 38 || MobID == 39 || MobID == 40 || MobID == 41 || MobID == 42 || MobID == 43 || MobID == 45 || MobID == 46 || MobID == 47 || MobID == 48 || MobID == 49 || MobID == 50 || MobID == 51 || MobID == 52 || MobID == 53 || MobID == 54 || MobID == 55 || MobID == 56 || MobID == 57 || MobID == 58 || MobID == 59 || MobID == 60 || MobID == 61 || MobID == 62 || MobID == 63 || MobID == 64 || MobID == 65 || MobID == 66 || MobID == 67 || MobID == 68 || MobID == 69 || MobID == 70 || MobID == 71 || MobID == 72)
                    {
                        Char.Silvers += 1000;
                        Char.CPs += 50;
                    }
                }
That's giving 50CPs for any monster i kill.
But i want to some of monsters,give more CP's,and when they die there will appear message.
Now i dont really know whose version works :/
buckeyes10 is offline  
Reply




All times are GMT +2. The time now is 19:08.


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.