Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 05:55

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

Advertisement



[Huge-Release] All-In-One Basic NPC Scripts For The 5165 Source!

Discussion on [Huge-Release] All-In-One Basic NPC Scripts For The 5165 Source! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
[Huge-Release] All-In-One Basic NPC Scripts For The 5165 Source!

Well I'm sorry that I spammed the whole forum full of my posts So pro4never and .Ryu gave me the idea of making this All-In-One thread about all my NPC's! THESE ARE UPDATED DAILY!

NOTE: TO PEOPLE... SOME OF THE CODES ARE NOT MADE BY ME! I USUALLY JUST FIXED/UPDATED THE BASIC ONES! SORRY I'M LEARNING ON HOW TO CODE!

1. Birth-Island-NPC's(The NPC text is not from "REAL CONQUER" SORRY!...)


2.Gift-Gear-NPC


3.Escort-Chief-Clear-Inventory


4.Lost-Quest

Part 1:
Part 2:

5.FortuneTeller-Moonbox-Quest(NPC ONLY!)


6.Buying-Attribute-Points


7.Mine-Assistant


8.Gouda


9.PhoenixCastle-Bandit-Head


10.TwinCity-Furniture-Store(NPC ONLY!)


11.MoonPlatform(NPC TO SEND YOU THERE!)


12.MoonPlatform(NPC TO SEND YOU BACK!)


PRESS THANKS IF I HELPED IN ANY WAY AND EVEN IF I GAVE YOU AN IDEA!

Creditsriginal owner of 5165 source,original owners of all the NPC's listed here( well most of them anyways)...SORRY IF I DON'T KNOW THE NAMES OF THE MAKERS!

Special Credits: TO pro4never and .Ryu for helping me all this time and for giving me this wonderful idea!

+THANKS IF I HELPED!

#UPDATED+FIXED THE GIFT-GEAR NPC CODE! THANKS TO pro4never!
killersub is offline  
Thanks
16 Users
Old 01/21/2010, 22:31   #2
 
elite*gold: 0
Join Date: Jan 2010
Posts: 134
Received Thanks: 64
good job, good to see a new learner :]
DontLookDown is offline  
Old 01/21/2010, 22:32   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by DontLookDown View Post
good job, good to see a new learner :]
thanks! +thanks if I helped remember! I appreciate it
killersub is offline  
Thanks
1 User
Old 01/21/2010, 22:49   #4
 
elite*gold: 0
Join Date: Jan 2010
Posts: 134
Received Thanks: 64
you didnt help me, i code my own stuff, just saying nice haha
DontLookDown is offline  
Old 01/21/2010, 22:51   #5
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by DontLookDown View Post
you didnt help me, i code my own stuff, just saying nice haha
my bad then lol
killersub is offline  
Thanks
1 User
Old 01/22/2010, 00:40   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
you still have your free item npc incorrect. Structure your if statements properly.


else if (GC.MyChar.Level <= 69)
{
GC.AddSend(Packets.NPCSay("Your not yet level 70 or above! please train harder!"));
GC.AddSend(Packets.NPCLink("okay...bye!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}

should be

Code:
if (Control == 2)
{
if (GC.MyChar.Level >= 70)

                                    {


                                        GC.MyChar.AddItem(134069); //Robe
                                        GC.MyChar.AddItem(117069); //Earring
                                        GC.MyChar.AddItem(152129); //brac
                                        GC.MyChar.AddItem(121129); //Bag
                                        GC.MyChar.AddItem(160139); //boots
                                        GC.MyChar.AddItem(202009); //Star
                                        GC.MyChar.AddItem(201009); //Fan
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                        
                                    }
else
                                    {
                                        GC.AddSend(Packets.NPCSay("Your not yet level 70 or above! please train harder!"));
                                        GC.AddSend(Packets.NPCLink("okay...bye!", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }

}

Your level checks are not functioning correctly as they are now. You need them INSIDE the control block.

basically you want

control statement
{//Opens original control statement, keeps everything grouped together.
if statement
{
code
}
any else if statements
{
any else if code
}
else
{
else code
}
}//closes the ORIGINAL CONTROL STATEMENT!

You can nest more if statements in side but remember, the indentation indicates how far something is (if something is indented further than where you are writing your else statement, you probably have something messed up along the way.


Don't feel like correcting any of the other scripts atm but that should give you something to work on.

Good luck, glad to see the all in one thread.
pro4never is offline  
Old 01/22/2010, 10:57   #7
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Why the fawk do u post all npcs which are in the source already its completely useless.

Get ideas n do npcs on your own or quit it.
~Yuki~ is offline  
Old 01/22/2010, 12:53   #8
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
killersub lol :| what is that? omfg you just copy LostQuest & Buy Atribute npcc !! HAHA you are not codder !! stand DOWN !
QuickCo is offline  
Old 01/22/2010, 17:12   #9
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by QuickCo View Post
killersub lol :| what is that? omfg you just copy LostQuest & Buy Atribute npcc !! HAHA you are not codder !! stand DOWN !
Lol ur a funny kid...know y? cuz da joke's on you...I already said at the top+bottom for the "SLOW" people "MOST OF THE F'ING NPC'S WERE NOT MADE BY ME... AND THAT I JUST EDITED THEM FOR THE LAZY NEWBS!" so think before you speak alright dumbass?...

Quote:
Why the fawk do u post all npcs which are in the source already its completely useless.

Get ideas n do npcs on your own or quit it.
same goes for you pretty boy...
killersub is offline  
Old 01/22/2010, 18:11   #10
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
loolll noob I'm Tweety.4girls noob stop copy from 4bott or re-release here ! nobish look on you release..you know to code just NPcSay !! nothing much please leave epvp here is full with noobs we don't need more noobs Thanks
QuickCo is offline  
Old 01/22/2010, 19:16   #11
 
elite*gold: 0
Join Date: Jan 2010
Posts: 36
Received Thanks: 8
Guys, this ain't the place to fight.
Take it up on Private Message if you have to.
#both reported
Vultix is offline  
Old 01/22/2010, 21:52   #12
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Removed.
killersub is offline  
Old 01/22/2010, 22:19   #13
 
elite*gold: 0
Join Date: May 2006
Posts: 29
Received Thanks: 1
birth taoist star id is, 10055 i think.. the one you wrote is for guild director..well ain't sure though..newei., good job man..you're doin good!! keep it up!
gwapo ka is offline  
Old 01/22/2010, 22:49   #14
 
elite*gold: 0
Join Date: Jan 2008
Posts: 25
Received Thanks: 2
Um okay guys this may be a noob question but im kinda having some trouble implementing NPCs.

Before anyone flames or whatever, i dont know how to code but im trying to learn both through the internet and a C# book, but as a side quest im trying to add the stuff im learning into a CO server because it makes learning easier to stick with if you have a goal and something to work with.

Anyways so back to my question, im trying just to add a test NPC , just to simply change CP's to silvers, ok so i added a new line into the NPC list in the database, and he appears in game, but he doesnt say what i coded into the source!

This is the code i used (i put this into NPCDialog.cs btw)

Code:
#region TestNPC
                            case 300007:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hi Would You Like To Turn Your CPs To Silvers?"));
                                        GC.AddSend(Packets.NPCLink("Yes Please!", 1));
                                        GC.AddSend(Packets.NPCLink("No Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        if (GC.MyChar.CPs >= 1)
                                        {
                                            GC.MyChar.CPs -= 1;
                                            GC.MyChar.Silvers += 1000000;
                                            GC.AddSend(Packets.NPCSay("There Hapy Now?"));
                                            GC.AddSend(Packets.NPCLink("Yes, Very.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        } 
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Ok Maybe Next Time!"));
                                            GC.AddSend(Packets.NPCLink("Alright alright.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
so thats all i did but like i said he doesnt say all that in game, the npc just stands there and does nothing :P so like am i not doing something right or is my code wrong or what? Thanks in advance for whoever helps me! much appreciated
Nolaner is offline  
Old 01/22/2010, 22:54   #15
 
hunterman01's Avatar
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Quote:
Originally Posted by Nolaner View Post
Um okay guys this may be a noob question but im kinda having some trouble implementing NPCs.

Before anyone flames or whatever, i dont know how to code but im trying to learn both through the internet and a C# book, but as a side quest im trying to add the stuff im learning into a CO server because it makes learning easier to stick with if you have a goal and something to work with.

Anyways so back to my question, im trying just to add a test NPC , just to simply change CP's to silvers, ok so i added a new line into the NPC list in the database, and he appears in game, but he doesnt say what i coded into the source!

This is the code i used (i put this into NPCDialog.cs btw)

Code:
#region TestNPC
                            case 300007:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hi Would You Like To Turn Your CPs To Silvers?"));
                                        GC.AddSend(Packets.NPCLink("Yes Please!", 1));
                                        GC.AddSend(Packets.NPCLink("No Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        if (GC.MyChar.CPs >= 1)
                                        {
                                            GC.MyChar.CPs -= 1;
                                            GC.MyChar.Silvers += 1000000;
                                            GC.AddSend(Packets.NPCSay("There Hapy Now?"));
                                            GC.AddSend(Packets.NPCLink("Yes, Very.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        } 
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Ok Maybe Next Time!"));
                                            GC.AddSend(Packets.NPCLink("Alright alright.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
so thats all i did but like i said he doesnt say all that in game, the npc just stands there and does nothing :P so like am i not doing something right or is my code wrong or what? Thanks in advance for whoever helps me! much appreciated
I see nothing wrong with that npc at all maybe your not putting something in right in NPC.txt
hunterman01 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release] Extremely basic (but working/bugless) C# Source
11/30/2012 - CO2 PServer Guides & Releases - 348 Replies
This pretty much has a very finite amount of stuff done in it. Specifically this is pretty much all thats in it. If your serious about trying to develop a server in C#, I suggest looking at this. There's a DLL also included (check the "bin" folder) which will need to be added as a reference. SocketNetwork.dll pretty much handles the socket-system and encryptions for you it is not packed or obfuscated if you would like to decompile it and take a look at it, be my guest. I included a folder...
[Release]5165 Source
06/13/2010 - CO2 PServer Guides & Releases - 0 Replies
This is an old 5165 Source I was adding stuff to when I was helping with EmperionCO, now its ForsakendCO. Nothing really special about it..lots of copy/paste stuff and a few small stuff I added in myself. Kept all the really cool stuff I made for myself, adding to pringles release, if anyone remembers it, which I won't release because I dont have a good enough computer to host it myself and will not have someone else host it and run off and call it thiers the same as this source im posting...
[FINAL RELEASE]HuB- Source (BASIC) (Original LOTF easier workable)
11/14/2009 - CO2 PServer Guides & Releases - 25 Replies
#REMOVED
[RELEASE] Basic LOTF Source
09/03/2009 - CO2 PServer Guides & Releases - 17 Replies
hey this is a basic lotf source edited based off shadowco, if you dont like it then dont post here... flames will be told on!!! :D i will tell on you to the mods if you flame What it has... - LuckyTime - Guard - 24/7 GW



All times are GMT +1. The time now is 05:57.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.