Register for your free account! | Forgot your password?

You last visited: Today at 15:55

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

Advertisement



[EPIC-Release]Top Class Effects!

Discussion on [EPIC-Release]Top Class Effects! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old 12/06/2009, 04:26   #16
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Nice release and ty for contributing, Glad your getting arround and doing some things for your self airborne
-Shunsui- is offline  
Thanks
1 User
Old 12/06/2009, 15:57   #17
 
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
blade, i can honestly say, i'm proud your finally learning. good job.
.Guru is offline  
Old 12/06/2009, 17:09   #18
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by Prot0type View Post
blade, i can honestly say, i'm proud your finally learning. good job.
@Blade,
Exactly the same here.
I hope you will keep it up, if I had more time right now, I would have contacted you this morning, but I'm ill, and have lots of homework, sorry.
Keep up, Blade. Everybody is proud of you I guess!

~Bas
Basser is offline  
Thanks
1 User
Old 12/12/2009, 14:42   #19
 
elite*gold: 0
Join Date: Aug 2008
Posts: 7
Received Thanks: 1
Source Patch: 5165

CREDITS TO -Shunsui- for giving me an example of 1 NPC so that I could make all of them.

I WOULD APPRECIATE IF SOMEONE PUT ALL THESE NPCS AND MADE IT INTO ONE. THANKS <-- Done. Korvacs posted it below.

This code is several NPC codes put together (It's more than 1 NPC though) and if you talk to them it makes you Top ____ look Below:



Code below, add it in PacketHandling/NPCDialog.cs, enjoy:






Code:
                            #region Top Trojan
                            case 2727:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the Top Trojan Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopTrojan);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region Top Ninja
                            case 2728:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopNinja Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopGuildLeader
                            case 2729:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you liek the TopGuildLeader halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region WeeklyPKChampion
                            case 2730:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the WeeklyPKChampion Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.WeeklyPKChampion);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region MonthlyPKChampion
                            case 2731:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the MonthlyPkChampion Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.MonthlyPKChampion);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopDeputyLeader
                            case 2732:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you liek the TopDeputyLeader Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopWarrior
                            case 2733:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the Top Warrior Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopWarrior);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopArcher
                            case 2734:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopArcher Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopWaterTaoist
                            case 2735:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the Top WaterTaoist Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopWaterTaoist);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopFireTaoist
                            case 2736:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopFireTaoist Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopFireTaoist);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopArcher
                            case 2737:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopArcher Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion

Now in OldCODB add
:
ayna5 is offline  
Old 12/12/2009, 16:20   #20
 
airborne.'s Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 256
Received Thanks: 63
Quote:
Originally Posted by ayna5 View Post
Source Patch: 5165

CREDITS TO -Shunsui- for giving me an example of 1 NPC so that I could make all of them.

I WOULD APPRECIATE IF SOMEONE PUT ALL THESE NPCS AND MADE IT INTO ONE. THANKS <-- Done. Korvacs posted it below.

This code is several NPC codes put together (It's more than 1 NPC though) and if you talk to them it makes you Top ____ look Below:



Code below, add it in PacketHandling/NPCDialog.cs, enjoy:






Code:
                            #region Top Trojan
                            case 2727:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the Top Trojan Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopTrojan);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region Top Ninja
                            case 2728:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopNinja Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopGuildLeader
                            case 2729:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you liek the TopGuildLeader halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region WeeklyPKChampion
                            case 2730:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the WeeklyPKChampion Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.WeeklyPKChampion);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region MonthlyPKChampion
                            case 2731:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the MonthlyPkChampion Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.MonthlyPKChampion);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopDeputyLeader
                            case 2732:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you liek the TopDeputyLeader Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopWarrior
                            case 2733:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the Top Warrior Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopWarrior);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopArcher
                            case 2734:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopArcher Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopWaterTaoist
                            case 2735:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the Top WaterTaoist Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopWaterTaoist);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopFireTaoist
                            case 2736:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopFireTaoist Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopFireTaoist);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion
                            #region TopArcher
                            case 2737:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like the TopArcher Halo?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Meng", 1));
                                        GC.AddSend(Packets.NPCLink("Nah.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    break;
                                }
                            #endregion

Now in OldCODB add
:
Your point..????
airborne. is offline  
Old 12/16/2009, 11:10   #21
 
WHITELIONX's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 534
Received Thanks: 66
I had a little play around with this to create a single npc to give the honor halos only to find out that it had already been done by Korvacs hehe, what I attempted was so that it gives only a ninja the TopNinja halo but I have so far failed with it This is part of the whole code but why is it not searching to see if I am what I say I am? I mean it tells me I am not "TopWarrior" but would still give me the halo even if I am ninja?

if (Control == 6)
{
if (GC.MyChar.Job >= 50 && GC.MyChar.Job <= 55)
{

}
else
{
GC.AddSend(Packets.NPCSay("You are not a Ninja, so get lost, will you?"));
GC.AddSend(Packets.NPCLink("Sorry.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Ninja Halo");

}
WHITELIONX is offline  
Old 12/16/2009, 15:08   #22


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Code:
            if (Control == 6)
            {
                if (GC.MyChar.Job >= 50 && GC.MyChar.Job <= 55)
                {
                    GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
                    GC.Message(2005, GC.MyChar.Name + "Has won the Top Ninja Halo");
                }
                else
                {
                    GC.AddSend(Packets.NPCSay("You are not a Ninja, so get lost, will you?"));
                    GC.AddSend(Packets.NPCLink("Sorry.", 255));
                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                    GC.AddSend(Packets.NPCFinish());
                }
            }
Becareful with your if statements:

Code:
            //When creating an if statement, it is important to understand that when the statement is true, it performs the actions within your brackets

            int Job = 50;

            if (Job == 50)
            {
                //This statement is true, so the code which is placed here is called.
            }
        
            //When the statement is false the code within the brackets is not called.

            Job = 100;

            if (Job == 50)
            {
                //This statement is false, so the code which is placed here is not called.
            }

            //If you want you can add an else statement which will be called when an if statement is false


            Job = 100;

            if (Job == 50)
            {
                //This statement is false, so the code which is placed here is not called.
            }
            else
            {
                //The code which is placed here will be called since the if statement is false.
            }

            //You can also have a third option for handling multiple statements

            Job = 100;

            if (Job == 50)
            {
                //This statement is false, so the code which is placed here is not called.
            }
            else if (Job == 100)
            {
                //This statement is true, so the code here will be called.
            }
            else
            {
                //Since the second statement is true, this information is not called.
            }

            //The advantage of this is that the if you have multiple statements, and only one of them can be correct, your code will quickly skip the statements which are not correct,
            //and then after handling the one and only true statement will come out of the entire if statement without performing further checks, it is considerably faster than multiple
            //if statements:

            if (Job == 50)
            {

            }
            if (Job == 100)
            {

            }
            if (Job == 150)
            {

            }
Korvacs is offline  
Old 12/16/2009, 18:13   #23
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by Korvacs View Post
Code:
            if (Control == 6)
            {
                if (GC.MyChar.Job >= 50 && GC.MyChar.Job <= 55)
                {
                    GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
                    GC.Message(2005, GC.MyChar.Name + "Has won the Top Ninja Halo");
                }
                else
                {
                    GC.AddSend(Packets.NPCSay("You are not a Ninja, so get lost, will you?"));
                    GC.AddSend(Packets.NPCLink("Sorry.", 255));
                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                    GC.AddSend(Packets.NPCFinish());
                }
            }
Becareful with your if statements:

Code:
            //When creating an if statement, it is important to understand that when the statement is true, it performs the actions within your brackets

            int Job = 50;

            if (Job == 50)
            {
                //This statement is true, so the code which is placed here is called.
            }
        
            //When the statement is false the code within the brackets is not called.

            Job = 100;

            if (Job == 50)
            {
                //This statement is false, so the code which is placed here is not called.
            }

            //If you want you can add an else statement which will be called when an if statement is false


            Job = 100;

            if (Job == 50)
            {
                //This statement is false, so the code which is placed here is not called.
            }
            else
            {
                //The code which is placed here will be called since the if statement is false.
            }

            //You can also have a third option for handling multiple statements

            Job = 100;

            if (Job == 50)
            {
                //This statement is false, so the code which is placed here is not called.
            }
            else if (Job == 100)
            {
                //This statement is true, so the code here will be called.
            }
            else
            {
                //Since the second statement is true, this information is not called.
            }

            //The advantage of this is that the if you have multiple statements, and only one of them can be correct, your code will quickly skip the statements which are not correct,
            //and then after handling the one and only true statement will come out of the entire if statement without performing further checks, it is considerably faster than multiple
            //if statements:

            if (Job == 50)
            {

            }
            if (Job == 100)
            {

            }
            if (Job == 150)
            {

            }
True, and a lot of people don't know when to use Else if, or at least they don't use it when they should.
Basser is offline  
Old 12/16/2009, 19:20   #24

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by Smythe94 View Post
True, and a lot of people don't know when to use Else if, or at least they don't use it when they should.
Isn't it pretty obvious when you need to use it?
I mean it's used like this:
if certain conditions are met do the following so like this if(something here){stuff to do when conditions met}
Then use else when the conditions are not met so like this if(something here){stuff to do when conditions met}else{something else here to be activated when the conditions are not met}
At least that's how I learned to do it =S
Kiyono is offline  
Old 12/16/2009, 19:20   #25
 
onlyme64's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 268
Received Thanks: 25
Yes sir it is.
onlyme64 is offline  
Old 12/18/2009, 19:16   #26
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by Kiyono View Post
Isn't it pretty obvious when you need to use it?
I mean it's used like this:
if certain conditions are met do the following so like this if(something here){stuff to do when conditions met}
Then use else when the conditions are not met so like this if(something here){stuff to do when conditions met}else{something else here to be activated when the conditions are not met}
At least that's how I learned to do it =S
I know it is, but yet a lot of people use just if when they should use else if.
Basser is offline  
Old 01/09/2010, 15:22   #27
 
elite*gold: 0
Join Date: Jan 2010
Posts: 16
Received Thanks: 0
ty dude
Gorjangorjan is offline  
Old 01/09/2010, 17:55   #28
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Quote:
Originally Posted by Gorjangorjan View Post
ty dude
No problem
copz1337 is offline  
Old 01/11/2010, 16:34   #29
 
elite*gold: 0
Join Date: May 2009
Posts: 29
Received Thanks: 0
Quote:
Originally Posted by Korvacs View Post
Code:
                                case 2727:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Which type of Halo do you want?"));
                                        GC.AddSend(Packets.NPCLink("Guild", 1));
                                        GC.AddSend(Packets.NPCLink("Class", 2));
                                        GC.AddSend(Packets.NPCLink("Pk", 3));
                                        GC.AddSend(Packets.NPCLink("None", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.AddSend(Packets.NPCSay("Which Halo do you want?"));
                                        GC.AddSend(Packets.NPCLink("GuildLeader", 10));
                                        GC.AddSend(Packets.NPCLink("DeputyLeader", 11));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 2)
                                    {
                                        GC.AddSend(Packets.NPCSay("Which Halo do you want?"));
                                        GC.AddSend(Packets.NPCLink("Warrior", 20));
                                        GC.AddSend(Packets.NPCLink("Archer", 21));
                                        GC.AddSend(Packets.NPCLink("WaterTaoist", 22));
                                        GC.AddSend(Packets.NPCLink("FireTaoist", 23));
                                        GC.AddSend(Packets.NPCLink("Trojan", 24));
                                        GC.AddSend(Packets.NPCLink("Ninja", 25));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 3)
                                    {
                                        GC.AddSend(Packets.NPCSay("Which Halo do you want?"));
                                        GC.AddSend(Packets.NPCLink("Weekly", 30));
                                        GC.AddSend(Packets.NPCLink("Monthly", 31));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }

                                    else if (Control == 10)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Guild Leader Halo");
                                    }
                                    else if (Control == 11)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Deputy Leader Halo");
                                    }
                                    else if (Control == 20)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopWarrior);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Warrior Halo");
                                    }
                                    else if (Control == 21)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Archer Halo");
                                    }
                                    else if (Control == 22)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopWaterTaoist);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Water Taoist Halo");
                                    }
                                    else if (Control == 23)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopFireTaoist);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Fire Taoist Halo");
                                    }
                                    else if (Control == 24)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopTrojan);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
                                    }
                                    else if (Control == 25)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Top Ninja Halo");
                                    }
                                    else if (Control == 30)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.WeeklyPKChampion);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Weekly Pk Champion Halo");
                                    }
                                    else if (Control == 31)
                                    {
                                        GC.MyChar.StatEff.Add(StatusEffectEn.MonthlyPKChampion);
                                        GC.Message(2005, GC.MyChar.Name + "Has won the Monthly Pk Champion Halo");
                                    }
                                }
Thanks are appreciated.
you forgot to add the statement break at the end.
for those who don't like to type here's it with break.
99% of the credits go to Korvacs.

Quote:
#region Top Halo
case 2727:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Which type of Halo do you want?"));
GC.AddSend(Packets.NPCLink("Guild", 1));
GC.AddSend(Packets.NPCLink("Class", 2));
GC.AddSend(Packets.NPCLink("Pk", 3));
GC.AddSend(Packets.NPCLink("None", 255));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}
else if (Control == 1)
{
GC.AddSend(Packets.NPCSay("Which Halo do you want?"));
GC.AddSend(Packets.NPCLink("GuildLeader", 10));
GC.AddSend(Packets.NPCLink("DeputyLeader", 11));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}
else if (Control == 2)
{
GC.AddSend(Packets.NPCSay("Which Halo do you want?"));
GC.AddSend(Packets.NPCLink("Warrior", 20));
GC.AddSend(Packets.NPCLink("Archer", 21));
GC.AddSend(Packets.NPCLink("WaterTaoist", 22));
GC.AddSend(Packets.NPCLink("FireTaoist", 23));
GC.AddSend(Packets.NPCLink("Trojan", 24));
GC.AddSend(Packets.NPCLink("Ninja", 25));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}
else if (Control == 3)
{
GC.AddSend(Packets.NPCSay("Which Halo do you want?"));
GC.AddSend(Packets.NPCLink("Weekly", 30));
GC.AddSend(Packets.NPCLink("Monthly", 31));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}

else if (Control == 10)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeade r);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Guild Leader Halo");
}
else if (Control == 11)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLead er);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Deputy Leader Halo");
}
else if (Control == 20)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopWarrior);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Warrior Halo");
}
else if (Control == 21)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Archer Halo");
}
else if (Control == 22)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopWaterTaois t);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Water Taoist Halo");
}
else if (Control == 23)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopFireTaoist );
GC.Message(2005, GC.MyChar.Name + "Has won the Top Fire Taoist Halo");
}
else if (Control == 24)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopTrojan);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Halo");
}
else if (Control == 25)
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
GC.Message(2005, GC.MyChar.Name + "Has won the Top Ninja Halo");
}
else if (Control == 30)
{
GC.MyChar.StatEff.Add(StatusEffectEn.WeeklyPKChamp ion);
GC.Message(2005, GC.MyChar.Name + "Has won the Weekly Pk Champion Halo");
}
else if (Control == 31)
{
GC.MyChar.StatEff.Add(StatusEffectEn.MonthlyPKCham pion);
GC.Message(2005, GC.MyChar.Name + "Has won the Monthly Pk Champion Halo");
}
break;
}
#endregion
killerp323 is offline  
Old 01/19/2010, 05:05   #30
 
NoFatChicks's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 0
Quote:
Originally Posted by Korvacs View Post
Thanks are appreciated.
Quote:
Originally Posted by airborne. View Post
enjoy:



Thanks.
NoFatChicks is offline  
Closed Thread


Similar Threads Similar Threads
[RELEASE]Garment effects
05/03/2012 - CO2 PServer Guides & Releases - 37 Replies
Okay, i saw post somewere that somebody wanted garment to have effect, so i tought i will find out and release it soo 1. Go to your ini folder and open Action3Deffect.ini 2. Add one line there Quote: 999.100.181.890=w-taoist The 999.100.181.890=w-taoist is what makes ur armor/garment have effect
Release: Cool effects.Everyone see them.
05/06/2009 - CO2 PServer Guides & Releases - 34 Replies
Well...because a lot of ppl...was waiting for it..and because i stopped coding....im gonna post it. here it comes: In character.cs at line 100 add public bool AllSuper = false; in the "void TimerElapsed(object source, ElapsedEventArgs e)" you should find something like if (Action == 250)
[Release] Class Potion
03/17/2009 - EO PServer Guides & Releases - 13 Replies
hi guyz , after some ppl started to ask for class potion i thought i should release it All Credits to haciveli AKA Ace
[Release] SuperGem effects.
10/31/2008 - CO2 Private Server - 9 Replies
Okay here you guys go i don't know if you have it but you have it now. In Character.cs search for public void GemEffect() Replace whats there with this -EDIT Not your code, next time give credits atleast. - Hope this helped you people that don't have it. Uhh some times it don't like to work say if u have one equipt on with 2 sdg's some times you have to have maybe 2 or 3 equips with a super gem in it but i has its ups and downs



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


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.