Register for your free account! | Forgot your password?

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

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

Advertisement



[Help] UnknownMan source code

Discussion on [Help] UnknownMan source code within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
reactant's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 91
Received Thanks: 3
Post [Help] UnknownMan source code

plss help me guys i need some npc source code like unknownman in the Market... thanks a lot.....
reactant is offline  
Old 02/26/2009, 10:47   #2
 
Tw3ak's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,489
Received Thanks: 301
Open client.cs and find where regions are and add this anywhere:


Code:
#region UnknownMan
                            if (CurrentNPC == 3825)
                            {
                                if (Control == 1)
                                {
                                    if (MyChar.Level >= 40 && MyChar.Level <= 59)
                                    {
                                        AddExp = 1000000;
                                    }
                                    else if (MyChar.Level >= 60 && MyChar.Level <= 69)
                                    {
                                        AddExp = 1200000;
                                    }
                                    else if (MyChar.Level >= 70 && MyChar.Level <= 79)
                                    {
                                        AddExp = 1400000;
                                    }
                                    else if (MyChar.Level >= 80 && MyChar.Level <= 89)
                                    {
                                        AddExp = 1700000;
                                    }
                                    else if (MyChar.Level >= 90 && MyChar.Level <= 99)
                                    {
                                        AddExp = 2000000;
                                    }
                                    else if (MyChar.Level >= 100 && MyChar.Level <= 109)
                                    {
                                        AddExp = 2400000;
                                    }
                                    else if (MyChar.Level >= 110 && MyChar.Level <= 119)
                                    {
                                        AddExp = 2900000;
                                    }
                                    else if (MyChar.Level >= 120 && MyChar.Level <= 129)
                                    {
                                        AddExp = 3500000;
                                    }
                                    else if (MyChar.Level >= 130 && MyChar.Level <= 134)
                                    {
                                        AddExp = 3500000;
                                    }
                                    SendPacket(General.MyPackets.NPCSay("You can draw energy from a Dragonball. Bring a Dragonball to me and I will transfer the energy contained in it to your body. So you can use the dragonball to level up instantly, you will gain: " + AddExp + " exp!"));
                                    SendPacket(General.MyPackets.NPCLink("Lets Get Started!", 2));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.InventoryContains(1088000, 1))
                                    {
                                        if (MyChar.Level >= 40 && MyChar.Level <= 59)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1000000), false);
                                        }
                                        else if (MyChar.Level >= 60 && MyChar.Level <= 69)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1200000), false);
                                        }
                                        else if (MyChar.Level >= 70 && MyChar.Level <= 79)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1400000), false);
                                        }
                                        else if (MyChar.Level >= 80 && MyChar.Level <= 89)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1700000), false);
                                        }
                                        else if (MyChar.Level >= 90 && MyChar.Level <= 99)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2000000), false);
                                        }
                                        else if (MyChar.Level >= 100 && MyChar.Level <= 109)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2400000), false);
                                        }
                                        else if (MyChar.Level >= 110 && MyChar.Level <= 119)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2900000), false);
                                        }
                                        else if (MyChar.Level >= 120 && MyChar.Level <= 129)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 3500000), false);
                                        }
                                        else if (MyChar.Level >= 130 && MyChar.Level <= 134)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 3900000), false);
                                        }
                                        else if (MyChar.Level == 135)
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You have reached the maximum level, you cannot gain anymore exp."));
                                            SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You don't have a Dragonball."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
                            #endregion
Then go to where other npc dialogs are and add :

Code:
if (CurrentNPC == 3825)
                            {

                                if (MyChar.Level >= 40)
                                {
                                    SendPacket(General.MyPackets.NPCSay("The Dragonball is a supernatural item which can not only upgrade the"));
                                    SendPacket(General.MyPackets.NPCSay(" level and quality of your gears, but also help you level up quickly. You"));
                                    SendPacket(General.MyPackets.NPCSay(" know, there is infinite energy contained in a Dragonball. And I will help you"));
                                    SendPacket(General.MyPackets.NPCSay(" draw energy from the Dragonball to increase your exp, and improve your level"));
                                    SendPacket(General.MyPackets.NPCLink("Wow! I can't wait to start.", 1));
                                    SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You have to be at least level 40 to draw the energy of the Dragonball."));
                                    SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Then add npc to sql like so :

Code:
UID 3825
Type 3196
Name UnknownMan
Flag 2
Direction 0
X 212
Y 204
Map 1036
SobType 0
And viola your done.
Tw3ak is offline  
Thanks
2 Users
Old 02/26/2009, 11:52   #3
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,652
Received Thanks: 701
Quote:
Originally Posted by Tw3ak View Post
Open client.cs and find where regions are and add this anywhere:


Code:
#region UnknownMan
                            if (CurrentNPC == 3825)
                            {
                                if (Control == 1)
                                {
                                    if (MyChar.Level >= 40 && MyChar.Level <= 59)
                                    {
                                        AddExp = 1000000;
                                    }
                                    else if (MyChar.Level >= 60 && MyChar.Level <= 69)
                                    {
                                        AddExp = 1200000;
                                    }
                                    else if (MyChar.Level >= 70 && MyChar.Level <= 79)
                                    {
                                        AddExp = 1400000;
                                    }
                                    else if (MyChar.Level >= 80 && MyChar.Level <= 89)
                                    {
                                        AddExp = 1700000;
                                    }
                                    else if (MyChar.Level >= 90 && MyChar.Level <= 99)
                                    {
                                        AddExp = 2000000;
                                    }
                                    else if (MyChar.Level >= 100 && MyChar.Level <= 109)
                                    {
                                        AddExp = 2400000;
                                    }
                                    else if (MyChar.Level >= 110 && MyChar.Level <= 119)
                                    {
                                        AddExp = 2900000;
                                    }
                                    else if (MyChar.Level >= 120 && MyChar.Level <= 129)
                                    {
                                        AddExp = 3500000;
                                    }
                                    else if (MyChar.Level >= 130 && MyChar.Level <= 134)
                                    {
                                        AddExp = 3500000;
                                    }
                                    SendPacket(General.MyPackets.NPCSay("You can draw energy from a Dragonball. Bring a Dragonball to me and I will transfer the energy contained in it to your body. So you can use the dragonball to level up instantly, you will gain: " + AddExp + " exp!"));
                                    SendPacket(General.MyPackets.NPCLink("Lets Get Started!", 2));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.InventoryContains(1088000, 1))
                                    {
                                        if (MyChar.Level >= 40 && MyChar.Level <= 59)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1000000), false);
                                        }
                                        else if (MyChar.Level >= 60 && MyChar.Level <= 69)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1200000), false);
                                        }
                                        else if (MyChar.Level >= 70 && MyChar.Level <= 79)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1400000), false);
                                        }
                                        else if (MyChar.Level >= 80 && MyChar.Level <= 89)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1700000), false);
                                        }
                                        else if (MyChar.Level >= 90 && MyChar.Level <= 99)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2000000), false);
                                        }
                                        else if (MyChar.Level >= 100 && MyChar.Level <= 109)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2400000), false);
                                        }
                                        else if (MyChar.Level >= 110 && MyChar.Level <= 119)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2900000), false);
                                        }
                                        else if (MyChar.Level >= 120 && MyChar.Level <= 129)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 3500000), false);
                                        }
                                        else if (MyChar.Level >= 130 && MyChar.Level <= 134)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 3900000), false);
                                        }
                                        else if (MyChar.Level == 135)
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You have reached the maximum level, you cannot gain anymore exp."));
                                            SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You don't have a Dragonball."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
                            #endregion
Then go to where other npc dialogs are and add :

Code:
if (CurrentNPC == 3825)
                            {

                                if (MyChar.Level >= 40)
                                {
                                    SendPacket(General.MyPackets.NPCSay("The Dragonball is a supernatural item which can not only upgrade the"));
                                    SendPacket(General.MyPackets.NPCSay(" level and quality of your gears, but also help you level up quickly. You"));
                                    SendPacket(General.MyPackets.NPCSay(" know, there is infinite energy contained in a Dragonball. And I will help you"));
                                    SendPacket(General.MyPackets.NPCSay(" draw energy from the Dragonball to increase your exp, and improve your level"));
                                    SendPacket(General.MyPackets.NPCLink("Wow! I can't wait to start.", 1));
                                    SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You have to be at least level 40 to draw the energy of the Dragonball."));
                                    SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Then add npc to sql like so :

Code:
UID 3825
Type 3196
Name UnknownMan
Flag 2
Direction 0
X 212
Y 204
Map 1036
SobType 0
And viola your done.
yep :P
turk55 is offline  
Old 02/26/2009, 13:52   #4
 
reactant's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 91
Received Thanks: 3
THANKS A LOT GUYS... Its a BiG Help.....
reactant is offline  
Old 02/26/2009, 14:33   #5
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Quote:
Originally Posted by Tw3ak View Post
Open client.cs and find where regions are and add this anywhere:


Code:
#region UnknownMan
                            if (CurrentNPC == 3825)
                            {
                                if (Control == 1)
                                {
                                    if (MyChar.Level >= 40 && MyChar.Level <= 59)
                                    {
                                        AddExp = 1000000;
                                    }
                                    else if (MyChar.Level >= 60 && MyChar.Level <= 69)
                                    {
                                        AddExp = 1200000;
                                    }
                                    else if (MyChar.Level >= 70 && MyChar.Level <= 79)
                                    {
                                        AddExp = 1400000;
                                    }
                                    else if (MyChar.Level >= 80 && MyChar.Level <= 89)
                                    {
                                        AddExp = 1700000;
                                    }
                                    else if (MyChar.Level >= 90 && MyChar.Level <= 99)
                                    {
                                        AddExp = 2000000;
                                    }
                                    else if (MyChar.Level >= 100 && MyChar.Level <= 109)
                                    {
                                        AddExp = 2400000;
                                    }
                                    else if (MyChar.Level >= 110 && MyChar.Level <= 119)
                                    {
                                        AddExp = 2900000;
                                    }
                                    else if (MyChar.Level >= 120 && MyChar.Level <= 129)
                                    {
                                        AddExp = 3500000;
                                    }
                                    else if (MyChar.Level >= 130 && MyChar.Level <= 134)
                                    {
                                        AddExp = 3500000;
                                    }
                                    SendPacket(General.MyPackets.NPCSay("You can draw energy from a Dragonball. Bring a Dragonball to me and I will transfer the energy contained in it to your body. So you can use the dragonball to level up instantly, you will gain: " + AddExp + " exp!"));
                                    SendPacket(General.MyPackets.NPCLink("Lets Get Started!", 2));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.InventoryContains(1088000, 1))
                                    {
                                        if (MyChar.Level >= 40 && MyChar.Level <= 59)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1000000), false);
                                        }
                                        else if (MyChar.Level >= 60 && MyChar.Level <= 69)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1200000), false);
                                        }
                                        else if (MyChar.Level >= 70 && MyChar.Level <= 79)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1400000), false);
                                        }
                                        else if (MyChar.Level >= 80 && MyChar.Level <= 89)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 1700000), false);
                                        }
                                        else if (MyChar.Level >= 90 && MyChar.Level <= 99)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2000000), false);
                                        }
                                        else if (MyChar.Level >= 100 && MyChar.Level <= 109)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2400000), false);
                                        }
                                        else if (MyChar.Level >= 110 && MyChar.Level <= 119)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 2900000), false);
                                        }
                                        else if (MyChar.Level >= 120 && MyChar.Level <= 129)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 3500000), false);
                                        }
                                        else if (MyChar.Level >= 130 && MyChar.Level <= 134)
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                            MyChar.AddExp((ulong)(1295000 + MyChar.Level * 3900000), false);
                                        }
                                        else if (MyChar.Level == 135)
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You have reached the maximum level, you cannot gain anymore exp."));
                                            SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You don't have a Dragonball."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
                            #endregion
Then go to where other npc dialogs are and add :

Code:
if (CurrentNPC == 3825)
                            {

                                if (MyChar.Level >= 40)
                                {
                                    SendPacket(General.MyPackets.NPCSay("The Dragonball is a supernatural item which can not only upgrade the"));
                                    SendPacket(General.MyPackets.NPCSay(" level and quality of your gears, but also help you level up quickly. You"));
                                    SendPacket(General.MyPackets.NPCSay(" know, there is infinite energy contained in a Dragonball. And I will help you"));
                                    SendPacket(General.MyPackets.NPCSay(" draw energy from the Dragonball to increase your exp, and improve your level"));
                                    SendPacket(General.MyPackets.NPCLink("Wow! I can't wait to start.", 1));
                                    SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You have to be at least level 40 to draw the energy of the Dragonball."));
                                    SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Then add npc to sql like so :

Code:
UID 3825
Type 3196
Name UnknownMan
Flag 2
Direction 0
X 212
Y 204
Map 1036
SobType 0
And viola your done.

Fail!

a) Doesn't tell you what level and percent you will end up at.
b) Code... sucks?

Why not just calculate the exp by one line?
Yeah,I had quite some problem with making the NPC telling you what percent you will end up at(Level was easy), but I figured it out, although I do not have the code anymore.
_Emme_ is offline  
Old 02/26/2009, 14:42   #6
 
Tw3ak's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,489
Received Thanks: 301
Quote:
Originally Posted by EmmeTheCoder View Post
Fail!

a) Doesn't tell you what level and percent you will end up at.
b) Code... sucks?

Why not just calculate the exp by one line?
Yeah,I had quite some problem with making the NPC telling you what percent you will end up at(Level was easy), but I figured it out, although I do not have the code anymore.
Maybe because it isn't my code ?? I don't take credit for it what so ever haha

Do you think i would put something i coded up here on this forum to be leeched are you nuts ? LOL I don't use lotf and yes mine works correctly and displays what exp/level to next just fine i just did a simple 5 second "search" and posted what i found to help him out with lotf sourcecode nothing more.
Tw3ak is offline  
Old 02/26/2009, 15:46   #7
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Oh, didn't know, add it in next time =P
_Emme_ is offline  
Old 02/26/2009, 21:43   #8
 
Zkiller110's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 276
Received Thanks: 99
thanks for the help i am going to be working on a private server soon just looking for a good starting source if your have any segestions tell me plz
Zkiller110 is offline  
Reply


Similar Threads Similar Threads
[REL] UnknownMan for the 5156 source
03/03/2011 - CO2 PServer Guides & Releases - 55 Replies
Hey, I've been figuring out and it seems the simplest things even can't be done these days in this section. So here it is, The npc: #region UnknownMan case 300006:



All times are GMT +2. The time now is 04:16.


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.