Register for your free account! | Forgot your password?

You last visited: Today at 02:37

  • 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 08/25/2010, 10:41   #16
 
elite*gold: 0
Join Date: Oct 2009
Posts: 70
Received Thanks: 3
K,i figured it out.
If i kill the boss,i get 2,5k CPs,but the MSG dont work.
Here's my code.
Code:
 if (MyMath.ChanceSuccess(100))
                {
                    if (MobID == 100)
                    {
                        Char.CPs += 2500;
                        SendMsgToAll("SYSTEM", Name + " has killed a CopperTiger and recieved 2,5k CPs!", 2000, 0);
                        return;
buckeyes10 is offline  
Old 08/25/2010, 11:47   #17
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
I think is World.SendMsgToAll
dowhatuwant is offline  
Old 08/25/2010, 12:21   #18
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by BLASTER!!!! View Post
Code:
if (Char != null)
   //if not null
else
   //if null
If the char was null is wouldn't be online
Arcо is offline  
Old 08/25/2010, 12:39   #19
 
~Master's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 118
Received Thanks: 23
Quote:
Originally Posted by buckeyes10 View Post
K,i figured it out.
If i kill the boss,i get 2,5k CPs,but the MSG dont work.
Here's my code.
Code:
 if (MyMath.ChanceSuccess(100))
                {
                    if (MobID == 100)
                    {
                        Char.CPs += 2500;
                        [COLOR="Red"]World.[/COLOR]SendMsgToAll("SYSTEM", Name + " has killed a CopperTiger and recieved 2,5k CPs!", 2000, 0);
                        return;
                   [COLOR="Red"][COLOR="Red"] }
                }[/COLOR][/COLOR]
That's it.
~Master is offline  
Old 08/25/2010, 12:59   #20
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
Quote:
Originally Posted by .Arco View Post
If the char was null is wouldn't be online
I know lol, it was just he used the null check.
dowhatuwant is offline  
Old 08/25/2010, 13:07   #21
 
elite*gold: 0
Join Date: Oct 2009
Posts: 70
Received Thanks: 3
Its work now,but its says mobs name twice.
Copper Tiger has kill Copper Tiger.
buckeyes10 is offline  
Old 08/25/2010, 13:16   #22
 
~Master's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 118
Received Thanks: 23
Quote:
Originally Posted by buckeyes10 View Post
Its work now,but its says mobs name twice.
Copper Tiger has kill Copper Tiger.
Replace Name with GC.MyChar.Name in the code.
~Master is offline  
Old 08/25/2010, 13:35   #23
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
is just Char.Name
as is not using MyChar
dowhatuwant is offline  
Old 08/25/2010, 13:54   #24
 
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
Quote:
Originally Posted by .Arco View Post
If the char was null is wouldn't be online
I wouldnt say that ..... he uses LOTF
µ~Xero~µ is offline  
Old 08/26/2010, 01:35   #25
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by µ~Xero~µ View Post
I wouldnt say that ..... he uses LOTF
Lmao this is true
Arcо is offline  
Old 08/26/2010, 03:38   #26


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by .Arco View Post
If the char was null is wouldn't be online
Well....unless the player disconnected durring looting in which case...

Oh and i dug this up from one of my older posts for people confused about statements:

Code:
            //When using if statements without brackets its important to realise that 
            //only the line immediately after the if statement will be called if the statement is true

            int Job = 55;

            if (Job == 55)
                Console.WriteLine("Yay! This line is called.");
            Console.WriteLine("This line is also called, but only because it would be the next line after the statement finshes");

            //This for example would not work out well if you dont want the contents of the if statement to be called

            if (Job == 100)
                Console.WriteLine("We dont want this line to be called, and it isnt, so Yay!");
            Console.WriteLine("Oh no! This line has been called because its not part of the if statement!");

            //If you want to have more than 1 line in the if statement then you HAVE to use brackets

            if (Job == 55)
            {
                Console.Write("All is good, the contents of this if statement");
                Console.Write(" is called and works exactly as we intended");
            }
Korvacs is offline  
Old 08/26/2010, 04:10   #27
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
Who needs brackets when we can just use whitespace?


_tao4229_ is offline  
Thanks
1 User
Reply




All times are GMT +1. The time now is 02:39.


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.