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

01/21/2010 22:28 killersub#1
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!

Credits:original 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!
01/21/2010 22:31 DontLookDown#2
good job, good to see a new learner :]
01/21/2010 22:32 killersub#3
Quote:
Originally Posted by DontLookDown View Post
good job, good to see a new learner :]
thanks! +thanks if I helped remember! I appreciate it :)
01/21/2010 22:49 DontLookDown#4
you didnt help me, i code my own stuff, just saying nice haha
01/21/2010 22:51 killersub#5
Quote:
Originally Posted by DontLookDown View Post
you didnt help me, i code my own stuff, just saying nice haha
my bad then lol :)
01/22/2010 00:40 pro4never#6
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.
01/22/2010 10:57 ~Yuki~#7
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.
01/22/2010 12:53 QuickCo#8
killersub lol :| what is that? omfg you just copy LostQuest & Buy Atribute npcc !! HAHA you are not codder !! stand DOWN !
01/22/2010 17:12 killersub#9
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...
01/22/2010 18:11 QuickCo#10
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
01/22/2010 19:16 Vultix#11
Guys, this ain't the place to fight.
Take it up on Private Message if you have to.
#both reported
01/22/2010 21:52 killersub#12
Removed.
01/22/2010 22:19 gwapo ka#13
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!
01/22/2010 22:49 Nolaner#14
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
01/22/2010 22:54 hunterman01#15
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