Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:09

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

Advertisement



[Help] Need Help Please

Discussion on [Help] Need Help Please within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
[Help] Need Help Please

First let me say that I am not the kind of person who posts every single problem I have asking for help, but I am still learning. I do use the search button. I use this section as a last resort.

Ok, that being said, what I'm trying to do Is to create an npc that will exchange items for levels...I know there are posts about these types of NPC, I have went over them and they do not help me with this. I have the NPC coded, but cannot figure out the correct way to make it take the items and give levels without making the npc the length of my arm. Trying to keep it as neat and clean as possible. Trying to make it give levels up to level 200, 1 level at a time.

Here is the code I got with what I know will either have to add to it or change to some different way, highlighted in red.

Code:
#region VIPZone Exit
                            case 300657:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello, I can exchagne PowerEXPBalls for levels, or send you back to Twin City."));
                                        GC.AddSend(Packets.NPCLink("Please exchange my PowerEXPBalls.", 1));
                                        GC.AddSend(Packets.NPCLink("Please send me to Twin City.", 2));
                                        GC.AddSend(Packets.NPCLink("Just Passing By.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        if (GC.MyChar.VipLevel >= 4)
                                        if (GC.MyChar.InventoryContains(722057, 10))
                                        {
                                            [COLOR="Red"]for (int i = 0; i < 10; i++)
                                                GC.MyChar.RemoveItem(GC.MyChar.NextItem(722057));
                                            if (NeededExp(GC.MyChar.Level) <= GC.MyChar.Experience)
                                            GiveLevel(GC);
                                            }[/COLOR]
                                                GC.AddSend(Packets.NPCSay("Congration you have 10 PowerEXPBalls for 1 Level."));
                                                GC.AddSend(Packets.NPCLink("OK Thx", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Sorry you dont have any PowerEXPBalls."));
                                            GC.AddSend(Packets.NPCLink("OK i see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                     if (Control == 2)
                                        GC.MyChar.Teleport(1002, 429, 378);
                                    break;
                                }
                            #endregion
The way it is now, it gives no errors, but will not take the items or give any levels. If someone could help me with this or atleast point me in the right direction, I will bestow upon you my first born child...or an arm and a leg, whichever you prefer.

Thanks.
HardNotTo is offline  
Old 03/18/2010, 23:49   #2
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
nvm, got it figured out...next time please, don't everyone respond at once.

#request close
HardNotTo is offline  
Closed Thread




All times are GMT +1. The time now is 16:10.


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.