|
You last visited: Today at 02:37
Advertisement
Is there any way.
Discussion on Is there any way. within the CO2 Private Server forum part of the Conquer Online 2 category.
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;
|
|
|
08/25/2010, 11:47
|
#17
|
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
|
I think is World.SendMsgToAll
|
|
|
08/25/2010, 12:21
|
#18
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by BLASTER!!!!
Code:
if (Char != null)
//if not null
else
//if null
|
If the char was null is wouldn't be online
|
|
|
08/25/2010, 12:39
|
#19
|
elite*gold: 0
Join Date: Jun 2010
Posts: 118
Received Thanks: 23
|
Quote:
Originally Posted by buckeyes10
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.
|
|
|
08/25/2010, 12:59
|
#20
|
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
|
Quote:
Originally Posted by .Arco
If the char was null is wouldn't be online 
|
I know lol, it was just he used the null check.
|
|
|
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.
|
|
|
08/25/2010, 13:16
|
#22
|
elite*gold: 0
Join Date: Jun 2010
Posts: 118
Received Thanks: 23
|
Quote:
Originally Posted by buckeyes10
Its work now,but its says mobs name twice.
Copper Tiger has kill Copper Tiger.
|
Replace Name with GC.MyChar.Name in the code.
|
|
|
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
|
|
|
08/25/2010, 13:54
|
#24
|
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
|
Quote:
Originally Posted by .Arco
If the char was null is wouldn't be online 
|
I wouldnt say that ..... he uses LOTF
|
|
|
08/26/2010, 01:35
|
#25
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by µ~Xero~µ
I wouldnt say that ..... he uses LOTF 
|
Lmao this is true
|
|
|
08/26/2010, 03:38
|
#26
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by .Arco
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");
}
|
|
|
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?
|
|
|
All times are GMT +1. The time now is 02:39.
|
|