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;
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]
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");
}