Register for your free account! | Forgot your password?

You last visited: Today at 19:09

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

Advertisement



[Help] Steed Plus NPC

Discussion on [Help] Steed Plus NPC within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2007
Posts: 128
Received Thanks: 80
[Help] Steed Plus NPC

Code:
#region Steed Plus Officer NPC
                            case 9881:
                                {
                                    if (option == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("I can put a plus on your steed for a saddle. Do you want it?"));
                                        GC.AddSend(Packets.NPCLink("Yes. Please.", 12));
                                        GC.AddSend(Packets.NPCLink("No. Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                        GC.Agreed = false;
                                    }

                                    else if (option == 12)
                                    {
                                        
                                        //  GC.MyChar.Equips.Necklace.Bless = 1;
                                        Game.Item I = GC.MyChar.Equips.Get((byte)(option));

                                        I.ID = 300000;


                                        if (I.Plus != 12)
                                        {
                                            byte SaddleNeed = 0;
                                            if (I.Plus == 0)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 1)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 2)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 3)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 4)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 5)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 6)
                                                SaddleNeed = 7;
                                            else if (I.Plus == 7)
                                                SaddleNeed = 8;
                                            else if (I.Plus == 8)
                                                SaddleNeed = 9;
                                            else if (I.Plus == 9)
                                                SaddleNeed = 10;
                                            else if (I.Plus == 10)
                                                SaddleNeed = 11;
                                            else if (I.Plus == 11)
                                                SaddleNeed = 12;


                                            if (!GC.Agreed)
                                            {
                                                GC.AddSend(Packets.NPCSay("You need " + SaddleNeed + " saddle to upgrade. Do you want it?"));
                                                GC.AddSend(Packets.NPCSay("Your steed current plus is " + I.Plus + "."));
                                                if (I.Plus != 0)
                                                    GC.AddSend(Packets.NPCSay("It will become " + (I.Plus + 1) + "."));
                                                GC.AddSend(Packets.NPCLink("Yes. Please.", option));
                                                GC.AddSend(Packets.NPCLink("Nevermind.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                                GC.Agreed = true;
                                            }
                                            else
                                            {
                                                GC.Agreed = false;
                                                if (GC.MyChar.InventoryContains(723903, SaddleNeed, GC))
                                                {
                                                    GC.MyChar.EquipStats((byte)(option), false);
                                                    for (byte i = 0; i < SaddleNeed; i++)
                                                        GC.MyChar.RemoveItem(723903, 1, GC);
                                                        //GC.MyChar.RemoveItem(GC.MyChar.NextItem(723903));
                                                    if (I.Plus == 0)
                                                        I.Plus = 1;
                                                    else
                                                        I.Plus += 1;
                                                    GC.MyChar.Equips.Replace((byte)(option), I, GC.MyChar);
                                                    GC.MyChar.EquipStats((byte)(option), true);

                                                    GC.AddSend(Packets.NPCSay("It's done."));
                                                    GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    GC.AddSend(Packets.NPCSay("You don't have enough saddles."));
                                                    GC.AddSend(Packets.NPCLink("I see.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You cannot upgrade steed which is already at the maximum."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
Hello. Can someone please revised this code.. because in this code it will continue to upgrade even though i didn't equip the steed. All I want is to put an else if on it but dont have any idea how to do it.. I want it in the code that the NPC will not upgrade the steed if its not equip. Thanks.
nestreys is offline  
Old 07/06/2010, 03:50   #2
 
elite*gold: 0
Join Date: Jun 2010
Posts: 50
Received Thanks: 10
for if
Code:
 
Game.Item I = GC.MyChar.Equips.Steed;
if (I.ID != 0)
{
then for else

Code:
}
else
{
GC.AddSend(Packets.NPCSay("You don't have steed equipped."));
GC.AddSend(Packets.NPCLink("Ok sorry.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
Macnoo is offline  
Thanks
1 User
Old 07/06/2010, 06:56   #3
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Code:
#region Steed Plus Officer NPC
                            case 9881:
                                {
                                    if (option == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("I can put a plus on your steed for a saddle. Do you want it?"));
                                        GC.AddSend(Packets.NPCLink("Yes. Please.", 12));
                                        GC.AddSend(Packets.NPCLink("No. Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                        GC.Agreed = false;
                                    }

                                    else if (option == 12)
                                    {
                                        Game.Item I = GC.MyChar.Equips.Get((byte)(option));
                                        if (I.ID != 0)
                                        {
                                            //  GC.MyChar.Equips.Necklace.Bless = 1;
                                            I.ID = 300000;


                                            if (I.Plus != 12)
                                            {
                                                byte SaddleNeed = 0;
                                                if (I.Plus == 0)
                                                    SaddleNeed = 1;
                                                else if (I.Plus == 1)
                                                    SaddleNeed = 1;
                                                else if (I.Plus == 2)
                                                    SaddleNeed = 1;
                                                else if (I.Plus == 3)
                                                    SaddleNeed = 1;
                                                else if (I.Plus == 4)
                                                    SaddleNeed = 1;
                                                else if (I.Plus == 5)
                                                    SaddleNeed = 1;
                                                else if (I.Plus == 6)
                                                    SaddleNeed = 7;
                                                else if (I.Plus == 7)
                                                    SaddleNeed = 8;
                                                else if (I.Plus == 8)
                                                    SaddleNeed = 9;
                                                else if (I.Plus == 9)
                                                    SaddleNeed = 10;
                                                else if (I.Plus == 10)
                                                    SaddleNeed = 11;
                                                else if (I.Plus == 11)
                                                    SaddleNeed = 12;


                                                if (!GC.Agreed)
                                                {
                                                    GC.AddSend(Packets.NPCSay("You need " + SaddleNeed + " saddle to upgrade. Do you want it?"));
                                                    GC.AddSend(Packets.NPCSay("Your steed current plus is " + I.Plus + "."));
                                                    if (I.Plus != 0)
                                                        GC.AddSend(Packets.NPCSay("It will become " + (I.Plus + 1) + "."));
                                                    GC.AddSend(Packets.NPCLink("Yes. Please.", option));
                                                    GC.AddSend(Packets.NPCLink("Nevermind.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                    GC.Agreed = true;
                                                }
                                                else
                                                {
                                                    GC.Agreed = false;
                                                    if (GC.MyChar.InventoryContains(723903, SaddleNeed, GC))
                                                    {
                                                        GC.MyChar.EquipStats((byte)(option), false);
                                                        for (byte i = 0; i < SaddleNeed; i++)
                                                            GC.MyChar.RemoveItem(723903, 1, GC);
                                                        //GC.MyChar.RemoveItem(GC.MyChar.NextItem(723903));
                                                        if (I.Plus == 0)
                                                            I.Plus = 1;
                                                        else
                                                            I.Plus += 1;
                                                        GC.MyChar.Equips.Replace((byte)(option), I, GC.MyChar);
                                                        GC.MyChar.EquipStats((byte)(option), true);

                                                        GC.AddSend(Packets.NPCSay("It's done."));
                                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                        GC.AddSend(Packets.NPCFinish());
                                                    }
                                                    else
                                                    {
                                                        GC.AddSend(Packets.NPCSay("You don't have enough saddles."));
                                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                        GC.AddSend(Packets.NPCFinish());
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You cannot upgrade steed which is already at the maximum."));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You do not have the steed equiped"));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
-Shunsui- is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
steed
09/03/2009 - CO2 Private Server - 1 Replies
hpw o can add a steed in coemu
Steed Collection...
08/02/2009 - Conquer Online 2 - 0 Replies
Its really helpfull for us to know ur steed colour by composing it... and by sharing it to us.. why dont u tell me urs combination.. and we can share ours to yours... hehehe... aint it a good idea?? ^^ do +k me aite? hahaha
Steed +
08/01/2009 - Conquer Online 2 - 4 Replies
i Need To + My Horse :o So,
Steed Formula
07/30/2009 - CO2 Private Server - 1 Replies
What is the accurate formula for steed breeding (the 0.9+0.1 rough estimate isnt gonna cut it for rare steeds). Dont need a calculator either



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


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.